Struct distant_net::FramedTransport
source · [−]pub struct FramedTransport<T, C>(_)
where
T: RawTransport,
C: Codec;
Expand description
Represents [TypedTransport
] of data across the network using frames in order to support
typed messages instead of arbitrary bytes being sent across the wire.
Note that this type does not implement RawTransport
and instead acts as a wrapper
around a transport to provide a higher-level interface
Implementations
sourceimpl<T, C> FramedTransport<T, C> where
T: RawTransport,
C: Codec,
impl<T, C> FramedTransport<T, C> where
T: RawTransport,
C: Codec,
sourceimpl FramedTransport<InmemoryTransport, PlainCodec>
impl FramedTransport<InmemoryTransport, PlainCodec>
sourcepub fn pair(
buffer: usize
) -> (FramedTransport<InmemoryTransport, PlainCodec>, FramedTransport<InmemoryTransport, PlainCodec>)
pub fn pair(
buffer: usize
) -> (FramedTransport<InmemoryTransport, PlainCodec>, FramedTransport<InmemoryTransport, PlainCodec>)
Produces a pair of inmemory transports that are connected to each other using a standard codec
Sets the buffer for message passing for each underlying transport to the given buffer size
Trait Implementations
sourceimpl<T: Debug, C: Debug> Debug for FramedTransport<T, C> where
T: RawTransport,
C: Codec,
impl<T: Debug, C: Debug> Debug for FramedTransport<T, C> where
T: RawTransport,
C: Codec,
sourceimpl<T, C> IntoSplit for FramedTransport<T, C> where
T: RawTransport + IntoSplit,
<T as IntoSplit>::Read: RawTransportRead,
<T as IntoSplit>::Write: RawTransportWrite,
C: Codec + Send,
impl<T, C> IntoSplit for FramedTransport<T, C> where
T: RawTransport + IntoSplit,
<T as IntoSplit>::Read: RawTransportRead,
<T as IntoSplit>::Write: RawTransportWrite,
C: Codec + Send,
type Read = FramedTransportReadHalf<<T as IntoSplit>::Read, C>
type Write = FramedTransportWriteHalf<<T as IntoSplit>::Write, C>
fn into_split(self) -> (Self::Write, Self::Read)
sourceimpl<T, C> UntypedTransportRead for FramedTransport<T, C> where
T: RawTransport + Send,
C: Codec + Send,
impl<T, C> UntypedTransportRead for FramedTransport<T, C> where
T: RawTransport + Send,
C: Codec + Send,
sourceimpl<T, C> UntypedTransportWrite for FramedTransport<T, C> where
T: RawTransport + Send,
C: Codec + Send,
impl<T, C> UntypedTransportWrite for FramedTransport<T, C> where
T: RawTransport + Send,
C: Codec + Send,
impl<T, C> UntypedTransport for FramedTransport<T, C> where
T: RawTransport,
C: Codec + Send,
Auto Trait Implementations
impl<T, C> RefUnwindSafe for FramedTransport<T, C> where
C: RefUnwindSafe,
T: RefUnwindSafe,
impl<T, C> Send for FramedTransport<T, C> where
C: Send,
impl<T, C> Sync for FramedTransport<T, C> where
C: Sync,
T: Sync,
impl<T, C> Unpin for FramedTransport<T, C>
impl<T, C> UnwindSafe for FramedTransport<T, C> where
C: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more