Struct fstab_generate::BlockInfo
source · pub struct BlockInfo<'a> {
pub uid: PartitionID,
pub fs: &'static str,
pub options: &'a str,
pub dump: bool,
pub pass: bool,
/* private fields */
}
Expand description
Information that will be used to generate a fstab entry for the given partition.
Fields
uid: PartitionID
fs: &'static str
options: &'a str
dump: bool
pass: bool
Implementations
sourceimpl<'a> BlockInfo<'a>
impl<'a> BlockInfo<'a>
pub fn new(
uid: PartitionID,
fs: FileSystem,
target: Option<&Path>,
options: &'a str
) -> Self
sourcepub fn write_entry(&self, fstab: &mut OsString)
pub fn write_entry(&self, fstab: &mut OsString)
Writes a single line to the fstab buffer for this file system.
sourcepub fn get_partition_id(path: &Path, fs: FileSystem) -> Option<PartitionID>
pub fn get_partition_id(path: &Path, fs: FileSystem) -> Option<PartitionID>
Helper for fetching the Partition ID of a partition.
Notes
FAT partitions are prone to UUID collisions, so PartUUID will be used instead.
Trait Implementations
sourceimpl<'a> PartialEq<BlockInfo<'a>> for BlockInfo<'a>
impl<'a> PartialEq<BlockInfo<'a>> for BlockInfo<'a>
impl<'a> StructuralPartialEq for BlockInfo<'a>
Auto Trait Implementations
impl<'a> RefUnwindSafe for BlockInfo<'a>
impl<'a> Send for BlockInfo<'a>
impl<'a> Sync for BlockInfo<'a>
impl<'a> Unpin for BlockInfo<'a>
impl<'a> UnwindSafe for BlockInfo<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more