Struct stack_epic_p2p::PeerData
source · 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,
pub local_timestamp: i64,
}Expand description
Data stored for any given peer we’ve encountered.
Fields§
§addr: PeerAddrNetwork address of the peer.
capabilities: CapabilitiesWhat capabilities the peer advertises. Unknown until a successful connection.
user_agent: StringThe peer user agent.
flags: StateState the peer has been detected with.
last_banned: i64The time the peer was last banned
ban_reason: ReasonForBanThe reason for the ban
last_connected: i64Time when we last connected to this peer.
local_timestamp: i64Local utc from 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 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
§impl<T> CloneAny for T
impl<T> CloneAny for T
§impl<'a, T> DefaultFeatures<'a> for T
impl<'a, T> DefaultFeatures<'a> for T
§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.§fn self_address_mut(&mut self) -> *mut ()
fn self_address_mut(&mut self) -> *mut ()
Returns the address of
self. Read more§impl<'a, T> NonSyncFeatures<'a> for Twhere
T: 'a + Clone,
impl<'a, T> NonSyncFeatures<'a> for Twhere
T: 'a + Clone,
§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.§fn self_address_mut(&mut self) -> *mut ()
fn self_address_mut(&mut self) -> *mut ()
Returns the address of
self. Read more§impl<T> SafeBorrow<T> for Twhere
T: ?Sized,
impl<T> SafeBorrow<T> for Twhere
T: ?Sized,
§fn borrow_replacement(ptr: &T) -> &T
fn borrow_replacement(ptr: &T) -> &T
Given
ptr, which was obtained from a prior call to Self::borrow(),
return a value with the same nominal lifetime which is guaranteed to
survive mutations to Self. Read more