#[repr(u8)]pub enum AsyncOp {
Show 18 variants
Nop = 0,
Read = 1,
Write = 2,
Open = 3,
Close = 4,
Stat = 5,
IpcSend = 10,
IpcRecv = 11,
IpcCall = 12,
PollAdd = 20,
PollRemove = 21,
Timeout = 30,
TimeoutRemove = 31,
Accept = 40,
Connect = 41,
StorageRead = 50,
StorageWrite = 51,
Cancel = 254,
}Expand description
Operation opcode submitted through the async ring.
Do not reorder existing variants : the numeric value is part of the userspace ABI and must remain stable.
Variants§
Nop = 0
No-op : used for testing and ring probing.
Read = 1
VFS: read from an open file descriptor.
Write = 2
VFS: write to an open file descriptor.
Open = 3
VFS: open a file (async version).
Close = 4
VFS: close a file descriptor.
Stat = 5
VFS: stat / fstat a file.
IpcSend = 10
IPC: send a message to a port (non-blocking).
IpcRecv = 11
IPC: receive a message from a port (non-blocking).
IpcCall = 12
IPC: combined send + recv (reply channel).
PollAdd = 20
Poll: add an fd to the epoll set.
PollRemove = 21
Poll: remove an fd from the epoll set.
Timeout = 30
Timer: arm a timeout completion.
TimeoutRemove = 31
Timer: remove a previously armed timeout.
Accept = 40
Network: accept a connection on a listening socket.
Connect = 41
Network: connect to a remote endpoint.
StorageRead = 50
Storage: read sectors from a block device (AHCI / NVMe).
StorageWrite = 51
Storage: write sectors to a block device.
Cancel = 254
Cancel an in-flight operation by its user_data token.
Trait Implementations§
impl Copy for AsyncOp
impl Eq for AsyncOp
impl StructuralPartialEq for AsyncOp
Auto Trait Implementations§
impl Freeze for AsyncOp
impl RefUnwindSafe for AsyncOp
impl Send for AsyncOp
impl Sync for AsyncOp
impl Unpin for AsyncOp
impl UnsafeUnpin for AsyncOp
impl UnwindSafe for AsyncOp
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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>
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>
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