pub struct PeerInformation<A> {
pub id: InternalPeerID<A>,
pub handle: ConnectionHandle,
pub direction: ConnectionDirection,
pub pruning_seed: PruningSeed,
pub basic_node_data: BasicNodeData,
pub core_sync_data: Arc<Mutex<CoreSyncData>>,
}Expand description
Information on a connected peer.
Fields§
§id: InternalPeerID<A>The internal peer ID of this peer.
handle: ConnectionHandleThe ConnectionHandle for this peer, allows banning this peer and checking if it is still
alive.
direction: ConnectionDirectionThe direction of this connection (inbound|outbound).
pruning_seed: PruningSeedThe peer’s [PruningSeed].
basic_node_data: BasicNodeDataThe peer’s [BasicNodeData].
core_sync_data: Arc<Mutex<CoreSyncData>>The CoreSyncData of this peer.
Data across fields are not necessarily related, so CoreSyncData::top_id is not always the
block hash for the block at height one below CoreSyncData::current_height.
This value is behind a Mutex and is updated whenever the peer sends new information related
to their sync state. It is publicly accessible to anyone who has a peers Client handle. You
probably should not mutate this value unless you are creating a custom ProtocolRequestHandler.
Trait Implementations§
Source§impl<A: Clone> Clone for PeerInformation<A>
impl<A: Clone> Clone for PeerInformation<A>
Source§fn clone(&self) -> PeerInformation<A>
fn clone(&self) -> PeerInformation<A>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl<A> Freeze for PeerInformation<A>where
A: Freeze,
impl<A> RefUnwindSafe for PeerInformation<A>where
A: RefUnwindSafe,
impl<A> Send for PeerInformation<A>where
A: Send,
impl<A> Sync for PeerInformation<A>where
A: Sync,
impl<A> Unpin for PeerInformation<A>where
A: Unpin,
impl<A> UnsafeUnpin for PeerInformation<A>where
A: UnsafeUnpin,
impl<A> UnwindSafe for PeerInformation<A>where
A: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘwhere
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘwhere
S: Into<Dispatch>,
§fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
Layout§
Note: Unable to compute type layout, possibly due to this type having generic parameters. Layout can only be computed for concrete, fully-instantiated types.