pub enum SerialDevice {
Brain {
user_port: String,
system_port: String,
},
Controller {
system_port: String,
},
Unknown {
system_port: String,
},
}Expand description
Represents a V5 device that can be connected to over serial.
Variants§
Brain
V5 Brain
Has both a system and user port.
Controller
V5 Controller
Has a system port, but no user port.
Unknown
Unknown V5 Peripheral.
A secret, more sinsiter, third thing. Probably doesn’t even exist. How’d you even get this to happen?
Has a system port and no user port but is not a controller.
Implementations§
Source§impl SerialDevice
impl SerialDevice
pub fn connect( &self, timeout: Duration, ) -> Result<SerialConnection, SerialError>
pub fn system_port(&self) -> String
pub fn user_port(&self) -> Option<String>
Trait Implementations§
Source§impl Clone for SerialDevice
impl Clone for SerialDevice
Source§fn clone(&self) -> SerialDevice
fn clone(&self) -> SerialDevice
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SerialDevice
impl Debug for SerialDevice
Source§impl From<SerialDevice> for GenericDevice
impl From<SerialDevice> for GenericDevice
Source§fn from(d: SerialDevice) -> Self
fn from(d: SerialDevice) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for SerialDevice
impl RefUnwindSafe for SerialDevice
impl Send for SerialDevice
impl Sync for SerialDevice
impl Unpin for SerialDevice
impl UnwindSafe for SerialDevice
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