Struct distant_core::Transport[][src]

pub struct Transport<T, U>(_)
where
    T: DataStream,
    U: Codec
;
Expand description

Represents a transport of data across the network

Implementations

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 stream to the given buffer size

Establishes a connection to one of the specified addresses and uses the provided codec for transportation

Returns the address of the peer the transport is connected to

Creates a new instance of the transport, wrapping the stream in a Framed<T, XChaCha20Poly1305Codec>

Sends some data across the wire, waiting for it to completely send

Receives some data from out on the wire, waiting until it’s available, returning none if the transport is now closed

Returns a textual description of the transport’s underlying connection

Splits transport into read and write halves

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.