pub struct ElementHandler { /* private fields */ }Expand description
Handle tree elements by applying styles.
Implementations§
Source§impl ElementHandler
impl ElementHandler
Sourcepub fn handle_item(&mut self, message: &str, style: Option<&Style>) -> String
pub fn handle_item(&mut self, message: &str, style: Option<&Style>) -> String
Apply provided Style and returns it’s representation.
It’ll call current defined Decorator::item (defined with DecoratorBuilder::build)
to prepare current style and block level representation combining it with message contents.
Every previous block levels, if applicable, with it’s styles, will be combined also to the final result.
message contents will not change and it doesn’t matter to style apply.
Sourcepub fn close_item(&mut self, amount: u32)
pub fn close_item(&mut self, amount: u32)
Close item blocks.
Auto Trait Implementations§
impl Freeze for ElementHandler
impl !RefUnwindSafe for ElementHandler
impl !Send for ElementHandler
impl !Sync for ElementHandler
impl Unpin for ElementHandler
impl !UnwindSafe for ElementHandler
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