pub enum EitherTransport {
Serial(SerialTransport),
Mock(MockTransport),
}Expand description
A transport that can be USB serial, Bluetooth RFCOMM, or a programmed mock transport used by integration tests.
Variants§
Serial(SerialTransport)
USB CDC ACM serial.
Mock(MockTransport)
Programmed mock transport (integration tests, CLI --mock-radio).
Trait Implementations§
Source§impl Debug for EitherTransport
impl Debug for EitherTransport
Source§impl Transport for EitherTransport
impl Transport for EitherTransport
Source§fn set_baud_rate(&mut self, baud: u32) -> Result<(), TransportError>
fn set_baud_rate(&mut self, baud: u32) -> Result<(), TransportError>
Change the transport baud rate. Read more
Source§async fn write(&mut self, data: &[u8]) -> Result<(), TransportError>
async fn write(&mut self, data: &[u8]) -> Result<(), TransportError>
Send raw bytes to the radio.
Auto Trait Implementations§
impl Freeze for EitherTransport
impl !RefUnwindSafe for EitherTransport
impl Send for EitherTransport
impl Sync for EitherTransport
impl Unpin for EitherTransport
impl !UnwindSafe for EitherTransport
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