pub struct SanitizeStats {
pub original_bytes: usize,
pub sanitized_bytes: usize,
pub invalid_sequences: usize,
pub null_bytes_removed: usize,
pub control_chars_removed: usize,
pub line_endings_normalized: usize,
pub unicode_normalized: bool,
pub was_valid: bool,
}Expand description
Statistics about UTF-8 sanitization operation
Fields§
§original_bytes: usizeOriginal byte length
sanitized_bytes: usizeFinal byte length (may differ due to replacements)
invalid_sequences: usizeNumber of invalid UTF-8 sequences replaced
null_bytes_removed: usizeNumber of null bytes removed
control_chars_removed: usizeNumber of control characters removed
line_endings_normalized: usizeNumber of line ending normalizations
unicode_normalized: boolWhether Unicode NFC normalization was applied
was_valid: boolWhether input was already valid UTF-8
Implementations§
Source§impl SanitizeStats
impl SanitizeStats
Trait Implementations§
Source§impl Clone for SanitizeStats
impl Clone for SanitizeStats
Source§fn clone(&self) -> SanitizeStats
fn clone(&self) -> SanitizeStats
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 SanitizeStats
impl Debug for SanitizeStats
Source§impl PartialEq for SanitizeStats
impl PartialEq for SanitizeStats
Source§fn eq(&self, other: &SanitizeStats) -> bool
fn eq(&self, other: &SanitizeStats) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for SanitizeStats
impl StructuralPartialEq for SanitizeStats
Auto Trait Implementations§
impl Freeze for SanitizeStats
impl RefUnwindSafe for SanitizeStats
impl Send for SanitizeStats
impl Sync for SanitizeStats
impl Unpin for SanitizeStats
impl UnsafeUnpin for SanitizeStats
impl UnwindSafe for SanitizeStats
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.