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.
Implementations§
Trait Implementations§
Source§impl<B, A, Ph, Sends, Br> Behavior for Watch<B>
impl<B, A, Ph, Sends, Br> Behavior for Watch<B>
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,
) -> 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, ) -> 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,
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, 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§fn receive(
&mut self,
from: Self::Addr,
message: Self::Msg,
) -> BehaviorActed<Self>where
Self: Sized,
fn receive(
&mut self,
from: Self::Addr,
message: Self::Msg,
) -> BehaviorActed<Self>where
Self: Sized,
Fold one user communication through the composed protocol. Read more
Source§fn on<Input>(&mut self, input: Input) -> BehaviorActed<Self>
fn on<Input>(&mut self, input: Input) -> BehaviorActed<Self>
Inject one supported semantic input and fold it through this behavior. Read more
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