pub struct HtmlTag {
pub name: String,
pub attributes: HashMap<String, String>,
}Expand description
An HTML tag and its attributes.
Fields§
§name: StringName of the tag.
attributes: HashMap<String, String>Map of the tag’s attributes and their corresponding values. Example: Attributes of
Implementations§
Source§impl HtmlTag
impl HtmlTag
Sourcepub fn get_text(
&self,
doc_node: &DocumentNode,
document: &HtmlDocument,
) -> Option<String>
pub fn get_text( &self, doc_node: &DocumentNode, document: &HtmlDocument, ) -> Option<String>
Gets any direct HtmlNode::Text children and concatenates them into a single string separated by a space character if no whitespace already separates them.
Sourcepub fn get_all_text(
&self,
doc_node: &DocumentNode,
document: &HtmlDocument,
) -> Option<String>
pub fn get_all_text( &self, doc_node: &DocumentNode, document: &HtmlDocument, ) -> Option<String>
Gets all HtmlNode::Text children and concatenates them into a single string separated by a space character if no whitespace already separates them.
Trait Implementations§
impl StructuralPartialEq for HtmlTag
Auto Trait Implementations§
impl Freeze for HtmlTag
impl RefUnwindSafe for HtmlTag
impl Send for HtmlTag
impl Sync for HtmlTag
impl Unpin for HtmlTag
impl UnwindSafe for HtmlTag
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