[][src]Enum disk_types::Sector

pub enum Sector {
    Start,
    End,
    Unit(u64),
    UnitFromEnd(u64),
    Megabyte(u64),
    MegabyteFromEnd(u64),
    Percent(u16),
}

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%.

Trait Implementations

impl Clone for Sector[src]

impl Copy for Sector[src]

impl Debug for Sector[src]

impl From<u64> for Sector[src]

impl FromStr for Sector[src]

type Err = &'static str

The associated error which can be returned from parsing.

impl Hash for Sector[src]

impl PartialEq<Sector> for Sector[src]

impl StructuralPartialEq for Sector[src]

Auto Trait Implementations

impl RefUnwindSafe for Sector

impl Send for Sector

impl Sync for Sector

impl Unpin for Sector

impl UnwindSafe for Sector

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.