[−][src]Struct libp2prs_mplex::Mplex
A Mplex connection.
This implementation isn't capable of detecting when the underlying socket changes its address,
and no [StreamMuxerEvent::AddressChange
] event is ever emitted.
Fields
la: Multiaddr
The secure&connection info provided by underlying socket. The socket is moved into Connection, so we have to make a copy of these information
The local multiaddr of this connection
ra: Multiaddr
The remote multiaddr of this connection
local_priv_key: Keypair
The private key of the local
local_peer_id: PeerId
For convenience, the local peer ID, generated from local pub key
remote_pub_key: PublicKey
The public key of the remote.
remote_peer_id: PeerId
For convenience, put a PeerId here, which is actually calculated from remote_key
Implementations
impl<C: ConnectionInfo + SecureInfo + SplittableReadWrite> Mplex<C>
[src]
Trait Implementations
impl<C: SplitEx> Clone for Mplex<C>
[src]
fn clone(&self) -> Self
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<C: SplitEx> ConnectionInfo for Mplex<C>
[src]
fn local_multiaddr(&self) -> Multiaddr
[src]
fn remote_multiaddr(&self) -> Multiaddr
[src]
impl<C: SplitEx> Debug for Mplex<C>
[src]
impl<C: SplitEx> SecureInfo for Mplex<C>
[src]
fn local_peer(&self) -> PeerId
[src]
fn remote_peer(&self) -> PeerId
[src]
fn local_priv_key(&self) -> Keypair
[src]
fn remote_pub_key(&self) -> PublicKey
[src]
impl<C: SplittableReadWrite> StreamMuxer for Mplex<C>
[src]
fn open_stream<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<IReadWrite, TransportError>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<IReadWrite, TransportError>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn accept_stream<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<IReadWrite, TransportError>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<IReadWrite, TransportError>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn close<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<(), TransportError>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<(), TransportError>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn task(&mut self) -> Option<BoxFuture<'static, ()>>
[src]
fn box_clone(&self) -> IStreamMuxer
[src]
impl<C: SplittableReadWrite> StreamMuxerEx for Mplex<C>
[src]
Auto Trait Implementations
impl<C> !RefUnwindSafe for Mplex<C>
impl<C> Send for Mplex<C> where
<C as SplitEx>::Writer: Send,
<C as SplitEx>::Writer: Send,
impl<C> !Sync for Mplex<C>
impl<C> Unpin for Mplex<C> where
<C as SplitEx>::Writer: Unpin,
<C as SplitEx>::Writer: Unpin,
impl<C> !UnwindSafe for Mplex<C>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,