pub struct SerialTransport<T> { /* private fields */ }Expand description
A transport layer implementation for serial ports.
Implementations§
Source§impl<T> SerialTransport<T>
impl<T> SerialTransport<T>
Sourcepub fn new(serial: T) -> Self
pub fn new(serial: T) -> Self
Create a new SerialTransport.
§Arguments
serial- A serial port object, likeserialport::SerialPort.
Trait Implementations§
Source§impl<T> Transport for SerialTransport<T>
impl<T> Transport for SerialTransport<T>
Source§fn send_raw_frame(
&mut self,
header: [u8; 8],
data: &[u8],
) -> Result<(), SendError>
fn send_raw_frame( &mut self, header: [u8; 8], data: &[u8], ) -> Result<(), SendError>
Send a raw SMP frame over the bus. Read more
Source§fn recv_raw_frame<'a>(
&mut self,
buffer: &'a mut [u8; 65535],
) -> Result<&'a [u8], ReceiveError>
fn recv_raw_frame<'a>( &mut self, buffer: &'a mut [u8; 65535], ) -> Result<&'a [u8], ReceiveError>
Receive a raw SMP frame from the bus. Read more
Source§fn set_timeout(&mut self, timeout: Duration) -> Result<(), Report>
fn set_timeout(&mut self, timeout: Duration) -> Result<(), Report>
Changes the communication timeout. Read more
Auto Trait Implementations§
impl<T> !Freeze for SerialTransport<T>
impl<T> !RefUnwindSafe for SerialTransport<T>
impl<T> Send for SerialTransport<T>where
T: Send,
impl<T> !Sync for SerialTransport<T>
impl<T> Unpin for SerialTransport<T>where
T: Unpin,
impl<T> UnwindSafe for SerialTransport<T>where
T: 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