pub struct Reader<'dev, 'd, A, M>where
A: UsbHostAllocator<'d>,
M: RawMutex,{ /* private fields */ }Expand description
Port reader half.
Implementations§
Source§impl<'dev, 'd, A, M> Reader<'dev, 'd, A, M>where
A: UsbHostAllocator<'d>,
M: RawMutex,
impl<'dev, 'd, A, M> Reader<'dev, 'd, A, M>where
A: UsbHostAllocator<'d>,
M: RawMutex,
Sourcepub async fn read(&mut self, buf: &mut [u8]) -> Result<usize, FtdiError>
pub async fn read(&mut self, buf: &mut [u8]) -> Result<usize, FtdiError>
Read data from the UART, automatically stripping the 2-byte FTDI status header.
Sourcepub fn last_modem_status(&self) -> ModemStatus
pub fn last_modem_status(&self) -> ModemStatus
Last observed modem status from received packets.
Sourcepub fn last_line_status(&self) -> LineStatus
pub fn last_line_status(&self) -> LineStatus
Last observed line status from received packets.
Trait Implementations§
Source§impl<'dev, 'd, A, M> ErrorType for Reader<'dev, 'd, A, M>where
A: UsbHostAllocator<'d>,
M: RawMutex,
Available on crate feature embedded-io only.
impl<'dev, 'd, A, M> ErrorType for Reader<'dev, 'd, A, M>where
A: UsbHostAllocator<'d>,
M: RawMutex,
Available on crate feature
embedded-io only.Source§impl<'dev, 'd, A, M> Read for Reader<'dev, 'd, A, M>where
A: UsbHostAllocator<'d>,
M: RawMutex,
Available on crate feature embedded-io only.
impl<'dev, 'd, A, M> Read for Reader<'dev, 'd, A, M>where
A: UsbHostAllocator<'d>,
M: RawMutex,
Available on crate feature
embedded-io only.Source§async fn read(&mut self, buf: &mut [u8]) -> Result<usize, Self::Error>
async fn read(&mut self, buf: &mut [u8]) -> Result<usize, Self::Error>
Read some bytes from this source into the specified buffer, returning how many bytes were read. Read more
Source§async fn read_exact(
&mut self,
buf: &mut [u8],
) -> Result<(), ReadExactError<Self::Error>>
async fn read_exact( &mut self, buf: &mut [u8], ) -> Result<(), ReadExactError<Self::Error>>
Read the exact number of bytes required to fill
buf. Read moreAuto Trait Implementations§
impl<'dev, 'd, A, M> Forget for Reader<'dev, 'd, A, M>
impl<'dev, 'd, A, M> Freeze for Reader<'dev, 'd, A, M>
impl<'dev, 'd, A, M> Move for Reader<'dev, 'd, A, M>
impl<'dev, 'd, A, M> RefUnwindSafe for Reader<'dev, 'd, A, M>where
<A as UsbHostAllocator<'d>>::Pipe<Bulk, In>: RefUnwindSafe,
PhantomData<(&'dev (), M)>: RefUnwindSafe,
impl<'dev, 'd, A, M> Send for Reader<'dev, 'd, A, M>
impl<'dev, 'd, A, M> Sync for Reader<'dev, 'd, A, M>
impl<'dev, 'd, A, M> Unpin for Reader<'dev, 'd, A, M>
impl<'dev, 'd, A, M> UnsafeUnpin for Reader<'dev, 'd, A, M>where
<A as UsbHostAllocator<'d>>::Pipe<Bulk, In>: UnsafeUnpin,
PhantomData<(&'dev (), M)>: UnsafeUnpin,
impl<'dev, 'd, A, M> UnwindSafe for Reader<'dev, 'd, A, M>where
<A as UsbHostAllocator<'d>>::Pipe<Bulk, In>: UnwindSafe,
PhantomData<(&'dev (), M)>: UnwindSafe,
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