Struct rsvg::css::RsvgElement
source · pub struct RsvgElement(Node<NodeData>);
Expand description
Newtype wrapper around Node
so we can implement [selectors::Element
] for it.
Node
is an alias for rctree::Node
, so we can’t implement
selectors::Element
directly on it. We implement it on the
RsvgElement
wrapper instead.
Tuple Fields§
§0: Node<NodeData>
Trait Implementations§
source§impl Clone for RsvgElement
impl Clone for RsvgElement
source§fn clone(&self) -> RsvgElement
fn clone(&self) -> RsvgElement
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for RsvgElement
impl Debug for RsvgElement
source§impl Element for RsvgElement
impl Element for RsvgElement
source§fn parent_node_is_shadow_root(&self) -> bool
fn parent_node_is_shadow_root(&self) -> bool
Whether the parent node of this element is a shadow root.
source§fn containing_shadow_host(&self) -> Option<Self>
fn containing_shadow_host(&self) -> Option<Self>
The host of the containing shadow root, if any.
source§fn is_pseudo_element(&self) -> bool
fn is_pseudo_element(&self) -> bool
Whether we’re matching on a pseudo-element.
source§fn prev_sibling_element(&self) -> Option<Self>
fn prev_sibling_element(&self) -> Option<Self>
Skips non-element nodes
source§fn next_sibling_element(&self) -> Option<Self>
fn next_sibling_element(&self) -> Option<Self>
Skips non-element nodes
source§fn has_namespace(&self, ns: &Namespace) -> bool
fn has_namespace(&self, ns: &Namespace) -> bool
Empty string for no namespace
source§fn is_same_type(&self, other: &Self) -> bool
fn is_same_type(&self, other: &Self) -> bool
Whether this element and the other
element have the same local name and namespace.
source§fn is_html_slot_element(&self) -> bool
fn is_html_slot_element(&self) -> bool
Returns whether the element is an HTML <slot>
element.
source§fn is_empty(&self) -> bool
fn is_empty(&self) -> bool
Returns whether this element matches :empty
.
That is, whether it does not contain any child element or any non-zero-length text node. See http://dev.w3.org/csswg/selectors-3/#empty-pseudo.
source§fn is_root(&self) -> bool
fn is_root(&self) -> bool
Returns whether this element matches :root
,
i.e. whether it is the root element of a document.
Note: this can be false even if .parent_element()
is None
if the parent node is a DocumentFragment
.
source§fn first_element_child(&self) -> Option<Self>
fn first_element_child(&self) -> Option<Self>
Returns the first child element of this element.
source§fn apply_selector_flags(&self, _: ElementSelectorFlags)
fn apply_selector_flags(&self, _: ElementSelectorFlags)
Applies the given selector flags to this element.
type Impl = Selector
fn parent_element(&self) -> Option<Self>
fn is_html_element_in_html_document(&self) -> bool
fn has_local_name(&self, local_name: &LocalName) -> bool
fn attr_matches( &self, ns: &NamespaceConstraint<&Namespace>, local_name: &LocalName, operation: &AttrSelectorOperation<&AttributeValue> ) -> bool
fn match_non_ts_pseudo_class( &self, pc: &<Self::Impl as SelectorImpl>::NonTSPseudoClass, _context: &mut MatchingContext<'_, Self::Impl> ) -> bool
fn match_pseudo_element( &self, _pe: &<Self::Impl as SelectorImpl>::PseudoElement, _context: &mut MatchingContext<'_, Self::Impl> ) -> bool
fn has_id(&self, id: &Identifier, case_sensitivity: CaseSensitivity) -> bool
fn has_class( &self, name: &Identifier, case_sensitivity: CaseSensitivity ) -> bool
source§fn imported_part(&self, _name: &Identifier) -> Option<Identifier>
fn imported_part(&self, _name: &Identifier) -> Option<Identifier>
exportparts
attribute in the reverse
direction, that is, in an outer-tree -> inner-tree direction.fn is_part(&self, _name: &Identifier) -> bool
§fn pseudo_element_originating_element(&self) -> Option<Self>
fn pseudo_element_originating_element(&self) -> Option<Self>
fn has_attr_in_no_namespace( &self, local_name: &<Self::Impl as SelectorImpl>::LocalName ) -> bool
§fn assigned_slot(&self) -> Option<Self>
fn assigned_slot(&self) -> Option<Self>
§fn ignores_nth_child_selectors(&self) -> bool
fn ignores_nth_child_selectors(&self) -> bool
source§impl PartialEq for RsvgElement
impl PartialEq for RsvgElement
source§fn eq(&self, other: &RsvgElement) -> bool
fn eq(&self, other: &RsvgElement) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for RsvgElement
Auto Trait Implementations§
impl !RefUnwindSafe for RsvgElement
impl !Send for RsvgElement
impl !Sync for RsvgElement
impl Unpin for RsvgElement
impl !UnwindSafe for RsvgElement
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
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self
from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self
is actually part of its subset T
(and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset
but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self
to the equivalent element of its superset.