pub struct HtmlElement { /* private fields */ }
Expand description
Trait Implementations§
Source§impl Clone for HtmlElement
impl Clone for HtmlElement
Source§fn clone(&self) -> HtmlElement
fn clone(&self) -> HtmlElement
Returns a duplicate 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 Debug for HtmlElement
impl Debug for HtmlElement
Source§impl Default for HtmlElement
impl Default for HtmlElement
Source§impl Display for HtmlElement
impl Display for HtmlElement
Source§impl Element for HtmlElement
impl Element for HtmlElement
Source§fn build(self) -> HtmlElement
fn build(self) -> HtmlElement
Construct html elements
Source§fn set_tag<S>(&mut self, tag: S) -> bool
fn set_tag<S>(&mut self, tag: S) -> bool
Change the tag of the element and return whether the change is successful
Source§fn get_attribute(&self, name: &str) -> Option<&AttributeValue>
fn get_attribute(&self, name: &str) -> Option<&AttributeValue>
Get the html attribute based on the given name
Source§fn mut_attribute(&mut self, name: &str) -> Option<&mut AttributeValue>
fn mut_attribute(&mut self, name: &str) -> Option<&mut AttributeValue>
Get the mutable html attribute based on the given name
Source§fn set_attribute<S>(&mut self, name: S, value: AttributeValue) -> bool
fn set_attribute<S>(&mut self, name: S, value: AttributeValue) -> bool
According to the given name, set the html attribute and return whether it is successful.
Source§fn get_classes(&self) -> impl Iterator<Item = &str>
fn get_classes(&self) -> impl Iterator<Item = &str>
Get the legal html class.
Source§fn set_classes<I>(&mut self, classes: I) -> bool
fn set_classes<I>(&mut self, classes: I) -> bool
Set html class and return whether successful
Source§fn remove_class<S>(&mut self, class: &str) -> bool
fn remove_class<S>(&mut self, class: &str) -> bool
Remove html class and return whether successful
Source§fn add_child<T>(&mut self, child: T) -> boolwhere
T: Into<HtmlNode>,
fn add_child<T>(&mut self, child: T) -> boolwhere
T: Into<HtmlNode>,
Add a child element and return whether successful
Source§fn get_children(&self) -> impl Iterator<Item = &HtmlNode>
fn get_children(&self) -> impl Iterator<Item = &HtmlNode>
Remove the child element based on the given index and return whether successful
Source§fn mut_children(&mut self) -> impl Iterator<Item = &mut HtmlNode>
fn mut_children(&mut self) -> impl Iterator<Item = &mut HtmlNode>
Get the mutable child element based on the given index
Source§fn set_children<I>(&mut self, children: I) -> boolwhere
I: Iterator<Item = HtmlNode>,
fn set_children<I>(&mut self, children: I) -> boolwhere
I: Iterator<Item = HtmlNode>,
Set the child element based on the given index and return whether successful
Source§fn get_child(&self, index: usize) -> Option<&HtmlNode>
fn get_child(&self, index: usize) -> Option<&HtmlNode>
Get the child element based on the given index
Auto Trait Implementations§
impl Freeze for HtmlElement
impl RefUnwindSafe for HtmlElement
impl Send for HtmlElement
impl Sync for HtmlElement
impl Unpin for HtmlElement
impl UnwindSafe for HtmlElement
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