Enum disk_types::Sector
source · pub enum Sector {
Start,
End,
Unit(u64),
UnitFromEnd(u64),
Megabyte(u64),
MegabyteFromEnd(u64),
Percent(u16),
}
Expand description
Used with the Disk::get_sector
method for converting a more human-readable unit
into the corresponding sector for the given disk.
Variants§
Start
The first sector in the disk where partitions should be created.
End
The last sector in the disk where partitions should be created.
Unit(u64)
A raw value that directly corrects to the exact number of sectors that will be used.
UnitFromEnd(u64)
Similar to the above, but subtracting from the end.
Megabyte(u64)
Rather than specifying the sector count, the user can specify the actual size in megabytes. This value will later be used to get the exact sector count based on the sector size.
MegabyteFromEnd(u64)
Similar to the above, but subtracting from the end.
Percent(u16)
The percent can be represented by specifying a value between 0 and u16::MAX, where u16::MAX is 100%.