Struct mfio_rt::native::NativeRtBuilder
source · pub struct NativeRtBuilder { /* private fields */ }
Available on crate feature
native
only.Expand description
Builder for the NativeRt
.
This builder allows configuring the I/O backends to try to construct for the filesystem handle. Note that the order of backends is fixed, and is as follows:
- iocp
- thread
The full order (including unsupported/disabled backends) is as follows:
io_uring
iocp
mio
thread
If you wish to customize the construction order, please use multiple builders.
Implementations§
source§impl NativeRtBuilder
impl NativeRtBuilder
sourcepub fn all_backends() -> Self
pub fn all_backends() -> Self
Get a NativeRtBuilder
with all backends enabled.
sourcepub fn env_backends() -> Self
pub fn env_backends() -> Self
Get a NativeRtBuilder
with backends specified by environment.
This function attempts to parse MFIO_FS_BACKENDS
environment variable and load
backends specified by it. If the environment variable is not present, or
non-unicode, this function falls back to using
all_backends
.
pub fn enable_all(self) -> Self
sourcepub fn iocp(self, iocp: bool) -> Self
Available on non-miri
and Windows and crate feature iocp
only.
pub fn iocp(self, iocp: bool) -> Self
miri
and Windows and crate feature iocp
only.Enables the iocp backend.
pub fn build(self) -> Result<NativeRt>
pub fn build_each(self) -> Vec<(&'static str, Result<NativeRt>)>
Trait Implementations§
source§impl Default for NativeRtBuilder
impl Default for NativeRtBuilder
source§fn default() -> NativeRtBuilder
fn default() -> NativeRtBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl RefUnwindSafe for NativeRtBuilder
impl Send for NativeRtBuilder
impl Sync for NativeRtBuilder
impl Unpin for NativeRtBuilder
impl UnwindSafe for NativeRtBuilder
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more