pub(crate) struct XPathWrapper<T>(pub T);
Expand description
Wrapper type that allows us to define xpath traits on the relevant types,
since they’re not defined in script
.
Tuple Fields§
§0: T
Implementations§
Source§impl<T> XPathWrapper<T>
impl<T> XPathWrapper<T>
pub(crate) fn into_inner(self) -> T
Trait Implementations§
Source§impl<T: Clone> Clone for XPathWrapper<T>
impl<T: Clone> Clone for XPathWrapper<T>
Source§fn clone(&self) -> XPathWrapper<T>
fn clone(&self) -> XPathWrapper<T>
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<T: Debug> Debug for XPathWrapper<T>
impl<T: Debug> Debug for XPathWrapper<T>
Source§impl Document for XPathWrapper<DomRoot<Document>>
impl Document for XPathWrapper<DomRoot<Document>>
type Node = XPathWrapper<Root<Dom<Node>>>
fn is_html_document(&self) -> bool
fn get_elements_with_id( &self, id: &str, ) -> impl Iterator<Item = XPathWrapper<DomRoot<Element>>>
Source§impl Element for XPathWrapper<DomRoot<Element>>
impl Element for XPathWrapper<DomRoot<Element>>
type Node = XPathWrapper<Root<Dom<Node>>>
type Attribute = XPathWrapper<Root<Dom<Attr>>>
fn as_node(&self) -> Self::Node
fn attributes(&self) -> impl Iterator<Item = Self::Attribute>
fn prefix(&self) -> Option<Prefix>
fn namespace(&self) -> Namespace
fn local_name(&self) -> LocalName
Source§impl<T> From<T> for XPathWrapper<T>
impl<T> From<T> for XPathWrapper<T>
Source§impl NamespaceResolver<Error> for XPathWrapper<Rc<XPathNSResolver<DomTypeHolder>>>
impl NamespaceResolver<Error> for XPathWrapper<Rc<XPathNSResolver<DomTypeHolder>>>
Source§impl Node for XPathWrapper<DomRoot<Node>>
impl Node for XPathWrapper<DomRoot<Node>>
type ProcessingInstruction = XPathWrapper<Root<Dom<ProcessingInstruction>>>
type Document = XPathWrapper<Root<Dom<Document>>>
type Attribute = XPathWrapper<Root<Dom<Attr>>>
type Element = XPathWrapper<Root<Dom<Element>>>
fn is_comment(&self) -> bool
fn is_text(&self) -> bool
Source§fn text_content(&self) -> String
fn text_content(&self) -> String
Equivalent to
textContent
attribute.fn parent(&self) -> Option<Self>
fn children(&self) -> impl Iterator<Item = Self>
Source§fn compare_tree_order(&self, other: &Self) -> Ordering
fn compare_tree_order(&self, other: &Self) -> Ordering
Source§fn traverse_preorder(&self) -> impl Iterator<Item = Self>
fn traverse_preorder(&self) -> impl Iterator<Item = Self>
A non-shadow-including preorder traversal.
fn inclusive_ancestors(&self) -> impl Iterator<Item = Self>
fn preceding_nodes(&self, root: &Self) -> impl Iterator<Item = Self>
fn following_nodes(&self, root: &Self) -> impl Iterator<Item = Self>
fn preceding_siblings(&self) -> impl Iterator<Item = Self>
fn following_siblings(&self) -> impl Iterator<Item = Self>
fn owner_document(&self) -> Self::Document
fn to_opaque(&self) -> impl Eq + Hash
fn as_processing_instruction(&self) -> Option<Self::ProcessingInstruction>
fn as_attribute(&self) -> Option<Self::Attribute>
fn as_element(&self) -> Option<Self::Element>
fn lookup_namespace_uri(&self, uri: Option<&str>) -> Option<String>
Source§impl<T: PartialEq> PartialEq for XPathWrapper<T>
impl<T: PartialEq> PartialEq for XPathWrapper<T>
impl<T: Eq> Eq for XPathWrapper<T>
impl<T> StructuralPartialEq for XPathWrapper<T>
Auto Trait Implementations§
impl<T> Freeze for XPathWrapper<T>where
T: Freeze,
impl<T> RefUnwindSafe for XPathWrapper<T>where
T: RefUnwindSafe,
impl<T> Send for XPathWrapper<T>where
T: Send,
impl<T> Sync for XPathWrapper<T>where
T: Sync,
impl<T> Unpin for XPathWrapper<T>where
T: Unpin,
impl<T> UnwindSafe for XPathWrapper<T>where
T: UnwindSafe,
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.Source§impl<T> Filterable for T
impl<T> Filterable for T
Source§fn filterable(
self,
filter_name: &'static str,
) -> RequestFilterDataProvider<T, fn(DataRequest<'_>) -> bool>
fn filterable( self, filter_name: &'static str, ) -> RequestFilterDataProvider<T, fn(DataRequest<'_>) -> bool>
Creates a filterable data provider with the given name for debugging. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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 moreSource§impl<T> MaybeBoxed<Box<T>> for T
impl<T> MaybeBoxed<Box<T>> for T
Source§fn maybe_boxed(self) -> Box<T>
fn maybe_boxed(self) -> Box<T>
Convert
Source§impl<T> MaybeBoxed<T> for T
impl<T> MaybeBoxed<T> for T
Source§fn maybe_boxed(self) -> T
fn maybe_boxed(self) -> T
Convert