pub struct Scan {
pub db: ObjectDB,
/* private fields */
}Expand description
Scan post-processor: collects structural information into ObjectDB.
Port of LaTeXML::Post::Scan.
Fields§
§db: ObjectDBReference to the shared ObjectDB.
Implementations§
Source§impl Scan
impl Scan
pub fn new(db: ObjectDB) -> Self
Sourcepub fn scan(&mut self, doc: &PostDocument, node: &Node, parent_id: Option<&str>)
pub fn scan(&mut self, doc: &PostDocument, node: &Node, parent_id: Option<&str>)
Recursively scan a node and its children.
Port of Scan::scan.
Sourcepub fn scan_children(
&mut self,
doc: &PostDocument,
node: &Node,
parent_id: Option<&str>,
)
pub fn scan_children( &mut self, doc: &PostDocument, node: &Node, parent_id: Option<&str>, )
Scan all element children of a node.
Trait Implementations§
Source§impl Processor for Scan
impl Processor for Scan
Source§fn process(&mut self, doc: PostDocument, _nodes: Vec<Node>) -> ProcessResult
fn process(&mut self, doc: PostDocument, _nodes: Vec<Node>) -> ProcessResult
Process the document given the nodes returned by
to_process.
Returns the resulting document(s) — splitting may produce multiple.Source§fn resource_directory(&self) -> Option<&str>
fn resource_directory(&self) -> Option<&str>
Resource directory for generated resources (images, etc.).
Source§fn resource_prefix(&self) -> Option<&str>
fn resource_prefix(&self) -> Option<&str>
Resource prefix for generated resource filenames.
Source§fn to_process(&self, doc: &PostDocument) -> Vec<Node>
fn to_process(&self, doc: &PostDocument) -> Vec<Node>
Return the nodes to be processed; by default the document element.
This allows processors to focus on specific kinds of nodes,
or to skip processing if there are none to process.
Source§fn desired_resource_pathname(
&self,
_doc: &PostDocument,
_node: &Node,
_source: Option<&str>,
_type_ext: Option<&str>,
) -> Option<PathBuf>
fn desired_resource_pathname( &self, _doc: &PostDocument, _node: &Node, _source: Option<&str>, _type_ext: Option<&str>, ) -> Option<PathBuf>
Hint for a desired resource pathname.
Source§fn generate_resource_pathname(
&self,
doc: &mut PostDocument,
_node: &Node,
_source: Option<&str>,
type_ext: Option<&str>,
) -> PathBuf
fn generate_resource_pathname( &self, doc: &mut PostDocument, _node: &Node, _source: Option<&str>, type_ext: Option<&str>, ) -> PathBuf
Auto-generate a unique resource pathname using a counter from the doc cache.
Auto Trait Implementations§
impl !Freeze for Scan
impl !RefUnwindSafe for Scan
impl !Send for Scan
impl !Sync for Scan
impl !UnwindSafe for Scan
impl Unpin for Scan
impl UnsafeUnpin for Scan
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