pub struct Receptor<T: Process> { /* private fields */ }Implementations§
Source§impl<T: Process> Receptor<T>
impl<T: Process> Receptor<T>
pub async fn handle<C: Command>(
&self,
command: C,
) -> Result<Result<T::Event, T::Rejection>, ChannelDropped>where
T: CommandHandler<C>,
pub async fn apply<E: Event>(&self, event: E) -> Result<(), ChannelDropped>where
T: EventApplicator<E>,
pub async fn try_apply<E: Event>(
&self,
event: E,
) -> Result<Result<(), T::Rejection>, ChannelDropped>where
T: TryEventApplicator<E>,
pub async fn entrust<C: Command>(&self, cmd: C) -> Result<(), ChannelDropped>
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for Receptor<T>
impl<T> RefUnwindSafe for Receptor<T>
impl<T> Send for Receptor<T>
impl<T> Sync for Receptor<T>
impl<T> Unpin for Receptor<T>
impl<T> UnwindSafe for Receptor<T>
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