pub struct Tag<'a> {
pub name: Ann<Atom<'a>>,
pub parameters: Option<Vec<Node<'a>>>,
pub children: Vec<Node<'a>>,
pub rewrite_rules: Vec<RewriteRule<Node<'a>>>,
}
Fields§
§name: Ann<Atom<'a>>
§parameters: Option<Vec<Node<'a>>>
§children: Vec<Node<'a>>
Each child node generally should be an Enclosure
(with the CurlyBrace
kind).
Until perhaps the codegen.
rewrite_rules: Vec<RewriteRule<Node<'a>>>
Implementations§
Source§impl<'a> Tag<'a>
impl<'a> Tag<'a>
Sourcepub fn new(name: Ann<&'a str>, children: Vec<Node<'a>>) -> Self
pub fn new(name: Ann<&'a str>, children: Vec<Node<'a>>) -> Self
Some tag with no parameters and just children.
pub fn has_name(&self, name: &str) -> bool
pub fn insert_parameter(&mut self, value: Ann<&str>)
pub fn insert_unannotated_parameter(&mut self, value: &str)
pub fn get_parameter(&self, key: &str) -> Option<Ann<Atom<'a>>>
pub fn name(&self) -> &str
pub fn to_string(&self) -> String
pub fn is_heading_node(&self) -> bool
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Tag<'a>
impl<'a> RefUnwindSafe for Tag<'a>
impl<'a> Send for Tag<'a>
impl<'a> Sync for Tag<'a>
impl<'a> Unpin for Tag<'a>
impl<'a> UnwindSafe for Tag<'a>
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