pub struct StructuredPrinter {
pub parent_chain: Vec<String>,
pub siblings: HashMap<usize, Vec<String>>,
pub data: String,
}
Expand description
Intermediate result of HTML -> Markdown conversion.
Holds context in the form of parent tags and siblings chain and resulting string of markup content with current position.
Fields§
§parent_chain: Vec<String>
Chain of parents leading to upmost tag
siblings: HashMap<usize, Vec<String>>
Siblings of currently processed tag in order where they’re appearing in html
data: String
resulting markdown document
Implementations§
Source§impl StructuredPrinter
impl StructuredPrinter
Sourcepub fn insert_newline(&mut self)
pub fn insert_newline(&mut self)
Inserts newline
Sourcepub fn append_str(&mut self, it: &str)
pub fn append_str(&mut self, it: &str)
Append string to the end of the printer
Sourcepub fn insert_str(&mut self, pos: usize, it: &str)
pub fn insert_str(&mut self, pos: usize, it: &str)
Insert string at specified position of printer, adjust position to the end of inserted string
Trait Implementations§
Source§impl Debug for StructuredPrinter
impl Debug for StructuredPrinter
Source§impl Default for StructuredPrinter
impl Default for StructuredPrinter
Source§fn default() -> StructuredPrinter
fn default() -> StructuredPrinter
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for StructuredPrinter
impl RefUnwindSafe for StructuredPrinter
impl Send for StructuredPrinter
impl Sync for StructuredPrinter
impl Unpin for StructuredPrinter
impl UnwindSafe for StructuredPrinter
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