Trait a10::cancel::Cancel

source ·
pub trait Cancel {
    // Required methods
    fn try_cancel(&mut self) -> CancelResult;
    fn cancel(&mut self) -> CancelOp<'_> ;
}
Expand description

Cancelation of an in progress operations.

Required Methods§

source

fn try_cancel(&mut self) -> CancelResult

Attempt to cancel this operation.

The cancelation attempt will be done asynchronously, without returning the result. If you want to know the result of the cancelation attempt use cancel instead.

source

fn cancel(&mut self) -> CancelOp<'_>

Cancel this operation.

If this returns ENOENT it means the operation was not found. This can be caused by the operation never starting, due to the inert nature of Futures, or the operation has already been completed.

If this returns EALREADY it means the operation was found, but it was already canceled previously.

If the operation was found and canceled this returns Ok(()).

If this is called on an AsyncIterator it will cause them to return None (eventually, it may still return pending items).

Implementors§

source§

impl Cancel for WaitId

source§

impl<'fd, A, D: Descriptor> Cancel for Accept<'fd, A, D>

source§

impl<'fd, A, D: Descriptor> Cancel for Connect<'fd, A, D>

source§

impl<'fd, B, A, D: Descriptor> Cancel for RecvFrom<'fd, B, A, D>

source§

impl<'fd, B, A, D: Descriptor> Cancel for SendTo<'fd, B, A, D>

source§

impl<'fd, B, A, const N: usize, D: Descriptor> Cancel for RecvFromVectored<'fd, B, A, N, D>

source§

impl<'fd, B, A, const N: usize, D: Descriptor> Cancel for SendMsg<'fd, B, A, N, D>

source§

impl<'fd, B, D: Descriptor> Cancel for Read<'fd, B, D>

source§

impl<'fd, B, D: Descriptor> Cancel for ReadN<'fd, B, D>

source§

impl<'fd, B, D: Descriptor> Cancel for Write<'fd, B, D>

source§

impl<'fd, B, D: Descriptor> Cancel for WriteAll<'fd, B, D>

source§

impl<'fd, B, D: Descriptor> Cancel for Recv<'fd, B, D>

source§

impl<'fd, B, D: Descriptor> Cancel for RecvN<'fd, B, D>

source§

impl<'fd, B, D: Descriptor> Cancel for Send<'fd, B, D>

source§

impl<'fd, B, D: Descriptor> Cancel for SendAll<'fd, B, D>

source§

impl<'fd, B, const N: usize, D: Descriptor> Cancel for ReadNVectored<'fd, B, N, D>

source§

impl<'fd, B, const N: usize, D: Descriptor> Cancel for ReadVectored<'fd, B, N, D>

source§

impl<'fd, B, const N: usize, D: Descriptor> Cancel for WriteAllVectored<'fd, B, N, D>

source§

impl<'fd, B, const N: usize, D: Descriptor> Cancel for WriteVectored<'fd, B, N, D>

source§

impl<'fd, B, const N: usize, D: Descriptor> Cancel for RecvNVectored<'fd, B, N, D>

source§

impl<'fd, B, const N: usize, D: Descriptor> Cancel for RecvVectored<'fd, B, N, D>

source§

impl<'fd, B, const N: usize, D: Descriptor> Cancel for SendAllVectored<'fd, B, N, D>

source§

impl<'fd, D: Descriptor> Cancel for ToDirect<'fd, D>

source§

impl<'fd, D: Descriptor> Cancel for ToFd<'fd, D>

source§

impl<'fd, D: Descriptor> Cancel for Advise<'fd, D>

source§

impl<'fd, D: Descriptor> Cancel for Allocate<'fd, D>

source§

impl<'fd, D: Descriptor> Cancel for Stat<'fd, D>

source§

impl<'fd, D: Descriptor> Cancel for SyncData<'fd, D>

source§

impl<'fd, D: Descriptor> Cancel for Splice<'fd, D>

source§

impl<'fd, D: Descriptor> Cancel for MultishotAccept<'fd, D>

source§

impl<'fd, D: Descriptor> Cancel for MultishotRecv<'fd, D>

source§

impl<'fd, D: Descriptor> Cancel for Shutdown<'fd, D>

source§

impl<'fd, D: Descriptor> Cancel for ReceiveSignal<'fd, D>

source§

impl<'fd, D: Descriptor> Cancel for CancelAll<'fd, D>

source§

impl<'fd, T, D: Descriptor> Cancel for SetSocketOption<'fd, T, D>

source§

impl<'fd, T, D: Descriptor> Cancel for SocketOption<'fd, T, D>

source§

impl<'sq> Cancel for MultishotPoll<'sq>

source§

impl<'sq> Cancel for OneshotPoll<'sq>

source§

impl<Fut: Cancel> Cancel for Extractor<Fut>