pub enum AnyLink {
Serial(SerialFrameLink<SerialStream>),
Ble(BleFrameLink),
Unavailable,
}Expand description
Every transport this tool can open, as one type, so a REPL can move between them without the session being generic over the link.
Variants§
Serial(SerialFrameLink<SerialStream>)
Ble(BleFrameLink)
Keeps the type inhabited in a build with no transport feature. Never constructed.
Trait Implementations§
Source§impl FrameLink for AnyLink
impl FrameLink for AnyLink
Source§async fn send_frame(&mut self, frame: &[u8]) -> Result<(), UlcpError>
async fn send_frame(&mut self, frame: &[u8]) -> Result<(), UlcpError>
Send one complete ULCP frame.
Source§fn poll_recv_frame(
&mut self,
cx: &mut Context<'_>,
) -> Poll<Result<Vec<u8>, UlcpError>>
fn poll_recv_frame( &mut self, cx: &mut Context<'_>, ) -> Poll<Result<Vec<u8>, UlcpError>>
Poll for the next complete ULCP frame. Read more
§async fn recv_frame(&mut self) -> Result<Vec<u8>, UlcpError>
async fn recv_frame(&mut self) -> Result<Vec<u8>, UlcpError>
Receive the next complete ULCP frame.
Auto Trait Implementations§
impl Freeze for AnyLink
impl !RefUnwindSafe for AnyLink
impl Send for AnyLink
impl Sync for AnyLink
impl Unpin for AnyLink
impl !UnwindSafe for AnyLink
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more