pub struct AsyncEnvelope<S> { /* private fields */ }Expand description
Wrap a message that can only be handled asynchronously by S.
Implementations§
Source§impl<S: Service> AsyncEnvelope<S>
impl<S: Service> AsyncEnvelope<S>
pub fn wrap<M>(message: M) -> Selfwhere
M: Message,
S: AsyncHandler<M>,
pub fn wrap_with_reply<M>(message: M) -> (Self, Receiver<M::Reply>)where
M: Message,
S: AsyncHandler<M>,
pub fn deliver_to<'a>( &'a mut self, service: &'a mut S, ) -> LocalBoxFuture<'a, Result<DeliveryStats, &'static str>>
pub fn message_type_id(&self) -> Option<TypeId>
Trait Implementations§
Source§impl<S: Service> From<AsyncEnvelope<S>> for TaskEnvelope<S>
impl<S: Service> From<AsyncEnvelope<S>> for TaskEnvelope<S>
Source§fn from(envelope: AsyncEnvelope<S>) -> Self
fn from(envelope: AsyncEnvelope<S>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<S> !RefUnwindSafe for AsyncEnvelope<S>
impl<S> !Sync for AsyncEnvelope<S>
impl<S> !UnwindSafe for AsyncEnvelope<S>
impl<S> Freeze for AsyncEnvelope<S>
impl<S> Send for AsyncEnvelope<S>
impl<S> Unpin for AsyncEnvelope<S>
impl<S> UnsafeUnpin for AsyncEnvelope<S>where
Box<dyn AsyncEnvelopeT<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