pub enum ExistingDocumentPolicy {
PreserveBase(PreserveBasePolicy),
Reconstruct(ReconstructPolicy),
}Expand description
Explicit, type-safe policy for existing-document operations.
There is deliberately no Default implementation: every call site must
choose preservation or reconstruction. Engine-specific policy values also
cannot be assembled from arbitrary structure dispositions.
use oxidize_pdf::operations::ExistingDocumentPolicy;
let policy = ExistingDocumentPolicy::default();Variants§
PreserveBase(PreserveBasePolicy)
Preserve the first input byte-for-byte and control secondary structures.
Reconstruct(ReconstructPolicy)
Reconstruct page appearance/content and deliberately lose other semantics.
Implementations§
Source§impl ExistingDocumentPolicy
impl ExistingDocumentPolicy
Sourcepub const fn preserve_base() -> Self
pub const fn preserve_base() -> Self
Preserve the base and reject ambiguous secondary structures.
Sourcepub const fn reconstruct() -> Self
pub const fn reconstruct() -> Self
Reconstruct page appearance/content and explicitly discard every detected document-level structure.
Sourcepub const fn reconstruct_with_metadata_from_first() -> Self
pub const fn reconstruct_with_metadata_from_first() -> Self
Reconstruct pages while copying document information from the first input.
Sourcepub const fn engine(self) -> ExistingDocumentEngine
pub const fn engine(self) -> ExistingDocumentEngine
Return the selected execution engine.
Sourcepub const fn with_page_labels(self, policy: DocumentStructurePolicy) -> Self
pub const fn with_page_labels(self, policy: DocumentStructurePolicy) -> Self
Configure page labels in secondary inputs of a preserving merge. Reconstructive policies are unchanged because they always discard them.
Trait Implementations§
Source§impl Clone for ExistingDocumentPolicy
impl Clone for ExistingDocumentPolicy
Source§fn clone(&self) -> ExistingDocumentPolicy
fn clone(&self) -> ExistingDocumentPolicy
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more