pub trait MetaData: Sized + Default {
// Provided method
fn load(
ffs: &FastFileSystemInner,
lba: LogicalBlockAddress,
) -> Result<BlockPointsTo<Self>, KernelError> { ... }
}Expand description
Trait for file system metadata types that can be loaded from disk.
Types implementing MetaData represent metadata structures in the file
system (e.g., superblock, inode bitmap, block bitmap, inode array) that are
stored on disk in a fixed layout. This trait provides a standard interface
for reading these structures from their on-disk representation.
The trait requires implementors to be Default and support loading from a
logical block address (LBA) using the file system’s internal
I/O abstraction.
Provided Methods§
Sourcefn load(
ffs: &FastFileSystemInner,
lba: LogicalBlockAddress,
) -> Result<BlockPointsTo<Self>, KernelError>
fn load( ffs: &FastFileSystemInner, lba: LogicalBlockAddress, ) -> Result<BlockPointsTo<Self>, KernelError>
Loads a metadata structure from disk at the specified logical block address.
§Parameters
ffs: Reference to the internal file system state.lba: Logical block address where the metadata is stored.
§Returns
Ok(metadata): AnArc<SpinLock<T>>wrapping the loaded metadata.Err(KernelError): If the metadata could not be read.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.