Struct nakamoto_node::client::Peer
[−]pub struct Peer {
pub addr: SocketAddr,
pub local_addr: SocketAddr,
pub link: Link,
pub since: LocalTime,
pub height: u64,
pub services: ServiceFlags,
pub user_agent: String,
pub relay: bool,
}Expand description
A remote peer.
Fields
addr: SocketAddrPeer address.
local_addr: SocketAddrLocal peer address.
link: LinkWhether this is an inbound or outbound peer connection.
since: LocalTimeConnected since this time.
height: u64The peer’s best height.
services: ServiceFlagsThe peer’s services.
user_agent: StringPeer user agent string.
relay: boolWhether this peer relays transactions.
Implementations
impl Peer
impl Peer
pub fn is_outbound(&self) -> bool
pub fn is_outbound(&self) -> bool
Check if this is an outbound peer.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Peer
impl Send for Peer
impl Sync for Peer
impl Unpin for Peer
impl UnwindSafe for Peer
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