#[non_exhaustive]pub enum SectorFormat {
Plain,
Raw2054,
Raw2064,
}Expand description
How logical sectors are stored in an image file (specification 1, 1.2).
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Plain
2048 bytes per stored sector, data at offset 0.
Raw2054
2054 bytes per stored sector, data at offset 6.
Raw2064
2064 bytes per stored sector, data at offset 12.
Implementations§
Source§impl SectorFormat
impl SectorFormat
Sourcepub const DETECTION_ORDER: [SectorFormat; 3]
pub const DETECTION_ORDER: [SectorFormat; 3]
The detection order of specification 1, 1.4.
Sourcepub fn stored_size(self) -> u64
pub fn stored_size(self) -> u64
Stored sector size P in bytes.
Sourcepub fn data_offset(self) -> u64
pub fn data_offset(self) -> u64
Offset D of the user data within a stored sector.
Trait Implementations§
Source§impl Clone for SectorFormat
impl Clone for SectorFormat
impl Copy for SectorFormat
Source§impl Debug for SectorFormat
impl Debug for SectorFormat
impl Eq for SectorFormat
Source§impl Hash for SectorFormat
impl Hash for SectorFormat
Source§impl PartialEq for SectorFormat
impl PartialEq for SectorFormat
impl StructuralPartialEq for SectorFormat
Auto Trait Implementations§
impl Forget for SectorFormat
impl Freeze for SectorFormat
impl Move for SectorFormat
impl RefUnwindSafe for SectorFormat
impl Send for SectorFormat
impl Sync for SectorFormat
impl Unpin for SectorFormat
impl UnsafeUnpin for SectorFormat
impl UnwindSafe for SectorFormat
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more