pub struct OcContext { /* private fields */ }Expand description
The visibility context: the catalog’s optional-content configuration plus the memoized answers.
Group answers are memoized; membership answers are not, matching PDFium, because a membership can depend on several groups and its evaluation is cheap.
Implementations§
Source§impl OcContext
impl OcContext
Sourcepub fn new(properties: Option<Dict>, usage: UsageType) -> Self
pub fn new(properties: Option<Dict>, usage: UsageType) -> Self
A context reading usage from the catalog’s /OCProperties.
Sourcepub fn permissive() -> Self
pub fn permissive() -> Self
A context that makes everything visible, for a document with no optional content.
Sourcepub fn content_visible<R: Resolve>(
&mut self,
dict: Option<&Dict>,
r: &R,
diags: &mut Diagnostics,
) -> bool
pub fn content_visible<R: Resolve>( &mut self, dict: Option<&Dict>, r: &R, diags: &mut Diagnostics, ) -> bool
Whether a dictionary reached from content is visible.
A null dictionary is visible here — the opposite of
Self::group_visible, and the asymmetry is deliberate: content with
no optional-content dictionary is unconditional content.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for OcContext
impl RefUnwindSafe for OcContext
impl Send for OcContext
impl Sync for OcContext
impl Unpin for OcContext
impl UnsafeUnpin for OcContext
impl UnwindSafe for OcContext
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