pub struct Builder {
pub blocks_per_group: u32,
pub inodes_per_group: u32,
pub size: u32,
pub root_dir: Option<PathBuf>,
}Expand description
A struct to represent the configuration of an ext2 filesystem.
Fields§
§blocks_per_group: u32The number of blocks per group.
inodes_per_group: u32The number of inodes per group.
size: u32The size of the memory region.
root_dir: Option<PathBuf>The roof directory to be copied to the file system.
Implementations§
Source§impl Builder
impl Builder
Sourcepub fn allocate_memory(self) -> Result<MemRegion>
pub fn allocate_memory(self) -> Result<MemRegion>
Allocates memory region with the given configuration.
Sourcepub fn build_on_shm(self, shm: &SharedMemory) -> Result<MemRegion>
pub fn build_on_shm(self, shm: &SharedMemory) -> Result<MemRegion>
Builds memory region on the given shared memory.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Builder
impl RefUnwindSafe for Builder
impl Send for Builder
impl Sync for Builder
impl Unpin for Builder
impl UnwindSafe for Builder
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