[−][src]Struct libp2p_core::nodes::raw_swarm::PeerConnected
Access to a peer we are connected to.
Methods
impl<'a, TTrans, TInEvent, TOutEvent, THandler, THandlerErr, TConnInfo, TPeerId> PeerConnected<'a, TTrans, TInEvent, TOutEvent, THandler, THandlerErr, TConnInfo, TPeerId> where
TTrans: Transport,
TConnInfo: ConnectionInfo<PeerId = TPeerId>,
TPeerId: Eq + Hash,
[src]
TTrans: Transport,
TConnInfo: ConnectionInfo<PeerId = TPeerId>,
TPeerId: Eq + Hash,
pub fn close(self)
[src]
Closes the connection to this node.
No NodeClosed
message will be generated for this node.
pub fn connection_info(&mut self) -> TConnInfo where
TConnInfo: Clone,
[src]
TConnInfo: Clone,
Returns the connection info for this node.
pub fn endpoint(&self) -> &ConnectedPoint
[src]
Returns the endpoint we're connected to.
pub fn send_event(&mut self, event: TInEvent)
[src]
Sends an event to the node.
Auto Trait Implementations
impl<'a, TTrans, TInEvent, TOutEvent, THandler, THandlerErr, TConnInfo, TPeerId> Send for PeerConnected<'a, TTrans, TInEvent, TOutEvent, THandler, THandlerErr, TConnInfo, TPeerId> where
TConnInfo: Send,
THandler: Send,
THandlerErr: Send,
TInEvent: Send,
TOutEvent: Send,
TPeerId: Send,
<TTrans as Transport>::Error: Send,
TConnInfo: Send,
THandler: Send,
THandlerErr: Send,
TInEvent: Send,
TOutEvent: Send,
TPeerId: Send,
<TTrans as Transport>::Error: Send,
impl<'a, TTrans, TInEvent, TOutEvent, THandler, THandlerErr, TConnInfo, TPeerId> !Sync for PeerConnected<'a, TTrans, TInEvent, TOutEvent, THandler, THandlerErr, TConnInfo, TPeerId>
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for 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.
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.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Same<T> for T
type Output = T
Should always be Self