pub struct ContactView {
pub fingerprint: String,
pub alias: Option<String>,
pub username: Option<String>,
pub dm_room_id: String,
pub verified: bool,
pub trusted: bool,
pub reachable: bool,
pub lan_connected: bool,
pub source: String,
pub added_at: i64,
pub last_seen: Option<i64>,
}Expand description
huddle 1.0: a unified, display-ready contact assembled from the durable
contacts address book joined with live, derived state. Unlike
KnownPeerStatus (one row per ephemeral libp2p multiaddr), this is
keyed by the stable fingerprint, so it survives a peer leaving the LAN —
the durable link that lets two people keep chatting over the relay.
Fields§
§fingerprint: String§alias: Option<String>User-chosen alias, if set.
username: Option<String>Signed self-declared username from peer_profiles, if any.
dm_room_id: StringCanonical DM room id for one-step messaging.
verified: bool§trusted: bool§reachable: boolTrue when we currently have any live path to the peer: a libp2p connection (LAN/direct) OR the relay is up (reachable via mailbox).
lan_connected: boolTrue specifically when a direct libp2p connection is live (LAN).
source: StringHow the contact entered the book: dm / request / dial / lan / invite.
added_at: i64§last_seen: Option<i64>Trait Implementations§
Source§impl Clone for ContactView
impl Clone for ContactView
Source§fn clone(&self) -> ContactView
fn clone(&self) -> ContactView
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ContactView
impl RefUnwindSafe for ContactView
impl Send for ContactView
impl Sync for ContactView
impl Unpin for ContactView
impl UnsafeUnpin for ContactView
impl UnwindSafe for ContactView
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more