#[repr(u8)]pub enum OperationType {
Read = 0,
Write = 1,
Accept = 2,
Send = 3,
Recv = 4,
ReadVectored = 5,
WriteVectored = 6,
}Expand description
Type of I/O operation to perform.
This enum represents the different types of operations that can be submitted to io_uring. Each variant corresponds to a specific system call or operation type.
Variants§
Read = 0
Read data from a file descriptor into a buffer
Write = 1
Write data from a buffer to a file descriptor
Accept = 2
Accept a connection on a listening socket
Send = 3
Send data on a socket
Recv = 4
Receive data from a socket
ReadVectored = 5
Vectored read operation (readv)
WriteVectored = 6
Vectored write operation (writev)
Implementations§
Source§impl OperationType
impl OperationType
Sourcepub const fn requires_buffer(self) -> bool
pub const fn requires_buffer(self) -> bool
Returns true if this operation type requires a buffer.
Accept operations don’t require a buffer as they only return a new file descriptor for the accepted connection.
Sourcepub const fn is_read_like(self) -> bool
pub const fn is_read_like(self) -> bool
Returns true if this operation type is a read-like operation.
Read-like operations populate the buffer with data from the kernel.
Sourcepub const fn is_write_like(self) -> bool
pub const fn is_write_like(self) -> bool
Returns true if this operation type is a write-like operation.
Write-like operations send data from the buffer to the kernel.
Sourcepub const fn is_vectored(self) -> bool
pub const fn is_vectored(self) -> bool
Returns true if this operation type is vectored.
Vectored operations use multiple buffers (scatter-gather I/O).
Trait Implementations§
Source§impl Clone for OperationType
impl Clone for OperationType
Source§fn clone(&self) -> OperationType
fn clone(&self) -> OperationType
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more