Struct libblkid_rs::BlkidPartition
source · pub struct BlkidPartition(/* private fields */);
Expand description
A handle for working with a probed partition.
Implementations§
source§impl BlkidPartition
impl BlkidPartition
sourcepub fn get_table(&self) -> Result<BlkidParttable>
pub fn get_table(&self) -> Result<BlkidParttable>
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.