pub struct DomElement<'a> {
pub dom: &'a Dom,
pub id: NodeId,
}Expand description
A DOM element wrapper that implements crate::css_selectors::Element.
This is a lightweight handle: it borrows the Dom and holds a NodeId.
Created on-the-fly for selector matching.
Fields§
§dom: &'a Dom§id: NodeIdImplementations§
Trait Implementations§
Source§impl<'a> Clone for DomElement<'a>
impl<'a> Clone for DomElement<'a>
Source§fn clone(&self) -> DomElement<'a>
fn clone(&self) -> DomElement<'a>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'a> Debug for DomElement<'a>
impl<'a> Debug for DomElement<'a>
Source§impl<'a> Element for DomElement<'a>
impl<'a> Element for DomElement<'a>
fn local_name(&self) -> &str
fn namespace(&self) -> Option<&str>
fn id(&self) -> Option<&str>
fn has_class(&self, name: &str) -> bool
fn has_attribute(&self, name: &str) -> bool
fn attribute_value(&self, name: &str) -> Option<&str>
fn parent_element(&self) -> Option<Self>
fn prev_sibling_element(&self) -> Option<Self>
fn next_sibling_element(&self) -> Option<Self>
fn first_child_element(&self) -> Option<Self>
fn last_child_element(&self) -> Option<Self>
fn is_root(&self) -> bool
fn is_empty(&self) -> bool
fn is_link(&self) -> bool
fn is_visited(&self) -> bool
fn is_hover(&self) -> bool
fn is_active(&self) -> bool
fn is_focus(&self) -> bool
fn is_focus_within(&self) -> bool
fn is_focus_visible(&self) -> bool
fn is_enabled(&self) -> bool
fn is_disabled(&self) -> bool
fn is_checked(&self) -> bool
fn is_target(&self) -> bool
fn is_read_write(&self) -> bool
fn is_read_only(&self) -> bool
fn is_required(&self) -> bool
fn is_optional(&self) -> bool
fn is_valid(&self) -> bool
fn is_invalid(&self) -> bool
fn is_default(&self) -> bool
fn is_indeterminate(&self) -> bool
fn is_placeholder_shown(&self) -> bool
fn is_any_link(&self) -> bool
fn is_in_range(&self) -> bool
fn is_out_of_range(&self) -> bool
fn lang(&self) -> Option<&str>
fn child_elements(&self) -> Vec<Self>
fn sibling_index(&self) -> i32
fn sibling_index_from_end(&self) -> i32
fn sibling_type_index(&self) -> i32
fn sibling_type_index_from_end(&self) -> i32
fn sibling_type_count(&self) -> i32
Auto Trait Implementations§
impl<'a> Freeze for DomElement<'a>
impl<'a> RefUnwindSafe for DomElement<'a>
impl<'a> Send for DomElement<'a>
impl<'a> Sync for DomElement<'a>
impl<'a> Unpin for DomElement<'a>
impl<'a> UnsafeUnpin for DomElement<'a>
impl<'a> UnwindSafe for DomElement<'a>
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