#[non_exhaustive]pub struct LeniencyReport {
pub events: Vec<Diagnostic>,
pub unique_event_count: usize,
pub warning_count: usize,
pub critical_count: usize,
}Expand description
An aggregated summary of decode-leniency diagnostics for a document.
Computed from the diagnostics buffer via LeniencyReport::from_diagnostics.
Provides quick access to counts without iterating the full list.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.events: Vec<Diagnostic>All leniency-related diagnostics (Repair + Decode categories).
unique_event_count: usizeNumber of distinct event codes present.
warning_count: usizeNumber of events at Severity::Warning level.
critical_count: usizeNumber of events at Severity::Error level (Critical in the parser layer).
Implementations§
Source§impl LeniencyReport
impl LeniencyReport
Sourcepub fn from_diagnostics(diagnostics: &[Diagnostic]) -> Self
pub fn from_diagnostics(diagnostics: &[Diagnostic]) -> Self
Build a report from the diagnostics collected on a document.
Filters to Repair and Decode categories (the leniency-relevant subset).
Trait Implementations§
Source§impl Clone for LeniencyReport
impl Clone for LeniencyReport
Source§fn clone(&self) -> LeniencyReport
fn clone(&self) -> LeniencyReport
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 moreSource§impl Debug for LeniencyReport
impl Debug for LeniencyReport
Source§impl Default for LeniencyReport
impl Default for LeniencyReport
Source§fn default() -> LeniencyReport
fn default() -> LeniencyReport
Returns the “default value” for a type. Read more
impl Eq for LeniencyReport
Source§impl PartialEq for LeniencyReport
impl PartialEq for LeniencyReport
impl StructuralPartialEq for LeniencyReport
Auto Trait Implementations§
impl Freeze for LeniencyReport
impl RefUnwindSafe for LeniencyReport
impl Send for LeniencyReport
impl Sync for LeniencyReport
impl Unpin for LeniencyReport
impl UnsafeUnpin for LeniencyReport
impl UnwindSafe for LeniencyReport
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
impl<T> ErasedDestructor for Twhere
T: 'static,
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 moreimpl<T> ParallelSend for T
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().Source§impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
Source§fn to_owned_obj(&self, data: FontData<'_>) -> U
fn to_owned_obj(&self, data: FontData<'_>) -> U
Convert this type into
T, using the provided data to resolve any offsets.