Trait bracket::parser::ast::Element [−][src]
pub trait Element<'source> {
fn open(&self) -> &'source str;
fn close(&self) -> &'source str;
fn open_span(&self) -> &Range<usize>;
fn close_span(&self) -> &Option<Range<usize>>;
fn is_closed(&self) -> bool;
fn exit(&mut self, close: Range<usize>);
fn span(&self) -> Range<usize> { ... }
}
Expand description
Trait for elements that expect to be closed.
Required methods
Get the string for the close tag.
If no close span has been set which can happen if the element has no end tag this should return the empty string.
fn close_span(&self) -> &Option<Range<usize>>
fn close_span(&self) -> &Option<Range<usize>>
Get the span for the close tag.