pub struct Envelope<S> { /* private fields */ }
Expand description
Wrap a message that can be handled by S
.
Implementations§
Source§impl<S: Service> Envelope<S>
impl<S: Service> Envelope<S>
pub fn wrap<M>(message: M) -> Self
pub fn wrap_with_reply<M>(message: M) -> (Self, Receiver<M::Reply>)
pub fn deliver_to(&mut self, service: &mut S) -> Result<DeliveryStats, &str>
pub fn message_type_id(&self) -> Option<TypeId>
Auto Trait Implementations§
impl<S> Freeze for Envelope<S>
impl<S> !RefUnwindSafe for Envelope<S>
impl<S> Send for Envelope<S>
impl<S> !Sync for Envelope<S>
impl<S> Unpin for Envelope<S>
impl<S> !UnwindSafe for Envelope<S>
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