pub struct ConnectedPeer<N: Network> {
pub listener_addr: SocketAddr,
pub connected_addr: SocketAddr,
pub connection_mode: ConnectionMode,
pub trusted: bool,
pub aleo_addr: Address<N>,
pub node_type: NodeType,
pub version: u32,
pub last_height_seen: Option<u32>,
pub first_seen: Instant,
pub last_seen: Instant,
}Expand description
A fully connected peer.
Fields§
§listener_addr: SocketAddrThe listener address of the peer.
connected_addr: SocketAddrThe connected address of the peer.
connection_mode: ConnectionModeIndicates whether this is a Router or a Gateway connection for the peer.
trusted: boolIndicates whether the peer is considered trusted.
aleo_addr: Address<N>The Aleo address of the peer.
node_type: NodeTypeThe node type of the peer.
version: u32The message version of the peer.
last_height_seen: Option<u32>The latest block height known to be associated with the peer.
first_seen: InstantThe timestamp of the first message received from the peer.
last_seen: InstantThe timestamp of the last message received from this peer.
Trait Implementations§
Source§impl<N: Clone + Network> Clone for ConnectedPeer<N>
impl<N: Clone + Network> Clone for ConnectedPeer<N>
Source§fn clone(&self) -> ConnectedPeer<N>
fn clone(&self) -> ConnectedPeer<N>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<N> Freeze for ConnectedPeer<N>
impl<N> RefUnwindSafe for ConnectedPeer<N>
impl<N> Send for ConnectedPeer<N>
impl<N> Sync for ConnectedPeer<N>
impl<N> Unpin for ConnectedPeer<N>
impl<N> UnsafeUnpin for ConnectedPeer<N>
impl<N> UnwindSafe for ConnectedPeer<N>
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> 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>
Converts
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>
Converts
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