pub struct LazyRamDiskLayer { /* private fields */ }Expand description
A RAM-backed disk layer that infers unspecified topology parameters from the lower layer at attach time.
Implementations§
Source§impl LazyRamDiskLayer
impl LazyRamDiskLayer
Sourcepub fn new() -> Self
pub fn new() -> Self
Create a new lazy RAM-backed disk layer.
By default, both size and sector size are inferred from the lower layer.
Use with_len and
with_sector_size to override.
Sourcepub fn with_len(self, len: u64) -> Self
pub fn with_len(self, len: u64) -> Self
Set the layer size in bytes.
If not set, the size is inferred from the lower layer at attach time.
Sourcepub fn with_sector_size(self, sector_size: u32) -> Self
pub fn with_sector_size(self, sector_size: u32) -> Self
Set the sector size in bytes.
If not set, the sector size is inferred from the lower layer at attach time, defaulting to 512 if there is no lower layer.
Trait Implementations§
Source§impl LayerAttach for LazyRamDiskLayer
impl LayerAttach for LazyRamDiskLayer
Source§type Layer = RamDiskLayer
type Layer = RamDiskLayer
Object implementating [
LayerIo] after being attached.Auto Trait Implementations§
impl Freeze for LazyRamDiskLayer
impl RefUnwindSafe for LazyRamDiskLayer
impl Send for LazyRamDiskLayer
impl Sync for LazyRamDiskLayer
impl Unpin for LazyRamDiskLayer
impl UnwindSafe for LazyRamDiskLayer
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