Module op
Expand description
The async operations.
Types in this mod represents the low-level operations passed to kernel.
The operation itself doesn’t perform anything.
You need to pass them to crate::Proactor, and poll the driver.
Structs§
- Accept
- Accept a connection.
- Accept
Multi - Accept multiple connections.
- Asyncify
- Spawn a blocking function in the thread pool.
- Asyncify
Fd - Spawn a blocking function with a file descriptor in the thread pool.
- Asyncify
Fd2 - Spawn a blocking function with two file descriptors in the thread pool.
- Bind
- Bind a socket to an address.
- Close
File - Close the file fd.
- Close
Socket - Close socket fd.
- Connect
- Connect to a remote address.
- Create
Dir - Create a directory.
- Create
Socket - Create a socket.
- Current
Dir - A special file descriptor that always refers to the current working
directory. It represents
AT_FDCWDin libc. - File
Stat - Get metadata of an opened file.
- Hard
Link - Create a hard link.
- Listen
- Listen for connections on a socket.
- Mode
S_I*constants for use withopenat,chmodat, andfchmod.- OFlags
O_*constants for use withopenat.- OpCode
Flag - Flags for operations.
- Open
File - Open or create a file with flags and mode.
- Path
Stat - Get metadata from path.
- Pipe
- Create a pipe.
- Poll
Once - Poll a file descriptor for specified
Interest. - Read
- Read a file.
- ReadAt
- Read a file at specified position into specified buffer.
- Read
Managed - Read a file into managed buffer.
- Read
Managed At - Read a file at specified position into managed buffer.
- Read
Vectored - Receive a file into vectored buffer.
- Read
Vectored At - Read a file at specified position into vectored buffer.
- Recv
- Receive data from remote.
- Recv
Flags MSG_*flags for use withrecv,recvfrom, and related functions.- Recv
From - Receive data and source address.
- Recv
From Managed - Receive data and source address into managed buffer.
- Recv
From Multi - Receive data and source address multi times into multiple managed buffers.
- Recv
From Multi Result - Result of
RecvFromMulti. - Recv
From Vectored - Receive data and source address into vectored buffer.
- Recv
Managed - Receive data from remote into managed buffer.
- RecvMsg
- Receive data and source address with ancillary data into vectored buffer.
- Recv
MsgManaged - Receive data into managed buffer, and ancillary data into control buffer.
- Recv
MsgMulti - Receive data, ancillary data and source address multi times into multiple managed buffers.
- Recv
MsgMulti Result - Result of
RecvMsgMulti. - Recv
Vectored - Receive data from remote into vectored buffer.
- Rename
- Rename a file or directory.
- Send
- Send data to remote.
- Send
Flags MSG_*flags for use withsend,sendto, and related functions.- SendMsg
- Send data to specified address accompanied by ancillary data from vectored buffer.
- Send
MsgZc - Send data to specified address accompanied by ancillary data from vectored buffer.
- SendTo
- Send data to specified address.
- Send
ToVectored - Send data to specified address from vectored buffer.
- Send
ToVectored Zc - Send data to specified address from vectored buffer.
- Send
ToZc - Send data to specified address.
- Send
Vectored - Send data to remote from vectored buffer.
- Send
Vectored Zc - Send data to remote from vectored buffer.
- SendZc
- Send data to remote.
- Shutdown
Socket - Shutdown a socket.
- Symlink
- Create a symlink.
- Sync
- Sync data to the disk.
- Truncate
File - Truncates or extends the underlying file, updating the size of file
Stosize. - Unlink
- Remove file or directory.
- Write
- Write a file.
- WriteAt
- Write a file at specified position from specified buffer.
- Write
Vectored - Send to a file from vectored buffer.
- Write
Vectored At - Write a file at specified position from vectored buffer.
Enums§
- Interest
- The interest to poll a file descriptor.
Traits§
- BufResult
Ext - Trait to update the buffer length inside the
BufResult. - Recv
Result Ext - Helper trait for
RecvFrom,RecvFromVectoredandRecvMsg. - Result
Take Buffer - Helper trait for taking buffer from a
BufResult. - Take
Buffer - Take buffer out of an operation.
- VecBuf
Result Ext - Trait to update the buffer length inside the
BufResult.