pub struct ReceiveTimeout<B>where
B: Behavior,{ /* private fields */ }Expand description
A pure one-notification-per-idle-period receive timeout.
Only successful user communications are activity. Timer, peer, child, worker, and shutdown service events compose through this wrapper but never rearm it. A matching timeout consumes the live generation before invoking the reaction; if that reaction continues, the timeout remains unarmed until another successful continuing user communication.
Implementations§
Source§impl<B> ReceiveTimeout<B>where
B: Behavior,
impl<B> ReceiveTimeout<B>where
B: Behavior,
Trait Implementations§
Source§impl<B, A, Ph, Sends, Br> Behavior for ReceiveTimeout<B>
impl<B, A, Ph, Sends, Br> Behavior for ReceiveTimeout<B>
type Addr = A
type Msg = <B as Behavior>::Msg
type Event = TimedEvent<<B as Behavior>::Event>
type Sends = ReceiveTimeoutSends<Sends>
type Ph = Ph
type Error = ReceiveTimeoutError<<B as Behavior>::Error>
type Birth = Br
Source§fn init(
&mut self,
) -> Result<Actions<<B as Behavior>::Addr, <B as Behavior>::Ph, ReceiveTimeoutSends<<B as Behavior>::Sends>, <B as Behavior>::Birth>, <ReceiveTimeout<B> as Behavior>::Error>
fn init( &mut self, ) -> Result<Actions<<B as Behavior>::Addr, <B as Behavior>::Ph, ReceiveTimeoutSends<<B as Behavior>::Sends>, <B as Behavior>::Birth>, <ReceiveTimeout<B> as Behavior>::Error>
Produce initialization actions before the first event is accepted. Read more
Source§fn transition(
&mut self,
event: <ReceiveTimeout<B> as Behavior>::Event,
) -> Result<Actions<<B as Behavior>::Addr, <B as Behavior>::Ph, ReceiveTimeoutSends<<B as Behavior>::Sends>, <B as Behavior>::Birth>, <ReceiveTimeout<B> as Behavior>::Error>
fn transition( &mut self, event: <ReceiveTimeout<B> as Behavior>::Event, ) -> Result<Actions<<B as Behavior>::Addr, <B as Behavior>::Ph, ReceiveTimeoutSends<<B as Behavior>::Sends>, <B as Behavior>::Birth>, <ReceiveTimeout<B> as Behavior>::Error>
Fold exactly one event into explicit actions and the next behavior. Read more
Auto Trait Implementations§
impl<B> Freeze for ReceiveTimeout<B>where
B: Freeze,
impl<B> RefUnwindSafe for ReceiveTimeout<B>where
B: RefUnwindSafe,
impl<B> Send for ReceiveTimeout<B>where
B: Send,
impl<B> Sync for ReceiveTimeout<B>where
B: Sync,
impl<B> Unpin for ReceiveTimeout<B>where
B: Unpin,
impl<B> UnsafeUnpin for ReceiveTimeout<B>where
B: UnsafeUnpin,
impl<B> UnwindSafe for ReceiveTimeout<B>where
B: UnwindSafe,
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