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§
Source§impl<'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§
impl<'a> StructuralPartialEq for BlockInfo<'a>
Auto Trait Implementations§
impl<'a> Freeze for BlockInfo<'a>
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§
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