pub struct Extra(/* private fields */);Expand description
Platform-specific extra data associated with a driver instance.
It can be used to set options for or get extra data from I/O operations.
Implementations§
Source§impl Extra
impl Extra
Sourcepub fn with_personality(self, personality: u16) -> Self
pub fn with_personality(self, personality: u16) -> Self
Set the personality, returning the modified Extra.
This is a no-op when not using io_uring driver.
Sourcepub fn set_personality(&mut self, personality: u16)
pub fn set_personality(&mut self, personality: u16)
Set the personality for this operation.
This is a no-op when not using io_uring driver.
Sourcepub fn get_personality(&self) -> Option<u16>
pub fn get_personality(&self) -> Option<u16>
Get the personality for this operation.
If the personality was not set with set_personality or the platform
does not support it, returns None.
Sourcepub fn buffer_id(&self) -> Result<u16>
pub fn buffer_id(&self) -> Result<u16>
Try to get the buffer ID associated with this operation.
§Behavior
This is only supported on io_uring drivers, in which the driver will
try to extract buffer_id returned by the kernel as a part of flags.
If the id cannot be extracted from the flag, an InvalidInput
io::Error will be returned. On other platforms, this will always
return Ok(0).