pub struct Card<'a> { /* private fields */ }Implementations§
Source§impl Card<'_>
impl Card<'_>
pub fn new<'a>(p: &Board, cs: PinID, spi: impl Into<SpiBus<'a>>) -> Card<'a>
pub fn new_crc<'a>( p: &Board, cs: PinID, spi: impl Into<SpiBus<'a>>, crc: bool, ) -> Card<'a>
pub fn bus(&self) -> &Spi
pub fn blocks(&mut self) -> Result<u32, CardError>
pub fn info(&mut self) -> Result<CardInfo, CardError>
pub fn write_block(&mut self, b: &Block, start: u32) -> Result<(), CardError>
pub fn read_block(&mut self, b: &mut Block, start: u32) -> Result<(), CardError>
pub fn write_blocks(&mut self, b: &[Block], start: u32) -> Result<(), CardError>
pub fn read_blocks( &mut self, b: &mut [Block], start: u32, ) -> Result<(), CardError>
Trait Implementations§
Source§impl BlockDevice for Card<'_>
impl BlockDevice for Card<'_>
fn blocks(&mut self) -> Result<u32, DeviceError>
fn write(&mut self, b: &[Block], start: u32) -> Result<(), DeviceError>
fn read(&mut self, b: &mut [Block], start: u32) -> Result<(), DeviceError>
fn write_single(&mut self, b: &Block, start: u32) -> Result<(), DeviceError>
fn read_single(&mut self, b: &mut Block, start: u32) -> Result<(), DeviceError>
Auto Trait Implementations§
impl<'a> Freeze for Card<'a>
impl<'a> !RefUnwindSafe for Card<'a>
impl<'a> !Send for Card<'a>
impl<'a> !Sync for Card<'a>
impl<'a> Unpin for Card<'a>
impl<'a> !UnwindSafe for Card<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more