Struct libp2p_core::nodes::collection::CollectionReachEvent
source · pub struct CollectionReachEvent<'a, TInEvent: 'a, TOutEvent: 'a, THandler: 'a, TReachErr, THandlerErr: 'a> { /* private fields */ }Expand description
Event that happens when we reach a node.
Implementations
sourceimpl<'a, TInEvent, TOutEvent, THandler, TReachErr, THandlerErr> CollectionReachEvent<'a, TInEvent, TOutEvent, THandler, TReachErr, THandlerErr>
impl<'a, TInEvent, TOutEvent, THandler, TReachErr, THandlerErr> CollectionReachEvent<'a, TInEvent, TOutEvent, THandler, TReachErr, THandlerErr>
sourcepub fn reach_attempt_id(&self) -> ReachAttemptId
pub fn reach_attempt_id(&self) -> ReachAttemptId
Returns the reach attempt that reached the node.
sourcepub fn would_replace(&self) -> bool
pub fn would_replace(&self) -> bool
Returns true if accepting this reached node would replace an existing connection to that
node.
sourcepub fn accept(self) -> (CollectionNodeAccept, PeerId)
pub fn accept(self) -> (CollectionNodeAccept, PeerId)
Accepts the new node.
Trait Implementations
sourceimpl<'a, TInEvent, TOutEvent, THandler, TReachErr, THandlerErr> Debug for CollectionReachEvent<'a, TInEvent, TOutEvent, THandler, TReachErr, THandlerErr>
impl<'a, TInEvent, TOutEvent, THandler, TReachErr, THandlerErr> Debug for CollectionReachEvent<'a, TInEvent, TOutEvent, THandler, TReachErr, THandlerErr>
Auto Trait Implementations
impl<'a, TInEvent, TOutEvent, THandler, TReachErr, THandlerErr> !RefUnwindSafe for CollectionReachEvent<'a, TInEvent, TOutEvent, THandler, TReachErr, THandlerErr>
impl<'a, TInEvent, TOutEvent, THandler, TReachErr, THandlerErr> Send for CollectionReachEvent<'a, TInEvent, TOutEvent, THandler, TReachErr, THandlerErr>where
THandler: Send,
THandlerErr: Send,
TInEvent: Send,
TOutEvent: Send,
TReachErr: Send,
impl<'a, TInEvent, TOutEvent, THandler, TReachErr, THandlerErr> !Sync for CollectionReachEvent<'a, TInEvent, TOutEvent, THandler, TReachErr, THandlerErr>
impl<'a, TInEvent, TOutEvent, THandler, TReachErr, THandlerErr> Unpin for CollectionReachEvent<'a, TInEvent, TOutEvent, THandler, TReachErr, THandlerErr>
impl<'a, TInEvent, TOutEvent, THandler, TReachErr, THandlerErr> !UnwindSafe for CollectionReachEvent<'a, TInEvent, TOutEvent, THandler, TReachErr, THandlerErr>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more