pub struct Document {
pub nodes: Vec<Node>,
pub style_elements: Vec<NodeId>,
pub style_set: Option<StyleSet>,
}
Fields§
§nodes: Vec<Node>
§style_elements: Vec<NodeId>
§style_set: Option<StyleSet>
Implementations§
Source§impl Document
impl Document
pub fn document_node_id() -> NodeId
pub fn parse_stylesheets(&self) -> StyleSet
Sourcepub fn html_link_elements(&self) -> impl Iterator<Item = (&str, &str)>
pub fn html_link_elements(&self) -> impl Iterator<Item = (&str, &str)>
(rel_attribute, href_attribute)
pub fn root_element(&self) -> NodeId
Sourcepub fn child_text_content(&self, node: NodeId) -> Cow<'_, String>
pub fn child_text_content(&self, node: NodeId) -> Cow<'_, String>
pub fn node_and_following_siblings<'a>( &'a self, node: NodeId, ) -> impl Iterator<Item = NodeId> + 'a
pub fn node_and_ancestors<'a>( &'a self, node: NodeId, ) -> impl Iterator<Item = NodeId> + 'a
pub fn nodes<'a>(&'a self) -> impl Iterator<Item = NodeId> + 'a
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Document
impl !RefUnwindSafe for Document
impl Send for Document
impl Sync for Document
impl Unpin for Document
impl UnwindSafe for Document
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more