[][src]Struct wishbone_bridge::UsbBridge

pub struct UsbBridge { /* fields omitted */ }

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

impl Clone for UsbBridge[src]

impl Default for UsbBridge[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.