[][src]Struct libp2prs_swarm::substream::Substream

pub struct Substream { /* fields omitted */ }

Substream is the logical channel for the p2p connection. SubstreamMeta contains the meta information of the substream and IReadWrite provides the I/O operation to Substream.

Implementations

impl Substream[src]

pub fn to_view(&self) -> SubstreamView[src]

Builds a SubstreamView struct.

pub fn protocol(&self) -> &ProtocolId[src]

Returns the protocol of the sub stream.

pub fn dir(&self) -> Direction[src]

Returns the direction of the sub stream.

pub fn cid(&self) -> ConnectionId[src]

Returns the connection id of the sub stream.

pub fn id(&self) -> StreamId[src]

Returns the sub stream Id.

pub fn remote_multiaddr(&self) -> Multiaddr[src]

Returns the remote multiaddr of the sub stream.

pub fn local_multiaddr(&self) -> Multiaddr[src]

Returns the remote multiaddr of the sub stream.

pub fn remote_peer(&self) -> PeerId[src]

Returns the remote multiaddr of the sub stream.

pub fn info(&self) -> SubstreamInfo[src]

Returns the info of the sub stream.

Trait Implementations

impl Clone for Substream[src]

impl Debug for Substream[src]

impl Drop for Substream[src]

impl ReadEx for Substream[src]

impl WriteEx for Substream[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pointable for T[src]

type Init = T

The type for initializers.

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,