pub struct Ext2Params {
pub device_path: Option<String>,
pub device_id: Option<usize>,
pub options: BTreeMap<String, String>,
}Expand description
ext2 filesystem parameters for mount options
This struct holds the parameters parsed from mount option strings and provides the interface for creating ext2 filesystems.
Fields§
§device_path: Option<String>Device file path (e.g., “/dev/vda”)
device_id: Option<usize>Block device ID (if resolved)
options: BTreeMap<String, String>Mount options
Implementations§
Source§impl Ext2Params
impl Ext2Params
Sourcepub fn from_option_string(options: &str) -> Result<Self, FileSystemError>
pub fn from_option_string(options: &str) -> Result<Self, FileSystemError>
Parse parameters from option string
Expected format: “device=/dev/vda,rw,sync” or: “device=/dev/vda,ro”
Sourcepub fn resolve_device(&mut self) -> Result<(), FileSystemError>
pub fn resolve_device(&mut self) -> Result<(), FileSystemError>
Resolve device path to device ID
Sourcepub fn get_device_id(&self) -> Option<usize>
pub fn get_device_id(&self) -> Option<usize>
Get the resolved device ID
Sourcepub fn get_option(&self, key: &str) -> Option<&String>
pub fn get_option(&self, key: &str) -> Option<&String>
Get a specific option value
Sourcepub fn is_readonly(&self) -> bool
pub fn is_readonly(&self) -> bool
Check if filesystem should be mounted read-only
Sourcepub fn create_filesystem(
&mut self,
) -> Result<Arc<Ext2FileSystem>, FileSystemError>
pub fn create_filesystem( &mut self, ) -> Result<Arc<Ext2FileSystem>, FileSystemError>
Create ext2 filesystem from these parameters
Trait Implementations§
Source§impl Clone for Ext2Params
impl Clone for Ext2Params
Source§fn clone(&self) -> Ext2Params
fn clone(&self) -> Ext2Params
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Ext2Params
impl Debug for Ext2Params
Source§impl FileSystemParams for Ext2Params
impl FileSystemParams for Ext2Params
Source§fn as_any(&self) -> &dyn Any
fn as_any(&self) -> &dyn Any
Enable dynamic downcasting for runtime type identification Read more
Source§fn to_string_map(&self) -> BTreeMap<String, String>
fn to_string_map(&self) -> BTreeMap<String, String>
Convert parameters to string map for backward compatibility Read more
Source§fn from_string_map(map: &BTreeMap<String, String>) -> Result<Self, String>
fn from_string_map(map: &BTreeMap<String, String>) -> Result<Self, String>
Create parameters from string map for backward compatibility Read more
Auto Trait Implementations§
impl Freeze for Ext2Params
impl RefUnwindSafe for Ext2Params
impl Send for Ext2Params
impl Sync for Ext2Params
impl Unpin for Ext2Params
impl UnwindSafe for Ext2Params
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)