Struct foyer::DirectFileDevice
source · pub struct DirectFileDevice { /* private fields */ }Expand description
A device that uses a single direct i/o file.
Implementations§
Trait Implementations§
source§impl Clone for DirectFileDevice
impl Clone for DirectFileDevice
source§fn clone(&self) -> DirectFileDevice
fn clone(&self) -> DirectFileDevice
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for DirectFileDevice
impl Debug for DirectFileDevice
source§impl Dev for DirectFileDevice
impl Dev for DirectFileDevice
source§type Options = DirectFileDeviceOptions
type Options = DirectFileDeviceOptions
Options for the device.
source§fn region_size(&self) -> usize
fn region_size(&self) -> usize
The region size of the device, must be 4K aligned.
source§async fn open(
options: <DirectFileDevice as Dev>::Options,
runtime: Runtime,
) -> Result<DirectFileDevice, Error>
async fn open( options: <DirectFileDevice as Dev>::Options, runtime: Runtime, ) -> Result<DirectFileDevice, Error>
Open the device with the given options.
source§async fn write(
&self,
buf: IoBytes,
region: u32,
offset: u64,
) -> Result<(), Error>
async fn write( &self, buf: IoBytes, region: u32, offset: u64, ) -> Result<(), Error>
Write API for the device.
Auto Trait Implementations§
impl Freeze for DirectFileDevice
impl !RefUnwindSafe for DirectFileDevice
impl Send for DirectFileDevice
impl Sync for DirectFileDevice
impl Unpin for DirectFileDevice
impl !UnwindSafe for DirectFileDevice
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more