pub struct Write { /* private fields */ }Expand description
Issue the equivalent of a pread(2) or pwrite(2) system call
fdis the file descriptor to be operated on,addrcontains the buffer in question,lencontains the length of the IO operation,
These are non-vectored versions of the IORING_OP_READV and IORING_OP_WRITEV opcodes.
See also read(2) and write(2) for the general description of the related system call.
Available since 5.6.
Implementations§
Source§impl Write
impl Write
Sourcepub const CODE: u8
pub const CODE: u8
The opcode of the operation. This can be passed to
Probe::is_supported to check if this operation is
supported with the current kernel.
pub fn new(fd: impl UseFixed, buf: *const u8, len: u32) -> Self
Sourcepub const fn offset(self, offset: u64) -> Self
pub const fn offset(self, offset: u64) -> Self
offset contains the read or write offset.
If fd does not refer to a seekable file, offset must be set to zero.
If offsett is set to -1, the offset will use (and advance) the file position,
like the read(2) and write(2) system calls.
pub const fn ioprio(self, ioprio: u16) -> Self
pub const fn rw_flags(self, rw_flags: i32) -> Self
Sourcepub const fn write_stream(self, write_stream: u8) -> Self
pub const fn write_stream(self, write_stream: u8) -> Self
write_stream identifies a write stream, added in Linux 6.16
(used by NVMe FDP, for example). 0 means no stream.
Older kernels ignore this field.