pub struct ContentNormalization { /* private fields */ }Expand description
Holds normalized content-stream bytes and qpdf-compatible bad-token state.
Values are produced by normalize_content_stream. The status accessors
allow callers to distinguish clean normalization from best-effort output
that contains malformed PDF tokens.
Implementations§
Source§impl ContentNormalization
impl ContentNormalization
Sourcepub fn as_bytes(&self) -> &[u8] ⓘ
pub fn as_bytes(&self) -> &[u8] ⓘ
Borrows the normalized output bytes without consuming this result.
Sourcepub fn into_bytes(self) -> Vec<u8> ⓘ
pub fn into_bytes(self) -> Vec<u8> ⓘ
Consumes this result and returns its normalized output allocation.
Sourcepub fn any_bad_tokens(&self) -> bool
pub fn any_bad_tokens(&self) -> bool
Reports whether normalization encountered at least one bad token.
Sourcepub fn last_token_was_bad(&self) -> bool
pub fn last_token_was_bad(&self) -> bool
Reports whether the final non-EOF token was bad.
This mirrors qpdf’s lastTokenWasBad state and indicates that
coalescing adjacent page-content streams may recover a token split
across a stream boundary.
Trait Implementations§
Source§impl Clone for ContentNormalization
impl Clone for ContentNormalization
Source§impl Debug for ContentNormalization
impl Debug for ContentNormalization
impl Eq for ContentNormalization
Source§impl PartialEq for ContentNormalization
impl PartialEq for ContentNormalization
impl StructuralPartialEq for ContentNormalization
Auto Trait Implementations§
impl Freeze for ContentNormalization
impl RefUnwindSafe for ContentNormalization
impl Send for ContentNormalization
impl Sync for ContentNormalization
impl Unpin for ContentNormalization
impl UnsafeUnpin for ContentNormalization
impl UnwindSafe for ContentNormalization
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