[][src]Struct embedded_sdmmc::BlockIdx

pub struct BlockIdx(pub u32);

Represents the linear numeric address of a block (or sector). The first block on a disk gets BlockIdx(0) (which usually contains the Master Boot Record).

Methods

impl BlockIdx[src]

pub fn into_bytes(self) -> u64[src]

Convert a block index into a 64-bit byte offset from the start of the volume. Useful if your underlying block device actually works in bytes, like open("/dev/mmcblk0") does on Linux.

pub fn range(self, num: BlockCount) -> BlockIter[src]

Create an iterator from the current BlockIdx through the given number of blocks.

Trait Implementations

impl Copy for BlockIdx[src]

impl Clone for BlockIdx[src]

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

Performs copy-assignment from source. Read more

impl PartialEq<BlockIdx> for BlockIdx[src]

impl Eq for BlockIdx[src]

impl Ord for BlockIdx[src]

fn max(self, other: Self) -> Self
1.21.0
[src]

Compares and returns the maximum of two values. Read more

fn min(self, other: Self) -> Self
1.21.0
[src]

Compares and returns the minimum of two values. Read more

impl PartialOrd<BlockIdx> for BlockIdx[src]

impl Debug for BlockIdx[src]

impl Add<BlockCount> for BlockIdx[src]

type Output = BlockIdx

The resulting type after applying the + operator.

impl Sub<BlockCount> for BlockIdx[src]

type Output = BlockIdx

The resulting type after applying the - operator.

impl AddAssign<BlockCount> for BlockIdx[src]

impl SubAssign<BlockCount> for BlockIdx[src]

Auto Trait Implementations

impl Send for BlockIdx

impl Sync for BlockIdx

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]