pub struct Attributes { /* private fields */ }Expand description
A list of attributes in the order in which they appear in the markup stream
Implementations§
Source§impl Attributes
impl Attributes
Sourcepub fn is_empty(&self) -> bool
pub fn is_empty(&self) -> bool
Returns true if the Attributes list is empty
Sourcepub fn add(
&mut self,
ns_stack: &mut NamespaceStack<'_>,
prefix: &str,
name: &str,
value: String,
) -> MarkupResult<()>
pub fn add( &mut self, ns_stack: &mut NamespaceStack<'_>, prefix: &str, name: &str, value: String, ) -> MarkupResult<()>
Add a prefix/name and value to the Attributes list, using the NamespaceStack to resolve the prefix into a URI
Sourcepub fn steal(&mut self, v: &mut Self)
pub fn steal(&mut self, v: &mut Self)
Take all the attributes away from another Attributes and add them to this
Sourcepub fn attributes(&self) -> &[Attribute]
pub fn attributes(&self) -> &[Attribute]
Borrow the Attribute vec
Trait Implementations§
Source§impl Debug for Attributes
impl Debug for Attributes
Source§impl Default for Attributes
impl Default for Attributes
Source§fn default() -> Attributes
fn default() -> Attributes
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for Attributes
impl RefUnwindSafe for Attributes
impl Send for Attributes
impl Sync for Attributes
impl Unpin for Attributes
impl UnwindSafe for Attributes
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