#[repr(C)]pub struct Chs(pub [u8; 3]);Expand description
Legacy MBR cylinder/head/sector.
Tuple Fields§
§0: [u8; 3]Implementations§
Source§impl Chs
impl Chs
Sourcepub fn new(cylinder: u16, head: u8, sector: u8) -> Option<Self>
pub fn new(cylinder: u16, head: u8, sector: u8) -> Option<Self>
Create a new Chs. Returns None if cylinder can’t fit in 10
bits, or if sector can’t fit in 6 bits.
Sourcepub fn from_lba(lba: Lba, geom: DiskGeometry) -> Option<Self>
pub fn from_lba(lba: Lba, geom: DiskGeometry) -> Option<Self>
Convert LBA to CHS address. Returns None if the LBA value
cannot fit in the CHS format.
Trait Implementations§
Source§impl Ord for Chs
impl Ord for Chs
Source§impl PartialOrd for Chs
impl PartialOrd for Chs
impl Copy for Chs
impl Eq for Chs
impl Pod for Chs
impl StructuralPartialEq for Chs
Auto Trait Implementations§
impl Freeze for Chs
impl RefUnwindSafe for Chs
impl Send for Chs
impl Sync for Chs
impl Unpin for Chs
impl UnwindSafe for Chs
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
Mutably borrows from an owned value. Read more
Source§impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
Source§type Bits = T
type Bits = T
Self must have the same layout as the specified Bits except for
the possible invalid bit patterns being checked during
is_valid_bit_pattern.Source§fn is_valid_bit_pattern(_bits: &T) -> bool
fn is_valid_bit_pattern(_bits: &T) -> bool
If this function returns true, then it must be valid to reinterpret
bits
as &Self.