Struct rhtml2md::StructuredPrinter
source · [−]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
sourceimpl 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
sourceimpl Debug for StructuredPrinter
impl Debug for StructuredPrinter
sourceimpl Default for StructuredPrinter
impl Default for StructuredPrinter
sourcefn default() -> StructuredPrinter
fn default() -> StructuredPrinter
Returns the “default value” for a type. Read more
Auto Trait Implementations
impl RefUnwindSafe for StructuredPrinter
impl Send for StructuredPrinter
impl Sync for StructuredPrinter
impl Unpin for StructuredPrinter
impl UnwindSafe for StructuredPrinter
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more