#[non_exhaustive]pub struct Presence {
pub sessions: u64,
pub sessions_closed: 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 - sessions_closed is the current live session count.
Like Traffic, this is also the wire shape of one entry on a published
sessions track, so it derives both serde directions.
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: u64Cumulative sessions connected.
sessions_closed: 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