[−][src]Struct libp2p::core::nodes::collection::CollectionReachEvent
Event that happens when we reach a node.
Methods
impl<'a, TInEvent, TOutEvent, THandler, TReachErr, THandlerErr, TUserData, TConnInfo, TPeerId> CollectionReachEvent<'a, TInEvent, TOutEvent, THandler, TReachErr, THandlerErr, TUserData, TConnInfo, TPeerId>
[src]
pub fn connection_info(&self) -> &TConnInfo
[src]
Returns the information of the connection.
pub fn peer_id(&self) -> &TPeerId where
TConnInfo: ConnectionInfo<PeerId = TPeerId>,
TPeerId: Eq + Hash,
[src]
TConnInfo: ConnectionInfo<PeerId = TPeerId>,
TPeerId: Eq + Hash,
Returns the identity of the node we connected to.
pub fn reach_attempt_id(&self) -> ReachAttemptId
[src]
Returns the reach attempt that reached the node.
impl<'a, TInEvent, TOutEvent, THandler, TReachErr, THandlerErr, TUserData, TConnInfo, TPeerId> CollectionReachEvent<'a, TInEvent, TOutEvent, THandler, TReachErr, THandlerErr, TUserData, TConnInfo, TPeerId> where
TConnInfo: ConnectionInfo<PeerId = TPeerId>,
TPeerId: Eq + Hash,
[src]
TConnInfo: ConnectionInfo<PeerId = TPeerId>,
TPeerId: Eq + Hash,
pub fn would_replace(&self) -> bool
[src]
Returns true
if accepting this reached node would replace an existing connection to that
node.
pub fn accept(
self,
user_data: TUserData
) -> (CollectionNodeAccept<TConnInfo, TUserData>, TConnInfo) where
TConnInfo: Clone,
TPeerId: Clone,
[src]
self,
user_data: TUserData
) -> (CollectionNodeAccept<TConnInfo, TUserData>, TConnInfo) where
TConnInfo: Clone,
TPeerId: Clone,
Accepts the new node.
pub fn deny(self) -> TConnInfo
[src]
Denies the node.
Has the same effect as dropping the event without accepting it.
Trait Implementations
impl<'a, TInEvent, TOutEvent, THandler, TReachErr, THandlerErr, TUserData, TConnInfo, TPeerId> Drop for CollectionReachEvent<'a, TInEvent, TOutEvent, THandler, TReachErr, THandlerErr, TUserData, TConnInfo, TPeerId>
[src]
impl<'a, TInEvent, TOutEvent, THandler, TReachErr, THandlerErr, TUserData, TConnInfo, TPeerId> Debug for CollectionReachEvent<'a, TInEvent, TOutEvent, THandler, TReachErr, THandlerErr, TUserData, TConnInfo, TPeerId> where
TConnInfo: Debug,
[src]
TConnInfo: Debug,
Auto Trait Implementations
impl<'a, TInEvent, TOutEvent, THandler, TReachErr, THandlerErr, TUserData, TConnInfo, TPeerId> Send for CollectionReachEvent<'a, TInEvent, TOutEvent, THandler, TReachErr, THandlerErr, TUserData, TConnInfo, TPeerId> where
TConnInfo: Send,
THandler: Send,
THandlerErr: Send,
TInEvent: Send,
TOutEvent: Send,
TPeerId: Send,
TReachErr: Send,
TUserData: Send,
TConnInfo: Send,
THandler: Send,
THandlerErr: Send,
TInEvent: Send,
TOutEvent: Send,
TPeerId: Send,
TReachErr: Send,
TUserData: Send,
impl<'a, TInEvent, TOutEvent, THandler, TReachErr, THandlerErr, TUserData, TConnInfo = PeerId, TPeerId = PeerId> !Sync for CollectionReachEvent<'a, TInEvent, TOutEvent, THandler, TReachErr, THandlerErr, TUserData, 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