pub struct Serial<UART, TX, RX> { /* private fields */ }Expand description
Serial abstraction
Implementations§
Source§impl<UART: UartX, TX: TxPin<UART>, RX: RxPin<UART>> Serial<UART, TX, RX>
impl<UART: UartX, TX: TxPin<UART>, RX: RxPin<UART>> Serial<UART, TX, RX>
Trait Implementations§
Source§impl<UART: UartX, TX, RX: RxPin<UART>> Read for Serial<UART, TX, RX>
impl<UART: UartX, TX, RX: RxPin<UART>> Read for Serial<UART, TX, RX>
Source§fn read(&mut self, buf: &mut [u8]) -> Result<usize, Self::Error>
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§fn read_exact(
&mut self,
buf: &mut [u8],
) -> Result<(), ReadExactError<Self::Error>>
fn read_exact( &mut self, buf: &mut [u8], ) -> Result<(), ReadExactError<Self::Error>>
Read the exact number of bytes required to fill
buf. Read moreSource§impl<UART: UartX, TX: TxPin<UART>, RX> Write for Serial<UART, TX, RX>
impl<UART: UartX, TX: TxPin<UART>, RX> Write for Serial<UART, TX, RX>
Source§fn write(&mut self, buf: &[u8]) -> Result<usize, Self::Error>
fn write(&mut self, buf: &[u8]) -> Result<usize, Self::Error>
Write a buffer into this writer, returning how many bytes were written. Read more
Source§fn flush(&mut self) -> Result<(), Self::Error>
fn flush(&mut self) -> Result<(), Self::Error>
Flush this output stream, blocking until all intermediately buffered contents reach their destination.
Auto Trait Implementations§
impl<UART, TX, RX> Freeze for Serial<UART, TX, RX>
impl<UART, TX, RX> RefUnwindSafe for Serial<UART, TX, RX>
impl<UART, TX, RX> Send for Serial<UART, TX, RX>
impl<UART, TX, RX> Sync for Serial<UART, TX, RX>
impl<UART, TX, RX> Unpin for Serial<UART, TX, RX>
impl<UART, TX, RX> UnwindSafe for Serial<UART, TX, RX>
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