[][src]Struct wishbone_bridge::EthernetBridge

pub struct EthernetBridge { /* fields omitted */ }

A builder to create a connection to a target via Ethernet, either using TCP or UDP. The EthernetBridge struct also describes connections to proxy servers that relay Wishbone packets over Ethernet, such as remote USB-to-Ethernet bridges.

use wishbone_bridge::EthernetBridge;
let bridge = EthernetBridge::new("192.168.50.100:1234").unwrap().create().unwrap();

Implementations

impl EthernetBridge[src]

Describes all configuration parameters required to connect to a Wishbone bridge via Ethernet. The protocol defaults to UDP, which is what most embedded hardware uses. Set the protocol to TCP by using .protocol().

pub fn new<A: ToSocketAddrs>(addr: A) -> Result<EthernetBridge, BridgeError>[src]

pub fn port(&mut self, new_port: u16) -> &mut EthernetBridge[src]

Set the remote port for the target device.

pub fn protocol(&mut self, prot: EthernetBridgeProtocol) -> &mut EthernetBridge[src]

Set the protocol to be used to connect to the remote device.

pub fn create(&self) -> Result<Bridge, BridgeError>[src]

Create a new Bridge based on the current configuration.

Trait Implementations

impl Clone for EthernetBridge[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.