pub struct Max485<RIDO, REDE, DELAY>{ /* private fields */ }Expand description
Asynchronous driver for MAX485 RS-485 transceivers. Requires a serial port, a RE/DE pin, and a delay provider.
Implementations§
Source§impl<RIDO, REDE, DELAY> Max485<RIDO, REDE, DELAY>
impl<RIDO, REDE, DELAY> Max485<RIDO, REDE, DELAY>
pub fn new(serial: RIDO, pin: REDE, delay: DELAY) -> Self
pub fn into_parts(self) -> (RIDO, REDE, DELAY)
pub fn inner_mut(&mut self) -> &mut RIDO
Trait Implementations§
Source§impl<RIDO, REDE, DELAY> Read for Max485<RIDO, REDE, DELAY>
impl<RIDO, REDE, DELAY> Read for Max485<RIDO, REDE, DELAY>
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 moreSource§impl<RIDO, REDE, DELAY> Write for Max485<RIDO, REDE, DELAY>
impl<RIDO, REDE, DELAY> Write for Max485<RIDO, REDE, DELAY>
Source§async fn write(&mut self, bytes: &[u8]) -> Result<usize, Self::Error>
async fn write(&mut self, bytes: &[u8]) -> Result<usize, Self::Error>
Write a buffer into this writer, returning how many bytes were written. Read more
Source§impl<RIDO, REDE, DELAY> WriteReady for Max485<RIDO, REDE, DELAY>
impl<RIDO, REDE, DELAY> WriteReady for Max485<RIDO, REDE, DELAY>
Auto Trait Implementations§
impl<RIDO, REDE, DELAY> Freeze for Max485<RIDO, REDE, DELAY>
impl<RIDO, REDE, DELAY> RefUnwindSafe for Max485<RIDO, REDE, DELAY>
impl<RIDO, REDE, DELAY> Send for Max485<RIDO, REDE, DELAY>
impl<RIDO, REDE, DELAY> Sync for Max485<RIDO, REDE, DELAY>
impl<RIDO, REDE, DELAY> Unpin for Max485<RIDO, REDE, DELAY>
impl<RIDO, REDE, DELAY> UnwindSafe for Max485<RIDO, REDE, DELAY>
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