pub(crate) struct ProdGotifyFacade {
workspace: Weak<Workspace>,
}Expand description
Production facade over Weak<Workspace> (weak to avoid a cycle with
the MCP server the workspace owns).
Fields§
§workspace: Weak<Workspace>Implementations§
Trait Implementations§
Source§impl GotifyFacade for ProdGotifyFacade
impl GotifyFacade for ProdGotifyFacade
Source§fn subscribe<'life0, 'life1, 'async_trait>(
&'life0 self,
caller: &'life1 SessionSlot,
applications: Vec<String>,
min_priority: Option<u8>,
) -> Pin<Box<dyn Future<Output = Result<SubscribeOutcome, GotifySubscribeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn subscribe<'life0, 'life1, 'async_trait>(
&'life0 self,
caller: &'life1 SessionSlot,
applications: Vec<String>,
min_priority: Option<u8>,
) -> Pin<Box<dyn Future<Output = Result<SubscribeOutcome, GotifySubscribeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Subscribe the caller’s durable identity to the configured server,
optionally filtered by application names and/or minimum priority.
An empty
applications matches any app. Persists when the identity
is durable. Async because a filter that names applications refreshes
the app index before returning.Source§fn list(&self, caller: &SessionSlot) -> Vec<GotifySubscription>
fn list(&self, caller: &SessionSlot) -> Vec<GotifySubscription>
The caller’s own subscriptions in its project - a lead’s, or one
worker’s, never another owner’s.
Source§fn unsubscribe(
&self,
caller: &SessionSlot,
id: Uuid,
) -> Result<GotifySubscription, GotifyUnsubscribeError>
fn unsubscribe( &self, caller: &SessionSlot, id: Uuid, ) -> Result<GotifySubscription, GotifyUnsubscribeError>
Remove one of the caller’s OWN subscriptions by id within its
project, returning the row as it stood. A refusal says which case
it is:
GotifyUnsubscribeError::NoSuchSubscription when the
project has no such id, GotifyUnsubscribeError::NotOwnedByCaller
when it has one under another owner.Source§fn apps<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, GotifyReadError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn apps<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, GotifyReadError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
The application NAMEs on the configured server (
GET /application)
so a session can self-discover what it may subscribe to.Source§fn recent<'life0, 'async_trait>(
&'life0 self,
applications: Vec<String>,
min_priority: Option<u8>,
limit: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<GotifyRecent>, GotifyReadError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn recent<'life0, 'async_trait>(
&'life0 self,
applications: Vec<String>,
min_priority: Option<u8>,
limit: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<GotifyRecent>, GotifyReadError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
The most recent notifications, newest first, filtered by
application NAME (empty = any) and
min_priority (None = any),
capped at limit. A catch-up read for a woken or live session.Auto Trait Implementations§
impl !RefUnwindSafe for ProdGotifyFacade
impl !UnwindSafe for ProdGotifyFacade
impl Freeze for ProdGotifyFacade
impl Send for ProdGotifyFacade
impl Sync for ProdGotifyFacade
impl Unpin for ProdGotifyFacade
impl UnsafeUnpin for ProdGotifyFacade
Blanket Implementations§
§impl<T> AnySync for T
impl<T> AnySync for T
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<S, T> Duplex<S> for Twhere
T: FromSample<S> + ToSample<S>,
§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more