[][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]

impl Debug for Block[src]

impl Default for Block[src]

impl Deref for Block[src]

type Target = [u8; 512]

The resulting type after dereferencing.

impl DerefMut for Block[src]

Auto Trait Implementations

impl RefUnwindSafe for Block

impl Send for Block

impl Sync for Block

impl Unpin for Block

impl UnwindSafe for Block

Blanket Implementations

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

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

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

impl<T> From<T> for T[src]

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.