Struct ockam_node::Cancel [−][src]
A message wraper type that allows users to cancel message receival
A worker can block in place to wait for a message. If the next message is not the desired type, it can be cancelled which re-queues it into the mailbox.
Implementations
impl<'ctx, M: Message> Cancel<'ctx, M>
[src]
pub async fn cancel(self)
[src]
Cancel this message
pub fn take(self) -> Routed<M>
[src]
Consume the Cancel wrapper to take the underlying message
After calling this function it is no longer possible to re-queue the message into the worker mailbox.
Trait Implementations
impl<'ctx, M: Message + Debug> Debug for Cancel<'ctx, M>
[src]
impl<'ctx, M: Message> Deref for Cancel<'ctx, M>
[src]
impl<'ctx, M: Message + Display> Display for Cancel<'ctx, M>
[src]
impl<'ctx, M: Message + PartialEq> PartialEq<M> for Cancel<'ctx, M>
[src]
Auto Trait Implementations
impl<'ctx, M> !RefUnwindSafe for Cancel<'ctx, M>
impl<'ctx, M> Send for Cancel<'ctx, M>
impl<'ctx, M> Sync for Cancel<'ctx, M> where
M: Sync,
M: Sync,
impl<'ctx, M> Unpin for Cancel<'ctx, M> where
M: Unpin,
M: Unpin,
impl<'ctx, M> !UnwindSafe for Cancel<'ctx, M>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,