#[non_exhaustive]pub struct Presence {
pub sessions_started: u64,
pub sessions_ended: u64,
}Expand description
Counter collection, re-exported from moq_net::stats so stats consumers
can depend on this crate alone.
Connected-session presence for one slice (an auth root on a tier, or any
sum of such slices): cumulative connects and disconnects. `sessions_started
- sessions_ended` is the current live session count.
Like Traffic, this is also the wire shape of one entry on a published
sessions track. Serialize writes both the canonical names and the legacy
sessions/sessions_closed spellings; deserialize accepts either, with
the canonical name winning when both are present.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.sessions_started: u64Cumulative sessions connected.
sessions_ended: u64Cumulative sessions disconnected.
Implementations§
Trait Implementations§
impl Copy for Presence
Source§impl<'de> Deserialize<'de> for Presence
impl<'de> Deserialize<'de> for Presence
Source§fn deserialize<D>(
deserializer: D,
) -> Result<Presence, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<Presence, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Presence
Source§impl Serialize for Presence
impl Serialize for Presence
Source§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for Presence
Auto Trait Implementations§
impl Freeze for Presence
impl RefUnwindSafe for Presence
impl Send for Presence
impl Sync for Presence
impl Unpin for Presence
impl UnsafeUnpin for Presence
impl UnwindSafe for Presence
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