pub struct DenoiseStats {
pub nodes_visited: usize,
pub nodes_dropped: usize,
pub html_bytes: usize,
pub markdown_bytes: usize,
}Expand description
What the denoiser threw away, for observability and tuning.
Counts are over DOM nodes, and a rejected node counts its whole subtree —
dropping one <nav> removes everything under it, and a figure that said
“1 node dropped” would be useless for judging whether the heuristics fired.
Fields§
§nodes_visited: usizeNodes in the document.
nodes_dropped: usizeNodes removed, counting whole rejected subtrees and everything outside the chosen content root.
html_bytes: usizeBytes of HTML handed in.
markdown_bytes: usizeBytes of Markdown handed back.
Implementations§
Source§impl DenoiseStats
impl DenoiseStats
Sourcepub fn compression(&self) -> f32
pub fn compression(&self) -> f32
How much smaller the output is than the input, in [0, 1].
Trait Implementations§
Source§impl Clone for DenoiseStats
impl Clone for DenoiseStats
Source§fn clone(&self) -> DenoiseStats
fn clone(&self) -> DenoiseStats
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 DenoiseStats
impl Debug for DenoiseStats
Source§impl Default for DenoiseStats
impl Default for DenoiseStats
Source§fn default() -> DenoiseStats
fn default() -> DenoiseStats
Returns the “default value” for a type. Read more
impl Eq for DenoiseStats
Source§impl PartialEq for DenoiseStats
impl PartialEq for DenoiseStats
Source§impl Serialize for DenoiseStats
impl Serialize for DenoiseStats
impl StructuralPartialEq for DenoiseStats
Auto Trait Implementations§
impl Freeze for DenoiseStats
impl RefUnwindSafe for DenoiseStats
impl Send for DenoiseStats
impl Sync for DenoiseStats
impl Unpin for DenoiseStats
impl UnsafeUnpin for DenoiseStats
impl UnwindSafe for DenoiseStats
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§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<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