pub struct ExportLedger { /* private fields */ }Expand description
The ledger.
Implementations§
Source§impl ExportLedger
impl ExportLedger
Sourcepub fn new(
max_series: usize,
scopes: Vec<String>,
registry_producers: Option<usize>,
started_at: SystemTime,
) -> ExportLedger
pub fn new( max_series: usize, scopes: Vec<String>, registry_producers: Option<usize>, started_at: SystemTime, ) -> ExportLedger
An empty ledger over scopes, started at started_at.
registry_producers is None when no registry was loaded — then
nothing refines, every key is unregistered, and the snapshot says
the registry was not asked rather than that it declares nothing.
pub fn is_empty(&self) -> bool
Sourcepub fn ingest(&mut self, obs: &Observed<'_>, facts: &KeyFacts)
pub fn ingest(&mut self, obs: &Observed<'_>, facts: &KeyFacts)
Feed one sample. facts is the key’s projection under the active
base and registry (crate::describe_key or a
crate::FactsCache entry).
Sourcepub fn fold(&mut self, inputs: &FoldInputs<'_>) -> ExportSnapshot
pub fn fold(&mut self, inputs: &FoldInputs<'_>) -> ExportSnapshot
One scrape: the snapshot as of inputs.now.
Two folds with no ingest between them differ only in
taken_at_unix_s (and in a quiet judgement a ttl may have crossed)
— the exposition carries neither the scrape time nor anything else
that moves without traffic, which is what makes an idle scrape
byte-identical.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ExportLedger
impl RefUnwindSafe for ExportLedger
impl Send for ExportLedger
impl Sync for ExportLedger
impl Unpin for ExportLedger
impl UnsafeUnpin for ExportLedger
impl UnwindSafe for ExportLedger
Blanket Implementations§
Source§impl<Source> AccessAs for Source
impl<Source> AccessAs for Source
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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> ⓘ
Converts
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> ⓘ
Converts
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