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

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Converts to this type from the input type.
The associated error which can be returned from parsing.
Parses a string s to return a value of this type. Read more
Feeds this value into the given Hasher. Read more
Feeds a slice of this type into the given Hasher. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more