pub struct Mailbox<S, V>{ /* private fields */ }Expand description
Handle to the mailbox of the Probe.
Implementations§
Source§impl<S, V> Mailbox<S, V>
impl<S, V> Mailbox<S, V>
Sourcepub fn subscribe(&self) -> Receiver<Finalization<S, V::Commitment>> ⓘ
pub fn subscribe(&self) -> Receiver<Finalization<S, V::Commitment>> ⓘ
Open a subscription to the receipt of the floor finalization from peers.
While the actor is still discovering, this requests discovery if no floor has been selected yet. Dropping the receiver cancels this subscription; if all subscribers are dropped before a floor is selected, discovery may be abandoned. If marshal is later attached, the actor transitions to service without a cached floor and later subscriptions will not restart discovery.
Callers that need a floor must keep the receiver alive until it resolves and should attach only after consuming that floor.
If a floor has already been selected, the receiver resolves immediately.
Sourcepub fn attach(&self, marshal: MarshalMailbox<S, V>)
pub fn attach(&self, marshal: MarshalMailbox<S, V>)
Attach a marshal mailbox so the actor can serve the latest finalization to peers.
This moves the actor from discovery to service. It is applied only after any discovered floor has been delivered to its subscribers. If no floor was ever requested, or every pending subscriber was dropped before a floor was selected, the actor serves without a cached floor.
Trait Implementations§
Auto Trait Implementations§
impl<S, V> !RefUnwindSafe for Mailbox<S, V>
impl<S, V> !UnwindSafe for Mailbox<S, V>
impl<S, V> Freeze for Mailbox<S, V>
impl<S, V> Send for Mailbox<S, V>
impl<S, V> Sync for Mailbox<S, V>
impl<S, V> Unpin for Mailbox<S, V>
impl<S, V> UnsafeUnpin for Mailbox<S, V>where
Sender<Message<S, V>>: UnsafeUnpin,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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> ⓘ
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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> ⓘ
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> ⓘ
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