Struct Sector

Source
pub struct Sector {
    pub offset: u64,
    pub header: D88_SectorHdr,
    pub data: Vec<u8>,
}
Expand description

Fields§

§offset: u64§header: D88_SectorHdr§data: Vec<u8>

Implementations§

Source§

impl Sector

Source

pub fn preset( &mut self, reader: &mut BufReader<File>, offset: u64, ) -> Result<u64, ()>

Read Sector

§Argument
§Return
  • Ok(usize) Sector Data Size (with Sector Header)
  • Err(())
Source

pub fn get_track(&self) -> String

Source

pub fn get_side(&self) -> String

Source

pub fn get_sector(&self) -> String

Source

pub fn get_sector_size(&self) -> String

Source

pub fn get_num_of_sector(&self) -> String

Source

pub fn get_status(&self) -> String

Source

pub fn get_density(&self) -> String

Source

pub fn get_mark(&self) -> String

Source

pub fn get_data_size(&self) -> String

Trait Implementations§

Source§

impl Debug for Sector

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Sector

Source§

fn default() -> Sector

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl Freeze for Sector

§

impl RefUnwindSafe for Sector

§

impl Send for Sector

§

impl Sync for Sector

§

impl Unpin for Sector

§

impl UnwindSafe for Sector

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.