Struct libp2p_rs::mplex::Mplex [−][src]
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: MultiaddrThe 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: MultiaddrThe remote multiaddr of this connection
local_priv_key: KeypairThe private key of the local
local_peer_id: PeerIdFor convenience, the local peer ID, generated from local pub key
remote_pub_key: PublicKeyThe public key of the remote.
remote_peer_id: PeerIdFor convenience, put a PeerId here, which is actually calculated from remote_key
Implementations
impl<C> Mplex<C> where
C: SplittableReadWrite + ConnectionInfo + SecureInfo, [src]
C: SplittableReadWrite + ConnectionInfo + SecureInfo,
Trait Implementations
impl<C> Clone for Mplex<C> where
C: SplitEx, [src]
C: SplitEx,
impl<C> ConnectionInfo for Mplex<C> where
C: SplitEx, [src]
C: SplitEx,
pub fn local_multiaddr(&self) -> Multiaddr[src]
pub fn remote_multiaddr(&self) -> Multiaddr[src]
impl<C> Debug for Mplex<C> where
C: SplitEx, [src]
C: SplitEx,
impl<C> SecureInfo for Mplex<C> where
C: SplitEx, [src]
C: SplitEx,
pub fn local_peer(&self) -> PeerId[src]
pub fn remote_peer(&self) -> PeerId[src]
pub fn local_priv_key(&self) -> Keypair[src]
pub fn remote_pub_key(&self) -> PublicKey[src]
impl<C> StreamMuxer for Mplex<C> where
C: SplittableReadWrite, [src]
C: SplittableReadWrite,
pub fn open_stream<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<Box<dyn ReadWriteEx + 'static, Global>, TransportError>> + 'async_trait + Send, Global>> where
'life0: 'async_trait,
Mplex<C>: 'async_trait, [src]
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<Box<dyn ReadWriteEx + 'static, Global>, TransportError>> + 'async_trait + Send, Global>> where
'life0: 'async_trait,
Mplex<C>: 'async_trait,
pub fn accept_stream<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<Box<dyn ReadWriteEx + 'static, Global>, TransportError>> + 'async_trait + Send, Global>> where
'life0: 'async_trait,
Mplex<C>: 'async_trait, [src]
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<Box<dyn ReadWriteEx + 'static, Global>, TransportError>> + 'async_trait + Send, Global>> where
'life0: 'async_trait,
Mplex<C>: 'async_trait,
pub fn close<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<(), TransportError>> + 'async_trait + Send, Global>> where
'life0: 'async_trait,
Mplex<C>: 'async_trait, [src]
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<(), TransportError>> + 'async_trait + Send, Global>> where
'life0: 'async_trait,
Mplex<C>: 'async_trait,
pub fn task(
&mut self
) -> Option<Pin<Box<dyn Future<Output = ()> + 'static + Send, Global>>>[src]
&mut self
) -> Option<Pin<Box<dyn Future<Output = ()> + 'static + Send, Global>>>
pub fn box_clone(&self) -> Box<dyn StreamMuxerEx + 'static, Global>[src]
impl<C> StreamMuxerEx for Mplex<C> where
C: SplittableReadWrite, [src]
C: SplittableReadWrite,
Auto Trait Implementations
impl<C> !RefUnwindSafe for Mplex<C>
impl<C> Send for Mplex<C>
impl<C> !Sync for Mplex<C>
impl<C> Unpin for Mplex<C>
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> Pointable for T
pub const ALIGN: usize
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
pub unsafe fn drop(ptr: usize)
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>,