Enum Decision
#[non_exhaustive]pub enum Decision {
Completed(usize),
Wait(SmallVec<[WaitArg; 1]>),
Blocking,
}Expand description
Result of OpCode::pre_submit.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Completed(usize)
Instant operation, no need to submit
Wait(SmallVec<[WaitArg; 1]>)
Async operation, needs to submit
Blocking
Blocking operation, needs to be spawned in another thread
Implementations§
§impl Decision
impl Decision
pub fn wait_for(fd: i32, interest: Interest) -> Decision
pub fn wait_for(fd: i32, interest: Interest) -> Decision
Decide to wait for the given fd with the given interest.
pub fn wait_for_many<I>(args: I) -> Decisionwhere
I: IntoIterator<Item = WaitArg>,
pub fn wait_for_many<I>(args: I) -> Decisionwhere
I: IntoIterator<Item = WaitArg>,
Decide to wait for many fds.
pub fn wait_readable(fd: i32) -> Decision
pub fn wait_readable(fd: i32) -> Decision
Decide to wait for the given fd to be readable.
pub fn wait_writable(fd: i32) -> Decision
pub fn wait_writable(fd: i32) -> Decision
Decide to wait for the given fd to be writable.
Auto Trait Implementations§
impl Freeze for Decision
impl RefUnwindSafe for Decision
impl Send for Decision
impl Sync for Decision
impl Unpin for Decision
impl UnwindSafe for Decision
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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