pub struct PeerData {
pub addr: PeerAddr,
pub capabilities: Capabilities,
pub user_agent: String,
pub flags: State,
pub last_banned: i64,
pub ban_reason: ReasonForBan,
pub last_connected: i64,
}
Expand description
Data stored for any given peer we’ve encountered.
Fields§
§addr: PeerAddr
Network address of the peer.
capabilities: Capabilities
What capabilities the peer advertises. Unknown until a successful connection.
user_agent: String
The peer user agent.
flags: State
State the peer has been detected with.
last_banned: i64
The time the peer was last banned
ban_reason: ReasonForBan
The reason for the ban
last_connected: i64
Time when we last connected to this peer.
Trait Implementations§
source§impl<'de> Deserialize<'de> for PeerData
impl<'de> Deserialize<'de> for PeerData
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for PeerData
impl RefUnwindSafe for PeerData
impl Send for PeerData
impl Sync for PeerData
impl Unpin for PeerData
impl UnwindSafe for PeerData
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<'a, T> DefaultFeatures<'a> for T
impl<'a, T> DefaultFeatures<'a> for T
source§fn clone_boxed(&self) -> Box<dyn DefaultFeatures<'a>>
fn clone_boxed(&self) -> Box<dyn DefaultFeatures<'a>>
Clone this value, and then immediately put it into a
Box
behind a trait object of this trait.source§impl<'a, T> NonSyncFeatures<'a> for Twhere
T: 'a + Clone,
impl<'a, T> NonSyncFeatures<'a> for Twhere
T: 'a + Clone,
source§fn clone_boxed(&self) -> Box<dyn NonSyncFeatures<'a>>
fn clone_boxed(&self) -> Box<dyn NonSyncFeatures<'a>>
Clone this value, and then immediately put it into a
Box
behind a trait object of this trait.