[][src]Enum backplane::WriteStream

pub enum WriteStream {
    File(File),
    Udp((UdpSocket, SocketAddrV4)),
    Tcp(TcpStream),
    Null,
}

A write stream, wrapped in an enum to allow multiple write streams to be returned from functions while still allowing the calling function to defer the choice of stream.

This is the closed, static way to do this- the open, dynamic way would be trait objects.

Variants

File(File)Udp((UdpSocket, SocketAddrV4))Tcp(TcpStream)Null

Methods

impl WriteStream[src]

pub fn stream_send(&mut self, packet: &Vec<u8>) -> Result<usize, String>[src]

Trait Implementations

impl Default for WriteStream[src]

impl Debug for WriteStream[src]

impl FromStr for WriteStream[src]

type Err = String

The associated error which can be returned from parsing.

Auto Trait Implementations

Blanket Implementations

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

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

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.

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

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

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