Skip to main content

Transport

Trait Transport 

Source
pub trait Transport<SinkItem, Item>: Stream<Item = Result<Item, Self::Error>> + Sink<SinkItem, Error = Self::TransportError> {
    type TransportError: Error + Send + Sync + 'static;
}
Expand description

A bidirectional, typed message channel.

STOLEN SHAPE (tarpc Transport): a blanket alias, not a trait to implement. Any Sink<SinkItem, Error = E> + Stream<Item = Result<Item, E>> satisfies it.

Required Associated Types§

Source

type TransportError: Error + Send + Sync + 'static

The error type shared by both directions.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<T, SinkItem, Item, E> Transport<SinkItem, Item> for T
where T: Stream<Item = Result<Item, E>> + Sink<SinkItem, Error = E> + ?Sized, E: Error + Send + Sync + 'static,