pub struct MpscDispatcher { /* private fields */ }Expand description
An object that register reactive::Behavior and dispatch messages for them.
The proper way to construct it is to use Builder.
Implementations§
Trait Implementations§
Source§impl Dispatcher for MpscDispatcher
impl Dispatcher for MpscDispatcher
Source§fn register_reactive(&mut self, behavior: Box<dyn Behavior>) -> Addr
fn register_reactive(&mut self, behavior: Box<dyn Behavior>) -> Addr
Migrate a reactive inside the dispatcher and return an actor address to it.
Source§fn replace_reactive(
&mut self,
addr: &Addr,
behavior: Box<dyn Behavior>,
) -> Result<Box<dyn Behavior>, Box<dyn Behavior>>
fn replace_reactive( &mut self, addr: &Addr, behavior: Box<dyn Behavior>, ) -> Result<Box<dyn Behavior>, Box<dyn Behavior>>
Replace an implementation of a reactive by a new one.
This only change the object that responds to process message.
This is thread safe but of course the management of new and old
inner states transition should be taken into account.
All copies of the address are still valid. Read more
Auto Trait Implementations§
impl Freeze for MpscDispatcher
impl !RefUnwindSafe for MpscDispatcher
impl !Send for MpscDispatcher
impl !Sync for MpscDispatcher
impl Unpin for MpscDispatcher
impl !UnwindSafe for MpscDispatcher
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