pub struct AccuracyReading<'a> { /* private fields */ }Expand description
Readable scalar fields and conformance faults, without token acceptance.
Fixed component storage cannot grow with attacker-controlled field count. Diagnostics retain their own capacity charge; callers must consider them before accepting a token/proof. Unknown or out-of-order fields and readable nonminimal INTEGERs remain faults. Numerically equal duplicates retain the first original reading; conflicting numeric values refuse rather than selecting a value. This recovery is an inspection contract, not specified by RFC3161.
Implementations§
Source§impl<'a> AccuracyReading<'a>
impl<'a> AccuracyReading<'a>
Sourcepub fn read(parent: &Reader<'a>, element: &Element<'a>) -> Result<Self>
pub fn read(parent: &Reader<'a>, element: &Element<'a>) -> Result<Self>
Reads SEQUENCE with optional seconds and primitive IMPLICIT [0]/[1].
RFC3161 §2.4.2 gives millis/micros the range 1..999 and defaults each absent component to zero. Present empty Accuracy is zero, whereas an omitted entire Accuracy provides no bound. Readable out-of-range values are retained exactly with a fault, never clamped. Resource failures abort. https://www.rfc-editor.org/rfc/rfc3161#section-2.4.2
Sourcepub fn component(&self, component: Component) -> Option<ComponentReading<'a>>
pub fn component(&self, component: Component) -> Option<ComponentReading<'a>>
Original component, absent only when no such field was written.
Sourcepub fn faults(&self) -> &[Error]
pub fn faults(&self) -> &[Error]
Original schema/conformance faults; accessing them performs no new scan.
Sourcepub fn into_faults(self) -> OwnedVec<Error>
pub fn into_faults(self) -> OwnedVec<Error>
Move diagnostic storage without cloning paths or refunding live capacity.
Sourcepub fn deviation(&self) -> Result<Accuracy, DeviationError>
pub fn deviation(&self) -> Result<Accuracy, DeviationError>
Exact nonnegative deviation, independently of conformance acceptance.
Negative/wide components are typed failures, never zero or u64::MAX.