pub struct Tube {
    socket: StreamChannel,
}
Expand description

Bidirectional tube that support both send and recv.

Fields

socket: StreamChannel

Implementations

Create a pair of connected tubes. Request is sent in one direction while response is in the other direction.

Create a new Tube from a StreamChannel. The StreamChannel must use FramingMode::Message (meaning, must use a SOCK_SEQPACKET as the underlying socket type), otherwise, this method returns an error.

Create a new Tube from a UnixSeqpacket. The StreamChannel is implicitly constructed to have the right FramingMode by being constructed from a UnixSeqpacket.

👎Deprecated

DO NOT USE this method directly as it will become private soon (b/221484449). Use a directional Tube pair instead.

Creates a Send/Recv pair of Tubes.

Trait Implementations

Returns the underlying raw descriptor. Read more
Extracts the raw file descriptor. Read more
Deserialize this value from the given Serde deserializer. Read more
Gets a descriptor that can be used in EventContext to wait for events to be available (e.g. to avoid receive_events blocking). Read more
Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Returns the underlying raw descriptors. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

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.