pub enum CancelHow {
AsyncCancel,
TimeoutRemove,
}Expand description
Specifies the mechanism used to cancel an in-flight operation.
Variants§
AsyncCancel
Cancels the operation using IORING_OP_ASYNC_CANCEL
This is the standard cancellation method for almost all I/O operations
(files, sockets, poll_add, etc.). It attempts to locate the request
in the ring by its user_data and cancel it.
TimeoutRemove
Cancels the operation using IORING_OP_TIMEOUT_REMOVE.
This is required specifically for operations submitted via IORING_OP_TIMEOUT.
Attempting to cancel a native io_uring timer with ASYNC_CANCEL is incorrect
and will not work as intended.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CancelHow
impl RefUnwindSafe for CancelHow
impl Send for CancelHow
impl Sync for CancelHow
impl Unpin for CancelHow
impl UnwindSafe for CancelHow
Blanket Implementations§
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more