pub struct TimeoutMultishot { /* private fields */ }Expand description
A multishot operation that triggers completions after a specific duration.
This acts as an interval timer. Unlike a standard timeout which fires once, this operation remains active in the kernel and posts a CQE every time the duration elapses.
§Man Page
Implementations§
Source§impl TimeoutMultishot
impl TimeoutMultishot
Sourcepub fn new(interval: Duration, count: u32, flags: Option<TimeoutFlags>) -> Self
pub fn new(interval: Duration, count: u32, flags: Option<TimeoutFlags>) -> Self
Create a new multishot timeout operation.
§Arguments
interval- The duration between each tick.count- The number of times to fire. If0, it fires indefinitely.flags- Optional flags.
§Default Flags
The IORING_TIMEOUT_MULTISHOT and IORING_TIMEOUT_ETIME_SUCCESS flags
are added automatically. ETIME_SUCCESS ensures that a timeout expiration
is treated as a valid CQE rather than an error code.
Trait Implementations§
Source§impl Debug for TimeoutMultishot
impl Debug for TimeoutMultishot
Source§impl MultishotPayload for TimeoutMultishot
impl MultishotPayload for TimeoutMultishot
Source§fn cancel_how(&self) -> CancelHow
fn cancel_how(&self) -> CancelHow
Determines the cancellation strategy for this operation.
Source§fn create_params(self: Pin<&mut Self>) -> Result<MultishotParams, OpcodeError>
fn create_params(self: Pin<&mut Self>) -> Result<MultishotParams, OpcodeError>
Constructs the parameters for the initial
io_uring submission. Read moreimpl<'pin> Unpin for TimeoutMultishotwhere
PinnedFieldsOf<__TimeoutMultishot<'pin>>: Unpin,
Auto Trait Implementations§
impl Freeze for TimeoutMultishot
impl RefUnwindSafe for TimeoutMultishot
impl Send for TimeoutMultishot
impl Sync for TimeoutMultishot
impl UnwindSafe for TimeoutMultishot
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