[−][src]Struct libp2p_core::nodes::collection::CollectionReachEvent
Event that happens when we reach a node.
Methods
impl<'a, TInEvent, TOutEvent, THandler, TReachErr, THandlerErr, TPeerId> CollectionReachEvent<'a, TInEvent, TOutEvent, THandler, TReachErr, THandlerErr, TPeerId> where
TPeerId: Eq + Hash + Clone, [src]
TPeerId: Eq + Hash + Clone,
pub fn peer_id(&self) -> &TPeerId[src]
Returns the peer id of the node that has been reached.
pub fn reach_attempt_id(&self) -> ReachAttemptId[src]
Returns the reach attempt that reached the node.
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) -> (CollectionNodeAccept, TPeerId)[src]
Accepts the new node.
pub fn deny(self) -> TPeerId[src]
Denies the node.
Has the same effect as dropping the event without accepting it.
Trait Implementations
impl<'a, TInEvent, TOutEvent, THandler, TReachErr, THandlerErr, TPeerId> Drop for CollectionReachEvent<'a, TInEvent, TOutEvent, THandler, TReachErr, THandlerErr, TPeerId>[src]
impl<'a, TInEvent, TOutEvent, THandler, TReachErr, THandlerErr, TPeerId> Debug for CollectionReachEvent<'a, TInEvent, TOutEvent, THandler, TReachErr, THandlerErr, TPeerId> where
TPeerId: Eq + Hash + Clone + Debug, [src]
TPeerId: Eq + Hash + Clone + Debug,
Auto Trait Implementations
impl<'a, TInEvent, TOutEvent, THandler, TReachErr, THandlerErr, TPeerId> Send for CollectionReachEvent<'a, TInEvent, TOutEvent, THandler, TReachErr, THandlerErr, TPeerId> where
THandler: Send,
THandlerErr: Send,
TInEvent: Send,
TOutEvent: Send,
TPeerId: Send,
TReachErr: Send,
THandler: Send,
THandlerErr: Send,
TInEvent: Send,
TOutEvent: Send,
TPeerId: Send,
TReachErr: Send,
impl<'a, TInEvent, TOutEvent, THandler, TReachErr, THandlerErr, TPeerId = PeerId> !Sync for CollectionReachEvent<'a, TInEvent, TOutEvent, THandler, TReachErr, THandlerErr, TPeerId>
Blanket Implementations
impl<T, U> Into for T where
U: From<T>, [src]
U: From<T>,
impl<T> From for T[src]
impl<T, U> TryFrom for T where
U: Into<T>, [src]
U: Into<T>,
type Error = !
🔬 This is a nightly-only experimental API. (
try_from)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> Borrow for T where
T: ?Sized, [src]
T: ?Sized,
impl<T, U> TryInto for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
🔬 This is a nightly-only experimental API. (
try_from)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> Same for T
type Output = T
Should always be Self