quic_rpc::transport

Trait Connector

Source
pub trait Connector: StreamTypes {
    // Required method
    fn open(
        &self,
    ) -> impl Future<Output = Result<(Self::SendSink, Self::RecvStream), Self::OpenError>> + Send;

    // Provided methods
    fn map<In1, Out1>(self) -> MappedConnector<In1, Out1, Self>
       where In1: TryFrom<Self::In>,
             Self::Out: From<Out1> { ... }
    fn boxed(self) -> BoxedConnector<Self::In, Self::Out>
       where Self: BoxableConnector<Self::In, Self::Out> + Sized + 'static { ... }
}
Expand description

A connection to a specific remote machine

A connection can be used to open bidirectional typed channels using Connector::open.

Required Methods§

Source

fn open( &self, ) -> impl Future<Output = Result<(Self::SendSink, Self::RecvStream), Self::OpenError>> + Send

Open a channel to the remote che

Provided Methods§

Source

fn map<In1, Out1>(self) -> MappedConnector<In1, Out1, Self>
where In1: TryFrom<Self::In>, Self::Out: From<Out1>,

Map the input and output types of this connection

Source

fn boxed(self) -> BoxedConnector<Self::In, Self::Out>
where Self: BoxableConnector<Self::In, Self::Out> + Sized + 'static,

Box the connection

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<A: Connector, B: Connector<In = A::In, Out = A::Out>> Connector for CombinedConnector<A, B>

Source§

impl<In, Out, C> Connector for MappedConnector<In, Out, C>
where C: Connector, In: RpcMessage + TryFrom<C::In>, Out: RpcMessage, C::Out: From<Out>,

Source§

impl<In: RpcMessage, Out: RpcMessage> Connector for BoxedConnector<In, Out>

Source§

impl<In: RpcMessage, Out: RpcMessage> Connector for FlumeConnector<In, Out>

Source§

impl<In: RpcMessage, Out: RpcMessage> Connector for HyperConnector<In, Out>

Source§

impl<In: RpcMessage, Out: RpcMessage> Connector for IrohConnector<In, Out>

Source§

impl<In: RpcMessage, Out: RpcMessage> Connector for QuinnConnector<In, Out>