Struct sel4_async_block_io_fat::fat::Bpb

source ·
pub struct Bpb<'a> { /* private fields */ }
Expand description

Represents a Boot Parameter Block. This is the first sector of a FAT formatted partition, and it describes various properties of the FAT filesystem.

Implementations§

source§

impl<'a> Bpb<'a>

source

pub fn create_from_bytes(data: &[u8; 512]) -> Result<Bpb<'_>, &'static str>

Attempt to parse a Boot Parameter Block from a 512 byte sector.

source

pub fn bytes_per_block(&self) -> u16

Get the value from the $name field

source

pub fn blocks_per_cluster(&self) -> u8

Get the value from the $name field

source

pub fn reserved_block_count(&self) -> u16

Get the value from the $name field

source

pub fn num_fats(&self) -> u8

Get the value from the $name field

source

pub fn root_entries_count(&self) -> u16

Get the value from the $name field

source

pub fn total_blocks16(&self) -> u16

Get the value from the $name field

source

pub fn media(&self) -> u8

Get the value from the $name field

source

pub fn fat_size16(&self) -> u16

Get the value from the $name field

source

pub fn blocks_per_track(&self) -> u16

Get the value from the $name field

source

pub fn num_heads(&self) -> u16

Get the value from the $name field

source

pub fn hidden_blocks(&self) -> u32

Get the $name field

source

pub fn total_blocks32(&self) -> u32

Get the $name field

source

pub fn footer(&self) -> u16

Get the value from the $name field

source

pub fn fat_size32(&self) -> u32

Get the $name field

source

pub fn fs_ver(&self) -> u16

Get the value from the $name field

source

pub fn first_root_dir_cluster(&self) -> u32

Get the $name field

source

pub fn fs_info(&self) -> u16

Get the value from the $name field

source

pub fn backup_boot_block(&self) -> u16

Get the value from the $name field

source

pub fn oem_name(&self) -> &[u8]

Get the OEM name string for this volume

source

pub fn volume_label(&self) -> &[u8]

Get the Volume Label string for this volume

source

pub fn fs_info_block(&self) -> Option<BlockCount>

On a FAT32 volume, return the free block count from the Info Block. On a FAT16 volume, returns None.

source

pub fn fat_size(&self) -> u32

Get the size of the File Allocation Table in blocks.

source

pub fn total_blocks(&self) -> u32

Get the total number of blocks in this filesystem.

source

pub fn total_clusters(&self) -> u32

Get the total number of clusters in this filesystem.

Auto Trait Implementations§

§

impl<'a> Freeze for Bpb<'a>

§

impl<'a> RefUnwindSafe for Bpb<'a>

§

impl<'a> Send for Bpb<'a>

§

impl<'a> Sync for Bpb<'a>

§

impl<'a> Unpin for Bpb<'a>

§

impl<'a> UnwindSafe for Bpb<'a>

Blanket Implementations§

§

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

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

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

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

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

§

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

Mutably borrows from an owned value. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

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

§

fn into(self) -> U

Calls U::from(self).

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

§

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

§

type Error = Infallible

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

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

Performs the conversion.
§

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

§

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

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

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

Performs the conversion.