pub struct Mailbox<P: Array, D: Digest, M: Digestible<D>> { /* private fields */ }Expand description
Ingress mailbox for Engine.
Implementations§
Source§impl<P: Array, D: Digest, M: Digestible<D>> Mailbox<P, D, M>
impl<P: Array, D: Digest, M: Digestible<D>> Mailbox<P, D, M>
Sourcepub async fn subscribe(&mut self, digest: D) -> Receiver<M>
pub async fn subscribe(&mut self, digest: D) -> Receiver<M>
Subscribe to a message by digest.
The responder will be sent the message when it is available; either instantly (if cached) or when it is received from the network. The request can be canceled by dropping the responder.
Sourcepub async fn subscribe_prepared(&mut self, digest: D, sender: Sender<M>)
pub async fn subscribe_prepared(&mut self, digest: D, sender: Sender<M>)
Subscribe to a message by digest with an externally prepared sender.
The responder will be sent the message when it is available; either instantly (if cached) or when it is received from the network. The request can be canceled by dropping the responder.
Trait Implementations§
Auto Trait Implementations§
impl<P, D, M> Freeze for Mailbox<P, D, M>
impl<P, D, M> !RefUnwindSafe for Mailbox<P, D, M>
impl<P, D, M> Send for Mailbox<P, D, M>
impl<P, D, M> Sync for Mailbox<P, D, M>
impl<P, D, M> Unpin for Mailbox<P, D, M>
impl<P, D, M> !UnwindSafe for Mailbox<P, D, M>
Blanket Implementations§
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> 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