pub trait ConnectionCommon<In, Out>: ConnectionErrors {
type RecvStream: Stream<Item = Result<In, Self::RecvError>> + Send + Sync + Unpin + 'static;
type SendSink: Sink<Out, Error = Self::SendError> + Send + Sync + Unpin + 'static;
}
Expand description
Types that are common to both Connection
and ServerEndpoint
.
Having this as a separate trait is useful when writing generic code that works with both.
Required Associated Types§
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.