pub struct BlkidPartition<'a>(/* private fields */);Expand description
A handle for working with a probed partition.
Implementations§
Source§impl<'a> BlkidPartition<'a>
impl<'a> BlkidPartition<'a>
Sourcepub fn get_table(&self) -> Result<BlkidParttable<'a>>
pub fn get_table(&self) -> Result<BlkidParttable<'a>>
Get the partition table for the given partition.
Sourcepub fn get_name(&self) -> Result<Option<String>>
pub fn get_name(&self) -> Result<Option<String>>
Get the partition name or None if it can’t be represented.
Sourcepub fn get_uuid(&self) -> Result<Option<Uuid>>
pub fn get_uuid(&self) -> Result<Option<Uuid>>
Get the partition UUID or None if the partition table doesn’t support it.
Sourcepub fn get_partno(&self) -> Result<c_uint>
pub fn get_partno(&self) -> Result<c_uint>
Get the partition number.
Sourcepub fn get_start(&self) -> BlkidSectors
pub fn get_start(&self) -> BlkidSectors
Get the start of the partition in units of sectors.
Sourcepub fn get_size(&self) -> BlkidSectors
pub fn get_size(&self) -> BlkidSectors
Get the size of the partition in units of sectors.
Sourcepub fn get_type(&self) -> c_int
pub fn get_type(&self) -> c_int
Get the numeric partition type. Use get_type_string for the String
representation.
Sourcepub fn get_type_string(&self) -> Result<String>
pub fn get_type_string(&self) -> Result<String>
Get the string representation of the partition type.
Sourcepub fn get_flags(&self) -> c_ulonglong
pub fn get_flags(&self) -> c_ulonglong
Get the flags for the given partition.
This method is not typed as the documentation does not specify which constants are used as flags.
Sourcepub fn is_logical(&self) -> bool
pub fn is_logical(&self) -> bool
Check whether the given partition is logical.
Sourcepub fn is_extended(&self) -> bool
pub fn is_extended(&self) -> bool
Check whether the given partition is an extended partition.
Sourcepub fn is_primary(&self) -> bool
pub fn is_primary(&self) -> bool
Check whether the given partition is a primary partition.
Auto Trait Implementations§
impl<'a> Freeze for BlkidPartition<'a>
impl<'a> RefUnwindSafe for BlkidPartition<'a>
impl<'a> !Send for BlkidPartition<'a>
impl<'a> !Sync for BlkidPartition<'a>
impl<'a> Unpin for BlkidPartition<'a>
impl<'a> UnwindSafe for BlkidPartition<'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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more