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§
Provided Methods§
Sourcefn map<In1, Out1>(self) -> MappedConnector<In1, Out1, Self>
fn map<In1, Out1>(self) -> MappedConnector<In1, Out1, Self>
Map the input and output types of this connection
Sourcefn boxed(self) -> BoxedConnector<Self::In, Self::Out>
fn boxed(self) -> BoxedConnector<Self::In, Self::Out>
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§
impl<A: Connector, B: Connector<In = A::In, Out = A::Out>> Connector for CombinedConnector<A, B>
impl<In, Out, C> Connector for MappedConnector<In, Out, C>
impl<In: RpcMessage, Out: RpcMessage> Connector for BoxedConnector<In, Out>
impl<In: RpcMessage, Out: RpcMessage> Connector for FlumeConnector<In, Out>
Available on crate feature
flume-transport
only.impl<In: RpcMessage, Out: RpcMessage> Connector for HyperConnector<In, Out>
Available on crate feature
hyper-transport
only.impl<In: RpcMessage, Out: RpcMessage> Connector for IrohConnector<In, Out>
Available on crate feature
iroh-transport
only.impl<In: RpcMessage, Out: RpcMessage> Connector for QuinnConnector<In, Out>
Available on crate feature
quinn-transport
only.