[][src]Struct usbd_mass_storage::MscClass

pub struct MscClass<'a, B: UsbBus> { /* fields omitted */ }

USB Mass Storage Class Device

So far only tested with the Bulk Only protocol and the SCSI transparent command set - see Scsi and Bulk Only Transport

Methods

impl<'_, B: UsbBus> MscClass<'_, B>[src]

pub fn new(
    alloc: &UsbBusAllocator<B>,
    max_packet_size: u16,
    subclass: InterfaceSubclass,
    protocol: InterfaceProtocol
) -> MscClass<B>
[src]

pub fn max_packet_size(&self) -> u16[src]

pub fn read_packet(&mut self, buf: &mut [u8]) -> Result<usize>[src]

pub fn write_packet(&mut self, buf: &[u8]) -> Result<usize>[src]

pub fn correct_interface_number(&self, interface_number: u16) -> bool[src]

Trait Implementations

impl<'_, B: UsbBus> UsbClass<B> for MscClass<'_, B>[src]

Auto Trait Implementations

impl<'a, B> Send for MscClass<'a, B>

impl<'a, B> Sync for MscClass<'a, B>

impl<'a, B> Unpin for MscClass<'a, B>

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> Same<T> for T[src]

type Output = T

Should always be Self

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.