Struct slog_extlog::stats::StatSnapshot
source · pub struct StatSnapshot {
pub definition: &'static dyn StatDefinition,
pub values: StatSnapshotValues,
}
Expand description
A snapshot of the current values for a particular stat.
Fields§
§definition: &'static dyn StatDefinition
A configured statistic, defined in terms of the external logs that trigger it to change.
values: StatSnapshotValues
The values contained in a StatSnapshot
for each stat type.
Implementations§
source§impl StatSnapshot
impl StatSnapshot
sourcepub fn new(
definition: &'static dyn StatDefinition,
values: StatSnapshotValues
) -> Self
pub fn new( definition: &'static dyn StatDefinition, values: StatSnapshotValues ) -> Self
Create a new snapshot of a stat. The StatSnapshotValues enum variant passed should match the stat type in the definition.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for StatSnapshot
impl !Send for StatSnapshot
impl !Sync for StatSnapshot
impl Unpin for StatSnapshot
impl !UnwindSafe for StatSnapshot
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