pub enum PresenceSource {
Internet,
Peer,
}Expand description
Where a PresenceUpdated event came from.
Apps that render relay-style presence UI (e.g. a direct-chat header’s
“Online” / “Last seen …”) should filter on Internet so a nearby peer’s
self-report can’t flip a header that is defined as relay-observed.
Variants§
Internet
Relay-observed presence: the relay’s authoritative answer to
CheckPresence (PresenceStatus / PresenceStatusWithLastSeen),
or relay-derived reachability — the platform bridges also report
offline here when a relay DeliveryError names the recipient
unreachable, so a failed send can produce an Internet-sourced
offline event without any explicit presence query.
Peer
A peer-sent __PRESENCE__ self-report. Transport-agnostic: it may
arrive over BLE, WiFi Direct, or even relay-forwarded frames — hence
“peer”, not “mesh”. Default for deserializing legacy events that
predate the field.
Trait Implementations§
Source§impl Clone for PresenceSource
impl Clone for PresenceSource
Source§fn clone(&self) -> PresenceSource
fn clone(&self) -> PresenceSource
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for PresenceSource
Source§impl Debug for PresenceSource
impl Debug for PresenceSource
Source§impl Default for PresenceSource
impl Default for PresenceSource
Source§fn default() -> PresenceSource
fn default() -> PresenceSource
Source§impl<'de> Deserialize<'de> for PresenceSource
impl<'de> Deserialize<'de> for PresenceSource
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>,
impl Eq for PresenceSource
Source§impl PartialEq for PresenceSource
impl PartialEq for PresenceSource
Source§impl Serialize for PresenceSource
impl Serialize for PresenceSource
impl StructuralPartialEq for PresenceSource
Auto Trait Implementations§
impl Freeze for PresenceSource
impl RefUnwindSafe for PresenceSource
impl Send for PresenceSource
impl Sync for PresenceSource
impl Unpin for PresenceSource
impl UnsafeUnpin for PresenceSource
impl UnwindSafe for PresenceSource
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Declassify for T
impl<T> Declassify for T
type Declassified = T
fn declassify(self) -> T
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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> ⓘ
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> ⓘ
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