pub enum TxtLineNode {
Comment(CommentNode),
Tag(TagNode),
Text(TextNode),
}
Available on crate feature
artemis
only.Expand description
Represents a node in a TXT line.
Variants§
Implementations§
Source§impl TxtLineNode
impl TxtLineNode
Sourcepub fn is_tag(&self, tag: &str) -> bool
pub fn is_tag(&self, tag: &str) -> bool
Checks if the node is a tag.
tag
- The name of the tag.
Sourcepub fn is_tag_blocked_name(&self, set: &HashSet<String>) -> bool
pub fn is_tag_blocked_name(&self, set: &HashSet<String>) -> bool
Returns true if the tag is a blocked name.
Sourcepub fn tag_attr_keys<'a>(&'a self) -> Box<dyn Iterator<Item = &'a str> + 'a>
pub fn tag_attr_keys<'a>(&'a self) -> Box<dyn Iterator<Item = &'a str> + 'a>
Returns an iterator over the keys of the attributes of the tag node.
pub fn tag_get_attr<'a>(&'a self, attr: &str) -> Option<&'a str>
Sourcepub fn tag_has_attr(&self, attr: &str) -> bool
pub fn tag_has_attr(&self, attr: &str) -> bool
Checks if the tag has a specific attribute.
pub fn tag_set_attr(&mut self, attr: &str, value: Option<String>)
Trait Implementations§
Source§impl Clone for TxtLineNode
impl Clone for TxtLineNode
Source§fn clone(&self) -> TxtLineNode
fn clone(&self) -> TxtLineNode
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for TxtLineNode
impl Debug for TxtLineNode
Source§impl Node for TxtLineNode
impl Node for TxtLineNode
Source§impl PartialEq for TxtLineNode
impl PartialEq for TxtLineNode
impl StructuralPartialEq for TxtLineNode
Auto Trait Implementations§
impl Freeze for TxtLineNode
impl RefUnwindSafe for TxtLineNode
impl Send for TxtLineNode
impl Sync for TxtLineNode
impl Unpin for TxtLineNode
impl UnwindSafe for TxtLineNode
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more