pub struct Watch<B: Behavior> { /* private fields */ }Expand description
A pure peer-observation transformation.
Initialization emits exactly one ObservePeer request after preserving
the inner initialization effects. A matching PeerStopped result invokes
the configured reaction whether the interpreter produced it immediately
from authoritative retained termination or after observing a live
incarnation. The transformation retains no runtime observation handle or
lifecycle flag; exact-incarnation selection belongs to the interpreter.
Trait Implementations§
Source§impl<B, A, Ph, Sends, Br> Behavior for Watch<B>where
A: Address,
Sends: SendAlgebra,
Br: BirthMode,
B: Behavior<Addr = A, Ph = Ph, Sends = Sends, Birth = Br>,
B::Event: RouteInput<PeerStopped<A>>,
impl<B, A, Ph, Sends, Br> Behavior for Watch<B>where
A: Address,
Sends: SendAlgebra,
Br: BirthMode,
B: Behavior<Addr = A, Ph = Ph, Sends = Sends, Birth = Br>,
B::Event: RouteInput<PeerStopped<A>>,
type Addr = A
type Msg = <B as Behavior>::Msg
type Event = WatchEvent<<B as Behavior>::Event>
type Sends = WatchSends<A, Sends>
type Ph = Ph
type Error = <B as Behavior>::Error
type Birth = Br
Source§fn init(
&mut self,
_: InitializationTurn,
) -> Result<Actions<<B as Behavior>::Addr, <B as Behavior>::Ph, WatchSends<<B as Behavior>::Addr, <B as Behavior>::Sends>, <B as Behavior>::Birth>, B::Error>
fn init( &mut self, _: InitializationTurn, ) -> Result<Actions<<B as Behavior>::Addr, <B as Behavior>::Ph, WatchSends<<B as Behavior>::Addr, <B as Behavior>::Sends>, <B as Behavior>::Birth>, B::Error>
Produce initialization actions before the first event is accepted. Read more
Source§fn transition(
&mut self,
_: ActiveTurn,
event: Self::Event,
) -> Result<Actions<<B as Behavior>::Addr, <B as Behavior>::Ph, WatchSends<<B as Behavior>::Addr, <B as Behavior>::Sends>, <B as Behavior>::Birth>, B::Error>
fn transition( &mut self, _: ActiveTurn, event: Self::Event, ) -> Result<Actions<<B as Behavior>::Addr, <B as Behavior>::Ph, WatchSends<<B as Behavior>::Addr, <B as Behavior>::Sends>, <B as Behavior>::Birth>, B::Error>
Fold exactly one event into explicit actions and the next behavior. Read more
Source§impl<B: Behavior + BehaviorBase> BehaviorBase for Watch<B>
impl<B: Behavior + BehaviorBase> BehaviorBase for Watch<B>
Source§impl<B> StashStatus for Watch<B>where
B: Behavior + StashStatus,
impl<B> StashStatus for Watch<B>where
B: Behavior + StashStatus,
fn stashed_messages(&self) -> usize
Auto Trait Implementations§
impl<B> Freeze for Watch<B>
impl<B> RefUnwindSafe for Watch<B>
impl<B> Send for Watch<B>
impl<B> Sync for Watch<B>
impl<B> Unpin for Watch<B>
impl<B> UnsafeUnpin for Watch<B>
impl<B> UnwindSafe for Watch<B>
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