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 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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