pub trait PutsSnapshot: Send + 'static {
// Required method
fn put_snapshot(&self, into: &mut Snapshot, descriptive: bool);
}Expand description
Implementors are able to write their current data into given Snapshot.
Guidelines for writing snapshots:
-
A
PutsSnapshotthat has a name should create a new sub snapshot and add its values there -
A
PutsSnapshotthat does not have a name should add its values directly to the given snapshot -
When
descriptiveis set totruePutsSnapshotshould put itstitleanddescriptioninto the sameSnapshotit put its values(exception: instruments) thereby not overwriting already existing descriptions so that the more general top level ones survive. -
When
descriptiveis set totrueon an instrument the instrument should put its description into the snapshot it got passed therby adding the suffixes “_title” and “_description” to its name.
Implementors of this trait can be added to almost all components via
the add_snapshooter method which is also defined on trait
AggregatesProcessors.
Required Methods§
Sourcefn put_snapshot(&self, into: &mut Snapshot, descriptive: bool)
fn put_snapshot(&self, into: &mut Snapshot, descriptive: bool)
Puts the current snapshot values into the given Snapshot thereby
following the guidelines of PutsSnapshot.