[][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 Add<BlockCount> for BlockIdx[src]

type Output = BlockIdx

The resulting type after applying the + operator.

impl AddAssign<BlockCount> for BlockIdx[src]

impl Clone for BlockIdx[src]

impl Copy for BlockIdx[src]

impl Debug for BlockIdx[src]

impl Eq for BlockIdx[src]

impl Ord for BlockIdx[src]

impl PartialEq<BlockIdx> for BlockIdx[src]

impl PartialOrd<BlockIdx> for BlockIdx[src]

impl StructuralEq for BlockIdx[src]

impl StructuralPartialEq for BlockIdx[src]

impl Sub<BlockCount> for BlockIdx[src]

type Output = BlockIdx

The resulting type after applying the - operator.

impl SubAssign<BlockCount> for BlockIdx[src]

Auto Trait Implementations

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.