pub struct PeerRecord {
pub peer_id: String,
pub pinned_key: Vec<u8>,
pub current_key: Vec<u8>,
pub trust_level: TrustLevel,
pub first_seen: u64,
pub last_seen: u64,
pub attestations: Vec<Attestation>,
pub interaction_count: u32,
pub display_name: Option<String>,
}Expand description
Our record of a known peer
Fields§
§peer_id: String§pinned_key: Vec<u8>The first public key we saw from this peer (pinned)
current_key: Vec<u8>The most recently seen key
trust_level: TrustLevel§first_seen: u64§last_seen: u64§attestations: Vec<Attestation>§interaction_count: u32§display_name: Option<String>Implementations§
Source§impl PeerRecord
impl PeerRecord
Sourcepub fn has_key_changed(&self) -> bool
pub fn has_key_changed(&self) -> bool
Whether the key has changed since first contact
Trait Implementations§
Source§impl Clone for PeerRecord
impl Clone for PeerRecord
Source§fn clone(&self) -> PeerRecord
fn clone(&self) -> PeerRecord
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 moreSource§impl Debug for PeerRecord
impl Debug for PeerRecord
Source§impl<'de> Deserialize<'de> for PeerRecord
impl<'de> Deserialize<'de> for PeerRecord
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 PeerRecord
impl RefUnwindSafe for PeerRecord
impl Send for PeerRecord
impl Sync for PeerRecord
impl Unpin for PeerRecord
impl UnsafeUnpin for PeerRecord
impl UnwindSafe for PeerRecord
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