pub struct Element { /* private fields */ }Expand description
An element.
Implementations§
Source§impl Element
impl Element
Sourcepub const fn new(
name: String,
attributes: Vec<(String, String)>,
children: Vec<Arc<Node>>,
) -> Self
pub const fn new( name: String, attributes: Vec<(String, String)>, children: Vec<Arc<Node>>, ) -> Self
Creates an element.
Sourcepub fn set_namespace(self, namespace: Option<String>) -> Self
pub fn set_namespace(self, namespace: Option<String>) -> Self
Sets a namespace.
Sourcepub fn attributes(&self) -> impl Iterator<Item = (&str, &str)>
pub fn attributes(&self) -> impl Iterator<Item = (&str, &str)>
Returns attributes.
Trait Implementations§
impl Eq for Element
impl StructuralPartialEq for Element
Auto Trait Implementations§
impl Freeze for Element
impl RefUnwindSafe for Element
impl Send for Element
impl Sync for Element
impl Unpin for Element
impl UnsafeUnpin for Element
impl UnwindSafe for Element
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