pub enum TaskEnvelope<S> {
Sync(Envelope<S>),
Async(AsyncEnvelope<S>),
}Expand description
Either a synchronous or asynchronous envelope, sent through a single
BoundedTaskMailbox channel and dispatched accordingly by async_run.
Variants§
Sync(Envelope<S>)
Async(AsyncEnvelope<S>)
Implementations§
Source§impl<S: Service> TaskEnvelope<S>
impl<S: Service> TaskEnvelope<S>
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 TaskEnvelope<S>
impl<S> !Sync for TaskEnvelope<S>
impl<S> !UnwindSafe for TaskEnvelope<S>
impl<S> Freeze for TaskEnvelope<S>
impl<S> Send for TaskEnvelope<S>
impl<S> Unpin for TaskEnvelope<S>
impl<S> UnsafeUnpin for TaskEnvelope<S>
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