[][src]Struct fizyr_rpc::transport::StreamTransport

pub struct StreamTransport<Stream> { /* fields omitted */ }

Transport layer for byte-stream sockets.

Implementations

impl<Stream> StreamTransport<Stream> where
    Self: Transport
[src]

pub fn new(stream: Stream, config: StreamConfig) -> Self[src]

Create a new transport with custom configuration.

pub fn new_default(stream: Stream) -> Self[src]

Create a new transport using the default configuration.

Trait Implementations

impl<'a, Address> Connect<'a, Address> for StreamTransport<UnixStream> where
    Address: AsRef<Path> + 'a, 
[src]

type Future = Pin<Box<dyn Future<Output = Result<Self>> + 'a>>

The type of the future returned by Self::connect.

impl<'a, Address> Connect<'a, Address> for StreamTransport<TcpStream> where
    Address: ToSocketAddrs + 'a, 
[src]

type Future = Pin<Box<dyn Future<Output = Result<Self>> + 'a>>

The type of the future returned by Self::connect.

impl Transport for StreamTransport<UnixStream>[src]

type Body = StreamBody

The body type for the messages.

type Config = StreamConfig

The configuration type for the transport.

type ReadHalf = ReadHalfType

The type of the read half of the transport.

type WriteHalf = WriteHalfType

The type of the write half of the transport.

impl Transport for StreamTransport<TcpStream>[src]

type Body = StreamBody

The body type for the messages.

type Config = StreamConfig

The configuration type for the transport.

type ReadHalf = ReadHalfType

The type of the read half of the transport.

type WriteHalf = WriteHalfType

The type of the write half of the transport.

Auto Trait Implementations

impl<Stream> RefUnwindSafe for StreamTransport<Stream> where
    Stream: RefUnwindSafe
[src]

impl<Stream> Send for StreamTransport<Stream> where
    Stream: Send
[src]

impl<Stream> Sync for StreamTransport<Stream> where
    Stream: Sync
[src]

impl<Stream> Unpin for StreamTransport<Stream> where
    Stream: Unpin
[src]

impl<Stream> UnwindSafe for StreamTransport<Stream> where
    Stream: UnwindSafe
[src]

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, 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.