pub enum GenericDevice {
Bluetooth(BluetoothDevice),
Serial(SerialDevice),
}
Variants§
Bluetooth(BluetoothDevice)
Serial(SerialDevice)
Implementations§
Source§impl GenericDevice
impl GenericDevice
pub async fn connect( &self, timeout: Duration, ) -> Result<GenericConnection, GenericError>
Trait Implementations§
Source§impl Clone for GenericDevice
impl Clone for GenericDevice
Source§fn clone(&self) -> GenericDevice
fn clone(&self) -> GenericDevice
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 GenericDevice
impl Debug for GenericDevice
Source§impl From<BluetoothDevice> for GenericDevice
impl From<BluetoothDevice> for GenericDevice
Source§fn from(d: BluetoothDevice) -> Self
fn from(d: BluetoothDevice) -> Self
Converts to this type from the input type.
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 GenericDevice
impl !RefUnwindSafe for GenericDevice
impl Send for GenericDevice
impl Sync for GenericDevice
impl Unpin for GenericDevice
impl !UnwindSafe for GenericDevice
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