pub struct InferObservation { /* private fields */ }Available on crate feature
decode only.Expand description
Bounded per-key observations over one window, fed one sample at a time.
Keys are projected through describe_key under base; a key that
does not parse, or sits on a verbatim plane, is counted and skipped —
there is no [[subject]] to draft for it.
Implementations§
Source§impl InferObservation
impl InferObservation
pub fn new(base: &str, max_keys: usize, max_paths: usize) -> InferObservation
Sourcepub fn observe(
&mut self,
key: &str,
at_s: f64,
encoding: Option<&str>,
qos: Option<&str>,
doc: Option<&Value>,
)
pub fn observe( &mut self, key: &str, at_s: f64, encoding: Option<&str>, qos: Option<&str>, doc: Option<&Value>, )
Feed one sample. qos is the label the caller resolved for the
wire’s axes (a profile name when one matches, else the axes spelled
out); doc the structural document when the payload carried one
(crate::model::decode::structural_value) — None counts it as
undocumented rather than pretending its fields were absent.
Sourcepub fn observe_unread(
&mut self,
key: &str,
at_s: f64,
encoding: Option<&str>,
qos: Option<&str>,
)
pub fn observe_unread( &mut self, key: &str, at_s: f64, encoding: Option<&str>, qos: Option<&str>, )
A sample whose payload was too large to read (O6): counted, never read as an absent document.
pub fn samples(&self) -> u64
pub fn keys_seen(&self) -> usize
pub fn keys_refused(&self) -> u64
Trait Implementations§
Source§impl Clone for InferObservation
impl Clone for InferObservation
Source§fn clone(&self) -> InferObservation
fn clone(&self) -> InferObservation
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for InferObservation
impl RefUnwindSafe for InferObservation
impl Send for InferObservation
impl Sync for InferObservation
impl Unpin for InferObservation
impl UnsafeUnpin for InferObservation
impl UnwindSafe for InferObservation
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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