pub struct IdentityRecord {
pub public_key: [u8; 32],
pub first_seen_ms: u64,
pub last_seen_ms: u64,
pub verification_count: u32,
pub callsign: Option<[u8; 12]>,
pub token_expires_ms: Option<u64>,
}Expand description
Record of a known identity
Fields§
§public_key: [u8; 32]The public key for this node
first_seen_ms: u64When this identity was first seen (milliseconds since epoch)
last_seen_ms: u64When this identity was last verified (milliseconds since epoch)
verification_count: u32Number of successful verifications
callsign: Option<[u8; 12]>Optional callsign assigned via MembershipToken None = unknown (TOFU identity only), Some = verified member
token_expires_ms: Option<u64>When the membership token expires (0 = never, None = no token)
Implementations§
Source§impl IdentityRecord
impl IdentityRecord
Sourcepub fn callsign_str(&self) -> Option<&str>
pub fn callsign_str(&self) -> Option<&str>
Get the callsign as a string (trimmed of null padding)
Sourcepub fn is_token_expired(&self, now_ms: u64) -> bool
pub fn is_token_expired(&self, now_ms: u64) -> bool
Check if the membership token has expired
Trait Implementations§
Source§impl Clone for IdentityRecord
impl Clone for IdentityRecord
Source§fn clone(&self) -> IdentityRecord
fn clone(&self) -> IdentityRecord
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 Freeze for IdentityRecord
impl RefUnwindSafe for IdentityRecord
impl Send for IdentityRecord
impl Sync for IdentityRecord
impl Unpin for IdentityRecord
impl UnwindSafe for IdentityRecord
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