pub struct Envelope<S> { /* private fields */ }Expand description
Wrap a message that can be handled synchronously 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, &'static str>
pub fn message_type_id(&self) -> Option<TypeId>
Trait Implementations§
Auto Trait Implementations§
impl<S> !RefUnwindSafe for Envelope<S>
impl<S> !Sync for Envelope<S>
impl<S> !UnwindSafe for Envelope<S>
impl<S> Freeze for Envelope<S>
impl<S> Send for Envelope<S>
impl<S> Unpin for Envelope<S>
impl<S> UnsafeUnpin for Envelope<S>where
Box<dyn EnvelopeT<S>>: UnsafeUnpin,
Blanket Implementations§
Source§impl<M, S> AsyncHandler<Vec<M>> for Swhere
M: Message,
S: AsyncHandler<M>,
impl<M, S> AsyncHandler<Vec<M>> for Swhere
M: Message,
S: AsyncHandler<M>,
async fn deliver_async(&mut self, messages: Vec<M>)
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