pub struct AttrList {
pub id: Option<String>,
pub classes: Vec<String>,
pub attributes: Vec<(String, String)>,
pub start: usize,
pub end: usize,
}Expand description
Parsed attribute list containing IDs, classes, and key-value pairs
Fields§
§id: Option<String>Custom ID (e.g., custom-id from {#custom-id})
classes: Vec<String>CSS classes (e.g., ["class1", "class2"] from {.class1 .class2})
attributes: Vec<(String, String)>Key-value attributes (e.g., [("target", "_blank")])
start: usizeStart position in the line (0-indexed)
end: usizeEnd position in the line (0-indexed, exclusive)
Implementations§
Source§impl AttrList
impl AttrList
Sourcepub fn has_classes(&self) -> bool
pub fn has_classes(&self) -> bool
Check if this attr_list has any classes
Sourcepub fn has_attributes(&self) -> bool
pub fn has_attributes(&self) -> bool
Check if this attr_list has any attributes
Trait Implementations§
impl StructuralPartialEq for AttrList
Auto Trait Implementations§
impl Freeze for AttrList
impl RefUnwindSafe for AttrList
impl Send for AttrList
impl Sync for AttrList
impl Unpin for AttrList
impl UnsafeUnpin for AttrList
impl UnwindSafe for AttrList
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