Trait IElementTrait

Source
pub trait IElementTrait: INodeTrait {
Show 25 methods // Required methods fn tag_name(&self) -> &str; fn child_nodes_length(&self) -> usize; fn child_nodes_item<'b>(&self, index: usize) -> Option<BoxDynNode<'b>>; fn get_attribute(&self, name: &str) -> Option<IAttrValue>; fn set_attribute(&mut self, name: &str, value: Option<&str>); fn remove_attribute(&mut self, name: &str); fn inner_html(&self) -> &str; fn outer_html(&self) -> &str; fn insert_adjacent( &mut self, position: &InsertPosition, ele: &BoxDynElement<'_>, ); fn remove_child(&mut self, ele: BoxDynElement<'_>); // Provided methods fn is(&self, ele: &BoxDynElement<'_>) -> bool { ... } fn root<'b>(&self) -> BoxDynElement<'b> { ... } fn cloned<'b>(&self) -> BoxDynElement<'b> { ... } fn next_element_sibling<'b>(&self) -> MaybeElement<'b> { ... } fn next_element_siblings<'b>(&self) -> Elements<'b> { ... } fn previous_element_sibling<'b>(&self) -> MaybeElement<'b> { ... } fn previous_element_siblings<'b>(&self) -> Elements<'b> { ... } fn siblings<'b>(&self) -> Elements<'b> { ... } fn child_nodes<'b>(&self) -> Vec<BoxDynNode<'b>> { ... } fn children<'b>(&self) -> Elements<'b> { ... } fn childrens<'b>(&self) -> Elements<'b> { ... } fn has_attribute(&self, name: &str) -> bool { ... } fn html(&self) -> &str { ... } fn texts<'b>(&self, _limit_depth: u32) -> Option<Texts<'b>> { ... } fn into_text<'b>(self: Box<Self>) -> Result<BoxDynText<'b>, Box<dyn Error>> { ... }
}

Required Methods§

Source

fn tag_name(&self) -> &str

Source

fn child_nodes_length(&self) -> usize

Source

fn child_nodes_item<'b>(&self, index: usize) -> Option<BoxDynNode<'b>>

Source

fn get_attribute(&self, name: &str) -> Option<IAttrValue>

Source

fn set_attribute(&mut self, name: &str, value: Option<&str>)

Source

fn remove_attribute(&mut self, name: &str)

Source

fn inner_html(&self) -> &str

Source

fn outer_html(&self) -> &str

Source

fn insert_adjacent( &mut self, position: &InsertPosition, ele: &BoxDynElement<'_>, )

Source

fn remove_child(&mut self, ele: BoxDynElement<'_>)

Provided Methods§

Source

fn is(&self, ele: &BoxDynElement<'_>) -> bool

Source

fn root<'b>(&self) -> BoxDynElement<'b>

Source

fn cloned<'b>(&self) -> BoxDynElement<'b>

Source

fn next_element_sibling<'b>(&self) -> MaybeElement<'b>

Source

fn next_element_siblings<'b>(&self) -> Elements<'b>

Source

fn previous_element_sibling<'b>(&self) -> MaybeElement<'b>

Source

fn previous_element_siblings<'b>(&self) -> Elements<'b>

Source

fn siblings<'b>(&self) -> Elements<'b>

Source

fn child_nodes<'b>(&self) -> Vec<BoxDynNode<'b>>

Source

fn children<'b>(&self) -> Elements<'b>

Source

fn childrens<'b>(&self) -> Elements<'b>

Source

fn has_attribute(&self, name: &str) -> bool

Source

fn html(&self) -> &str

Source

fn texts<'b>(&self, _limit_depth: u32) -> Option<Texts<'b>>

Source

fn into_text<'b>(self: Box<Self>) -> Result<BoxDynText<'b>, Box<dyn Error>>

Implementors§