[−][src]Struct wishbone_bridge::UsbBridge
Connect to a target device via USB.
Implementations
impl UsbBridge
[src]
A builder to create a connection to a target via USB. You should specify at least a USB VID or PID in order to avoid connecting to any random device on your system.
use wishbone_bridge::UsbBridge; let bridge = UsbBridge::new().pid(0x1234).create().unwrap();
pub fn new() -> UsbBridge
[src]
Create a new UsbBridge
object that will attempt to connect to
any USB device on the system.
pub fn pid(&mut self, pid: u16) -> &mut UsbBridge
[src]
Specify a USB PID to connect to.
pub fn vid(&mut self, vid: u16) -> &mut UsbBridge
[src]
Specify a USB VID to connect to.
pub fn bus(&mut self, bus: u8) -> &mut UsbBridge
[src]
Limit connections to a specific USB bus number.
pub fn device(&mut self, device: u8) -> &mut UsbBridge
[src]
Limit connections to a specific USB device.
pub fn create(&self) -> Result<Bridge, BridgeError>
[src]
Create a bridge based on the current configuration.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for UsbBridge
impl Send for UsbBridge
impl Sync for UsbBridge
impl Unpin for UsbBridge
impl UnwindSafe for UsbBridge
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,