[][src]Struct tarpc::serde_transport::Transport

pub struct Transport<S, Item, SinkItem, Codec> { /* fields omitted */ }
This is supported on crate feature serde-transport only.

A transport that serializes to, and deserializes from, a byte stream.

Implementations

impl<Item, SinkItem, Codec> Transport<TcpStream, Item, SinkItem, Codec>[src]

pub fn peer_addr(&self) -> Result<SocketAddr>[src]

This is supported on crate feature tcp only.

Returns the peer address of the underlying TcpStream.

pub fn local_addr(&self) -> Result<SocketAddr>[src]

This is supported on crate feature tcp only.

Returns the local address of the underlying TcpStream.

impl<S, Item, SinkItem, Codec> Transport<S, Item, SinkItem, Codec>[src]

pub fn get_ref(&self) -> &S[src]

Returns the inner transport over which messages are sent and received.

Trait Implementations

impl<S, Item, SinkItem, Codec> From<(S, Codec)> for Transport<S, Item, SinkItem, Codec> where
    S: AsyncWrite + AsyncRead,
    Item: for<'de> Deserialize<'de>,
    SinkItem: Serialize,
    Codec: Serializer<SinkItem> + Deserializer<Item>, 
[src]

impl<S, Item, SinkItem, Codec, CodecError> Sink<SinkItem> for Transport<S, Item, SinkItem, Codec> where
    S: AsyncWrite,
    SinkItem: Serialize,
    Codec: Serializer<SinkItem>,
    CodecError: Into<Box<dyn Error + Send + Sync>>,
    SerdeFramed<Framed<S, LengthDelimitedCodec>, Item, SinkItem, Codec>: Sink<SinkItem, Error = CodecError>, 
[src]

type Error = Error

The type of value produced by the sink when an error occurs.

impl<S, Item, SinkItem, Codec, CodecError> Stream for Transport<S, Item, SinkItem, Codec> where
    S: AsyncWrite + AsyncRead,
    Item: for<'a> Deserialize<'a>,
    Codec: Deserializer<Item>,
    CodecError: Into<Box<dyn Error + Send + Sync>>,
    SerdeFramed<Framed<S, LengthDelimitedCodec>, Item, SinkItem, Codec>: Stream<Item = Result<Item, CodecError>>, 
[src]

type Item = Result<Item>

Values yielded by the stream.

impl<'pin, S, Item, SinkItem, Codec> Unpin for Transport<S, Item, SinkItem, Codec> where
    __Transport<'pin, S, Item, SinkItem, Codec>: Unpin
[src]

Auto Trait Implementations

impl<S, Item, SinkItem, Codec> RefUnwindSafe for Transport<S, Item, SinkItem, Codec> where
    Codec: RefUnwindSafe,
    Item: RefUnwindSafe,
    S: RefUnwindSafe,
    SinkItem: RefUnwindSafe
[src]

impl<S, Item, SinkItem, Codec> Send for Transport<S, Item, SinkItem, Codec> where
    Codec: Send,
    Item: Send,
    S: Send,
    SinkItem: Send
[src]

impl<S, Item, SinkItem, Codec> Sync for Transport<S, Item, SinkItem, Codec> where
    Codec: Sync,
    Item: Sync,
    S: Sync,
    SinkItem: Sync
[src]

impl<S, Item, SinkItem, Codec> UnwindSafe for Transport<S, Item, SinkItem, Codec> where
    Codec: UnwindSafe,
    Item: UnwindSafe,
    S: UnwindSafe,
    SinkItem: 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, Item> SinkExt<Item> for T where
    T: Sink<Item> + ?Sized
[src]

impl<T> StreamExt for T where
    T: Stream + ?Sized
[src]

impl<St> StreamExt for St where
    St: Stream + ?Sized
[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<S, T, E> TryStream for S where
    S: Stream<Item = Result<T, E>> + ?Sized
[src]

type Ok = T

The type of successful values yielded by this future

type Error = E

The type of failures yielded by this future

impl<S> TryStreamExt for S where
    S: TryStream + ?Sized
[src]

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,