pub struct NodeAttribute {
pub value: Option<String>,
pub offset: usize,
}
Expand description
§Node attribute
The value
is the value of the attribute at after ‘=’ sign, including quotes.
The ‘=’ sign must be immediately followed by the attribute name, otherwise it will be ignored.
§Boundary cases
-
The value is
None
if there is not ‘=’ sign. -
The value is
Some("".to_string())
if the ‘=’ sign is followed by a space.
Fields§
§value: Option<String>
include quote
offset: usize
start offset of attribute name
Implementations§
Source§impl NodeAttribute
impl NodeAttribute
Trait Implementations§
Source§impl Clone for NodeAttribute
impl Clone for NodeAttribute
Source§fn clone(&self) -> NodeAttribute
fn clone(&self) -> NodeAttribute
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 NodeAttribute
impl Debug for NodeAttribute
Source§impl PartialEq for NodeAttribute
impl PartialEq for NodeAttribute
impl StructuralPartialEq for NodeAttribute
Auto Trait Implementations§
impl Freeze for NodeAttribute
impl RefUnwindSafe for NodeAttribute
impl Send for NodeAttribute
impl Sync for NodeAttribute
impl Unpin for NodeAttribute
impl UnwindSafe for NodeAttribute
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