pub struct UringSource<F: AsRawDescriptor> {
    registered_source: RegisteredSource,
    source: F,
}
Expand description

UringSource wraps FD backed IO sources for use with io_uring. It is a thin wrapper around registering an IO source with the uring that provides an IoSource implementation.

Fields§

§registered_source: RegisteredSource§source: F

Implementations§

Creates a new UringSource that wraps the given io_source object.

Reads from the iosource at file_offset and fill the given vec.

Wait for the FD of self to be readable.

Reads to the given mem at the given offsets from the file starting at file_offset.

Writes from the given vec to the file starting at file_offset.

Writes from the given mem from the given offsets to the file starting at file_offset.

See fallocate(2). Note this op is synchronous when using the Polled backend.

Sync all completed write operations to the backing storage.

Sync all data of completed write operations to the backing storage. Currently, the implementation is equivalent to fsync.

Yields the underlying IO source.

Provides a mutable ref to the underlying IO source.

Provides a ref to the underlying IO source.

Trait Implementations§

The resulting type after dereferencing.
Dereferences the value.
Mutably dereferences the value.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.