Skip to main content

HybridPartition

Struct HybridPartition 

Source
pub struct HybridPartition {
    pub hidden: BTreeSet<u32>,
    pub stream_unreadable: bool,
}
Expand description

Which objects a hybrid-reference file hides, and whether pdfcer could tell (Pass 281.0).

Travels from load_xref_chain to the writer as one value because the two facts are only meaningful together: an empty hidden set means “nothing is hidden” when stream_unreadable is false, and “something is hidden and pdfcer cannot say what” when it is true. Those two demand opposite behaviour from a full rewrite — proceed, and refuse — so a caller handed only the set would have to guess.

Fields§

§hidden: BTreeSet<u32>

Object numbers whose winning entry came from the /XRefStm stream — see LoadedXref::hidden_objects.

§stream_unreadable: bool

Whether an /XRefStm was named and could not be parsed — see LoadedXref::hybrid_stream_unreadable.

Implementations§

Source§

impl HybridPartition

Source

pub fn is_reproducible(&self) -> bool

Whether a full rewrite can reproduce this file’s §7.5.8.4 partition.

false for a file that says it hides objects and whose stream pdfcer could not read: emitting either side of the partition would be a guess, and a wrong guess produces a file that opens and is missing an outline tree or a structure tree with nothing to say so.

Trait Implementations§

Source§

impl Clone for HybridPartition

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for HybridPartition

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for HybridPartition

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Eq for HybridPartition

Source§

impl PartialEq for HybridPartition

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for HybridPartition

Auto Trait Implementations§

§

impl Forget for HybridPartition

§

impl Freeze for HybridPartition
where *const LeafNode<u32, SetValZST> is !null: Freeze, PhantomData<(Owned, LeafOrInternal)>: Freeze, PhantomData<Box<(u32, SetValZST)>>: Freeze,

§

impl Move for HybridPartition

§

impl RefUnwindSafe for HybridPartition

§

impl Send for HybridPartition
where NodeRef<Owned, u32, SetValZST, LeafOrInternal>: Send, BoxRaw<(u32, SetValZST)>: Send,

§

impl Sync for HybridPartition
where NodeRef<Owned, u32, SetValZST, LeafOrInternal>: Sync, BoxRaw<(u32, SetValZST)>: Sync,

§

impl Unpin for HybridPartition
where *const LeafNode<u32, SetValZST> is !null: Unpin, Box<(u32, SetValZST)>: Unpin,

§

impl UnsafeUnpin for HybridPartition
where *const LeafNode<u32, SetValZST> is !null: UnsafeUnpin, PhantomData<(Owned, LeafOrInternal)>: UnsafeUnpin, PhantomData<Box<(u32, SetValZST)>>: UnsafeUnpin,

§

impl UnwindSafe for HybridPartition
where BTreeMap<u32, SetValZST>: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.