pub struct ContentMarks { /* private fields */ }Expand description
The mark stack a page object is stamped with.
Cheap to clone: Arc inside, and page objects snapshot it at creation.
Implementations§
Source§impl ContentMarks
impl ContentMarks
Sourcepub fn push_with_properties(
&mut self,
tag: Name,
properties: &MarkProperties,
resolve: impl FnOnce(&Name) -> Option<Dict>,
) -> bool
pub fn push_with_properties( &mut self, tag: Name, properties: &MarkProperties, resolve: impl FnOnce(&Name) -> Option<Dict>, ) -> bool
BDC: push a tag with a property list.
resolve is what turns a named property list into a dictionary; when
it yields nothing, no mark is pushed at all.
Sourcepub fn pop(&mut self) -> bool
pub fn pop(&mut self) -> bool
EMC: pop one mark, never past the sentinel.
Answers whether anything was popped — a question, not a failed mutation — so a caller can record the imbalance.
Sourcepub fn content_id(&self) -> Option<i64>
pub fn content_id(&self) -> Option<i64>
The /MCID of the first mark that declares one, or None.
Sourcepub fn optional_content(&self) -> Option<&Dict>
pub fn optional_content(&self) -> Option<&Dict>
The optional-content group this content belongs to, if any.
Only a mark tagged exactly OC whose properties came from the
/Properties resource counts — an inline BDC /OC << … >> is
ignored entirely and its content stays visible.
Sourcepub fn optional_content_all(&self) -> Vec<&Dict>
pub fn optional_content_all(&self) -> Vec<&Dict>
Every optional-content dictionary enclosing this content, outermost first.
A visibility test scans the whole mark stack and any one entry can
veto, so nested BDC /OC sequences each get a say — which the
innermost alone does not capture. The same
two conditions apply to each: the tag is exactly OC, and the
properties came from the /Properties resource rather than being
written inline.
Trait Implementations§
Source§impl Clone for ContentMarks
impl Clone for ContentMarks
Source§fn clone(&self) -> ContentMarks
fn clone(&self) -> ContentMarks
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more