pub trait HtmlElement:
Sized
+ Debug
+ Clone {
type Backend: Backend;
type Selector: CssSelector;
// Required methods
fn select(&self, selector: &Self::Selector) -> Vec<Self>;
fn text_contents(&self) -> String;
fn attribute<S>(&self, attr: S) -> Option<&str>
where S: AsRef<str>;
fn child_nodes(&self) -> Vec<HtmlNode<'_, Self::Backend>>;
}
Expand description
HTML Element
Required Associated Types§
Required Methods§
fn select(&self, selector: &Self::Selector) -> Vec<Self>
fn text_contents(&self) -> String
fn attribute<S>(&self, attr: S) -> Option<&str>
fn child_nodes(&self) -> Vec<HtmlNode<'_, Self::Backend>>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.