pub struct ElementAttribute<'src> { /* private fields */ }Expand description
This struct represents a single element attribute.
Element attributes define the built-in and user-defined settings and metadata that can be applied to an individual block element or inline element in a document (including macros). Although the include directive is not technically an element, element attributes can also be defined on an include directive.
Implementations§
Source§impl<'src> ElementAttribute<'src>
impl<'src> ElementAttribute<'src>
Sourcepub fn name(&'src self) -> &'src Option<Span<'src>>
pub fn name(&'src self) -> &'src Option<Span<'src>>
Return a Span describing the attribute name.
Sourcepub fn shorthand_items(&'src self) -> &'src Vec<Span<'src>>
pub fn shorthand_items(&'src self) -> &'src Vec<Span<'src>>
Return the shorthand items, if parsed via parse_with_shorthand.
Sourcepub fn block_style(&'src self) -> Option<Span<'src>>
pub fn block_style(&'src self) -> Option<Span<'src>>
Return the block style name from shorthand syntax.
Sourcepub fn id(&'src self) -> Option<Span<'src>>
pub fn id(&'src self) -> Option<Span<'src>>
Return the id attribute from shorthand syntax.
If multiple id attributes were specified, only the first match is returned. (Multiple ids are not supported.)
Sourcepub fn roles(&'src self) -> Vec<Span<'src>>
pub fn roles(&'src self) -> Vec<Span<'src>>
Return any role attributes that were found in shorthand syntax.
Trait Implementations§
Source§impl<'src> Clone for ElementAttribute<'src>
impl<'src> Clone for ElementAttribute<'src>
Source§fn clone(&self) -> ElementAttribute<'src>
fn clone(&self) -> ElementAttribute<'src>
Returns a copy 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<'src> Debug for ElementAttribute<'src>
impl<'src> Debug for ElementAttribute<'src>
Source§impl<'src> HasSpan<'src> for ElementAttribute<'src>
impl<'src> HasSpan<'src> for ElementAttribute<'src>
Source§impl<'src> PartialEq for ElementAttribute<'src>
impl<'src> PartialEq for ElementAttribute<'src>
impl<'src> Eq for ElementAttribute<'src>
impl<'src> StructuralPartialEq for ElementAttribute<'src>
Auto Trait Implementations§
impl<'src> Freeze for ElementAttribute<'src>
impl<'src> RefUnwindSafe for ElementAttribute<'src>
impl<'src> Send for ElementAttribute<'src>
impl<'src> Sync for ElementAttribute<'src>
impl<'src> Unpin for ElementAttribute<'src>
impl<'src> UnwindSafe for ElementAttribute<'src>
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)