pub unsafe trait IoBuf: Unpin + 'static {
// Required methods
fn stable_ptr(&self) -> *const u8;
fn bytes_init(&self) -> usize;
fn bytes_total(&self) -> usize;
}Required Methods§
Sourcefn stable_ptr(&self) -> *const u8
fn stable_ptr(&self) -> *const u8
Returns a raw pointer to the vector’s buffer.
This method is to be used by the tokio-uring runtime and it is not
expected for users to call it directly.
The implementation must ensure that, while the tokio-uring runtime
owns the value, the pointer returned by stable_ptr does not
change.
Sourcefn bytes_init(&self) -> usize
fn bytes_init(&self) -> usize
Number of initialized bytes.
This method is to be used by the tokio-uring runtime and it is not
expected for users to call it directly.
For Vec, this is identical to len().
Sourcefn bytes_total(&self) -> usize
fn bytes_total(&self) -> usize
Total size of the buffer, including uninitialized memory, if any.
This method is to be used by the tokio-uring runtime and it is not
expected for users to call it directly.
For Vec, this is identical to capacity().
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".