[][src]Struct embedded_sdmmc::Block

pub struct Block {
    pub contents: [u8; 512],
}

Represents a standard 512 byte block (also known as a sector). IBM PC formatted 5.25" and 3.5" floppy disks, SD/MMC cards up to 1 GiB in size and IDE/SATA Hard Drives up to about 2 TiB all have 512 byte blocks.

This library does not support devices with a block size other than 512 bytes.

Fields

contents: [u8; 512]

The 512 bytes in this block (or sector).

Methods

impl Block[src]

pub const LEN: usize[src]

All our blocks are a fixed length of 512 bytes. We do not support 'Advanced Format' Hard Drives with 4 KiB blocks, nor weird old pre-3.5-inch floppy disk formats.

pub const LEN_U32: u32[src]

Sometimes we want LEN as a u32 and the casts don't look nice.

pub fn new() -> Block[src]

Create a new block full of zeros.

Trait Implementations

impl Clone for Block[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for Block[src]

impl Deref for Block[src]

type Target = [u8; 512]

The resulting type after dereferencing.

impl DerefMut for Block[src]

impl Default for Block[src]

Auto Trait Implementations

impl Send for Block

impl Sync for Block

Blanket Implementations

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]