Node

Struct Node 

Source
pub struct Node {
Show 22 fields pub id: usize, pub parent: Option<usize>, pub children: Vec<usize>, pub layout_parent: Cell<Option<usize>>, pub layout_children: RefCell<Option<Vec<usize>>>, pub paint_children: RefCell<Option<Vec<usize>>>, pub flags: NodeFlags, pub data: NodeData, pub stylo_element_data: AtomicRefCell<Option<ElementData>>, pub selector_flags: AtomicRefCell<ElementSelectorFlags>, pub guard: SharedRwLock, pub element_state: ElementState, pub before: Option<usize>, pub after: Option<usize>, pub style: Style<Atom>, pub has_snapshot: bool, pub snapshot_handled: AtomicBool, pub display_constructed_as: Display, pub cache: Cache, pub unrounded_layout: Layout, pub final_layout: Layout, pub scroll_offset: Point<f64>, /* private fields */
}

Fields§

§id: usize

Our Id

§parent: Option<usize>

Our parent’s ID

§children: Vec<usize>§layout_parent: Cell<Option<usize>>

Our parent in the layout hierachy: a separate list that includes anonymous collections of inline elements

§layout_children: RefCell<Option<Vec<usize>>>

A separate child list that includes anonymous collections of inline elements

§paint_children: RefCell<Option<Vec<usize>>>

The same as layout_children, but sorted by z-index

§flags: NodeFlags§data: NodeData

Node type (Element, TextNode, etc) specific data

§stylo_element_data: AtomicRefCell<Option<ElementData>>§selector_flags: AtomicRefCell<ElementSelectorFlags>§guard: SharedRwLock§element_state: ElementState§before: Option<usize>§after: Option<usize>§style: Style<Atom>§has_snapshot: bool§snapshot_handled: AtomicBool§display_constructed_as: Display§cache: Cache§unrounded_layout: Layout§final_layout: Layout§scroll_offset: Point<f64>

Implementations§

Source§

impl Node

Source

pub fn pe_by_index(&self, index: usize) -> Option<usize>

Source

pub fn set_pe_by_index(&mut self, index: usize, value: Option<usize>)

Source

pub fn is_or_contains_block(&self) -> bool

Source

pub fn is_focussable(&self) -> bool

Source

pub fn set_restyle_hint(&self, hint: RestyleHint)

Source

pub fn damage_mut(&self) -> Option<AtomicRefMut<'_, RestyleDamage>>

Source

pub fn damage(&mut self) -> Option<RestyleDamage>

Source

pub fn set_damage(&self, damage: RestyleDamage)

Source

pub fn insert_damage(&mut self, damage: RestyleDamage)

Source

pub fn remove_damage(&self, damage: RestyleDamage)

Source

pub fn clear_damage_mut(&mut self)

Source

pub fn hover(&mut self)

Source

pub fn unhover(&mut self)

Source

pub fn is_hovered(&self) -> bool

Source

pub fn focus(&mut self)

Source

pub fn blur(&mut self)

Source

pub fn is_focussed(&self) -> bool

Source

pub fn active(&mut self)

Source

pub fn unactive(&mut self)

Source

pub fn is_active(&self) -> bool

Source§

impl Node

Source

pub fn tree(&self) -> &Slab<Node>

Source

pub fn with(&self, id: usize) -> &Node

Source

pub fn print_tree(&self, level: usize)

Source

pub fn index_of_child(&self, child_id: usize) -> Option<usize>

Source

pub fn child_index(&self) -> Option<usize>

Source

pub fn forward(&self, n: usize) -> Option<&Node>

Source

pub fn backward(&self, n: usize) -> Option<&Node>

Source

pub fn is_element(&self) -> bool

Source

pub fn is_anonymous(&self) -> bool

Source

pub fn is_text_node(&self) -> bool

Source

pub fn element_data(&self) -> Option<&ElementData>

Source

pub fn element_data_mut(&mut self) -> Option<&mut ElementData>

Source

pub fn text_data(&self) -> Option<&TextNodeData>

Source

pub fn text_data_mut(&mut self) -> Option<&mut TextNodeData>

Source

pub fn node_debug_str(&self) -> String

Source

pub fn outer_html(&self) -> String

Source

pub fn write_outer_html(&self, writer: &mut String)

Source

pub fn attrs(&self) -> Option<&[Attribute]>

Source

pub fn attr(&self, name: LocalName) -> Option<&str>

Source

pub fn primary_styles(&self) -> Option<AtomicRef<'_, ComputedValues>>

Source

pub fn text_content(&self) -> String

Source

pub fn flush_style_attribute(&mut self, url_extra_data: &UrlExtraData)

Source

pub fn order(&self) -> i32

Source

pub fn z_index(&self) -> i32

Source

pub fn hit(&self, x: f32, y: f32) -> Option<HitResult>

Takes an (x, y) position (relative to the parent’s top-left corner) and returns:

  • None if the position is outside of this node’s bounds
  • Some(HitResult) if the position is within the node but doesn’t match any children
  • The result of recursively calling child.hit() on the the child element that is positioned at that position if there is one.

TODO: z-index (If multiple children are positioned at the position then a random one will be recursed into)

Source

pub fn absolute_position(&self, x: f32, y: f32) -> Point<f32>

Computes the Document-relative coordinates of the Node

Source

pub fn synthetic_click_event(&self, mods: Modifiers) -> DomEventData

Creates a synthetic click event

Source

pub fn synthetic_click_event_data( &self, mods: Modifiers, ) -> BlitzMouseButtonEvent

Trait Implementations§

Source§

impl Debug for Node

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Element for &'_ Node

Source§

type Impl = SelectorImpl

Source§

fn opaque(&self) -> OpaqueElement

Converts self into an opaque representation.
Source§

fn parent_element(&self) -> Option<Self>

Source§

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>

The host of the containing shadow root, if any.
Source§

fn is_pseudo_element(&self) -> bool

Whether we’re matching on a pseudo-element.
Source§

fn prev_sibling_element(&self) -> Option<Self>

Skips non-element nodes
Source§

fn next_sibling_element(&self) -> Option<Self>

Skips non-element nodes
Source§

fn first_element_child(&self) -> Option<Self>

Skips non-element nodes
Source§

fn is_html_element_in_html_document(&self) -> bool

Source§

fn has_local_name(&self, local_name: &LocalName) -> bool

Source§

fn has_namespace(&self, ns: &Namespace) -> bool

Empty string for no namespace
Source§

fn is_same_type(&self, other: &Self) -> bool

Whether this element and the other element have the same local name and namespace.
Source§

fn attr_matches( &self, _ns: &NamespaceConstraint<&GenericAtomIdent<NamespaceStaticSet>>, local_name: &GenericAtomIdent<LocalNameStaticSet>, operation: &AttrSelectorOperation<&AtomString>, ) -> bool

Source§

fn match_non_ts_pseudo_class( &self, pseudo_class: &<Self::Impl as SelectorImpl>::NonTSPseudoClass, _context: &mut MatchingContext<'_, Self::Impl>, ) -> bool

Source§

fn match_pseudo_element( &self, pe: &PseudoElement, _context: &mut MatchingContext<'_, Self::Impl>, ) -> bool

Source§

fn apply_selector_flags(&self, flags: ElementSelectorFlags)

Sets selector flags on the elemnt itself or the parent, depending on the flags, which indicate what kind of work may need to be performed when DOM state changes.
Whether this element is a link.
Source§

fn is_html_slot_element(&self) -> bool

Returns whether the element is an HTML element.
Source§

fn has_id( &self, id: &<Self::Impl as SelectorImpl>::Identifier, case_sensitivity: CaseSensitivity, ) -> bool

Source§

fn has_class( &self, search_name: &<Self::Impl as SelectorImpl>::Identifier, case_sensitivity: CaseSensitivity, ) -> bool

Source§

fn imported_part( &self, _name: &<Self::Impl as SelectorImpl>::Identifier, ) -> Option<<Self::Impl as SelectorImpl>::Identifier>

Returns the mapping from the exportparts attribute in the reverse direction, that is, in an outer-tree -> inner-tree direction.
Source§

fn is_part(&self, _name: &<Self::Impl as SelectorImpl>::Identifier) -> bool

Source§

fn is_empty(&self) -> bool

Returns whether this element matches :empty. Read more
Source§

fn is_root(&self) -> bool

Returns whether this element matches :root, i.e. whether it is the root element of a document. Read more
Source§

fn has_custom_state( &self, _name: &<Self::Impl as SelectorImpl>::Identifier, ) -> bool

Source§

fn add_element_unique_hashes(&self, _filter: &mut BloomFilter) -> bool

Add hashes unique to this element to the given filter, returning true if any got added.
Source§

fn pseudo_element_originating_element(&self) -> Option<Self>

The parent of a given pseudo-element, after matching a pseudo-element selector. Read more
Source§

fn has_attr_in_no_namespace( &self, local_name: &<Self::Impl as SelectorImpl>::LocalName, ) -> bool

Source§

fn assigned_slot(&self) -> Option<Self>

Returns the assigned element this element is assigned to. Read more
Source§

fn ignores_nth_child_selectors(&self) -> bool

Returns whether this element should ignore matching nth child selector.
Source§

impl Hash for &'_ Node

Source§

fn hash<H: Hasher>(&self, state: &mut H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl NodeInfo for &'_ Node

Source§

fn is_element(&self) -> bool

Whether this node is an element.
Source§

fn is_text_node(&self) -> bool

Whether this node is a text node.
Source§

impl PartialEq for Node

It might be wrong to expose this since what does equality mean outside the dom?

Source§

fn eq(&self, other: &Self) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<'a> TDocument for &'a Node

Source§

type ConcreteNode = &'a Node

The concrete TNode type.
Source§

fn as_node(&self) -> Self::ConcreteNode

Get this document as a TNode.
Source§

fn is_html_document(&self) -> bool

Returns whether this document is an HTML document.
Source§

fn quirks_mode(&self) -> QuirksMode

Returns the quirks mode of this document.
Source§

fn shared_lock(&self) -> &SharedRwLock

This document’s shared lock.
Source§

fn elements_with_id<'a>( &self, _id: &GenericAtomIdent<AtomStaticSet>, ) -> Result<&'a [<Self::ConcreteNode as TNode>::ConcreteElement], ()>
where Self: 'a,

Get a list of elements with a given ID in this document, sorted by tree position. Read more
Source§

impl<'a> TElement for &'a Node

Source§

type ConcreteNode = &'a Node

The concrete node type.
Source§

type TraversalChildrenIterator = Traverser<'a>

A concrete children iterator type in order to iterate over the Nodes. Read more
Source§

fn as_node(&self) -> Self::ConcreteNode

Get this element as a node.
Source§

fn implicit_scope_for_sheet_in_shadow_root( _opaque_host: OpaqueElement, _sheet_index: usize, ) -> Option<ImplicitScopeRoot>

Returns the implicit scope root for given sheet index and host.
Source§

fn traversal_children(&self) -> LayoutIterator<Self::TraversalChildrenIterator>

Get this node’s children from the perspective of a restyle traversal.
Source§

fn is_html_element(&self) -> bool

Return whether this element is an element in the HTML namespace.
Source§

fn is_mathml_element(&self) -> bool

Return whether this element is an element in the MathML namespace.
Source§

fn is_svg_element(&self) -> bool

Return whether this element is an element in the SVG namespace.
Source§

fn style_attribute( &self, ) -> Option<ArcBorrow<'_, Locked<PropertyDeclarationBlock>>>

Get this element’s style attribute.
Source§

fn state(&self) -> ElementState

Get this element’s state, for non-tree-structural pseudos.
Source§

fn has_part_attr(&self) -> bool

Returns whether this element has a part attribute.
Source§

fn exports_any_part(&self) -> bool

Returns whether this element exports any part from its shadow tree.
Source§

fn id(&self) -> Option<&Atom>

The ID for this element.
Source§

fn each_class<F>(&self, callback: F)
where F: FnMut(&AtomIdent),

Internal iterator for the classes of this element.
Source§

fn each_attr_name<F>(&self, callback: F)
where F: FnMut(&LocalName),

Internal iterator for the attribute names of this element.
Source§

fn has_dirty_descendants(&self) -> bool

Returns true if this element may have a descendant needing style processing. Read more
Source§

fn has_snapshot(&self) -> bool

Returns whether state or attributes that may change style have changed on the element, and thus whether the element has been snapshotted to do restyle hint computation.
Source§

fn handled_snapshot(&self) -> bool

Returns whether the current snapshot if present has been handled.
Source§

unsafe fn set_handled_snapshot(&self)

Flags this element as having handled already its snapshot.
Source§

unsafe fn set_dirty_descendants(&self)

Flag that this element has a descendant for style processing. Read more
Source§

unsafe fn unset_dirty_descendants(&self)

Flag that this element has no descendant for style processing. Read more
Source§

fn store_children_to_process(&self, _n: isize)

Atomically stores the number of children of this node that we will need to process during bottom-up traversal.
Source§

fn did_process_child(&self) -> isize

Atomically notes that a child has been processed during bottom-up traversal. Returns the number of children left to process.
Source§

unsafe fn ensure_data(&self) -> AtomicRefMut<'_, ElementData>

Gets a reference to the ElementData container, or creates one. Read more
Source§

unsafe fn clear_data(&self)

Clears the element data reference, if any. Read more
Source§

fn has_data(&self) -> bool

Whether there is an ElementData container.
Source§

fn borrow_data(&self) -> Option<AtomicRef<'_, ElementData>>

Immutably borrows the ElementData.
Source§

fn mutate_data(&self) -> Option<AtomicRefMut<'_, ElementData>>

Mutably borrows the ElementData.
Source§

fn skip_item_display_fixup(&self) -> bool

Whether we should skip any root- or item-based display property blockification on this element. (This function exists so that Gecko native anonymous content can opt out of this style fixup.)
Source§

fn may_have_animations(&self) -> bool

In Gecko, element has a flag that represents the element may have any type of animations or not to bail out animation stuff early. Whereas Servo doesn’t have such flag.
Source§

fn has_animations(&self, context: &SharedStyleContext<'_>) -> bool

Returns true if the element has relevant animations. Relevant animations are those animations that are affecting the element’s style or are scheduled to do so in the future.
Source§

fn has_css_animations( &self, context: &SharedStyleContext<'_>, pseudo_element: Option<PseudoElement>, ) -> bool

Returns true if the element has a CSS animation. The context and pseudo_element arguments are only used by Servo, since it stores animations globally and pseudo-elements are not in the DOM.
Source§

fn has_css_transitions( &self, context: &SharedStyleContext<'_>, pseudo_element: Option<PseudoElement>, ) -> bool

Returns true if the element has a CSS transition (including running transitions and completed transitions). The context and pseudo_element arguments are only used by Servo, since it stores animations globally and pseudo-elements are not in the DOM.
Source§

fn animation_rule( &self, context: &SharedStyleContext<'_>, ) -> Option<Arc<Locked<PropertyDeclarationBlock>>>

Get this element’s animation rule.
Source§

fn transition_rule( &self, context: &SharedStyleContext<'_>, ) -> Option<Arc<Locked<PropertyDeclarationBlock>>>

Get this element’s transition rule.
Source§

fn shadow_root( &self, ) -> Option<<Self::ConcreteNode as TNode>::ConcreteShadowRoot>

The shadow root this element is a host of.
Source§

fn containing_shadow( &self, ) -> Option<<Self::ConcreteNode as TNode>::ConcreteShadowRoot>

The shadow root which roots the subtree this element is contained in.
Source§

fn lang_attr(&self) -> Option<AttrValue>

Returns the value of the xml:lang="" attribute (or, if appropriate, the lang="" attribute) on this element.
Source§

fn match_element_lang( &self, _override_lang: Option<Option<AttrValue>>, _value: &Lang, ) -> bool

Returns whether this element’s language matches the language tag value. If override_lang is not None, it specifies the value of the xml:lang="" or lang="" attribute to use in place of looking at the element and its ancestors. (This argument is used to implement matching of :lang() against snapshots.)
Source§

fn is_html_document_body_element(&self) -> bool

Returns whether this element is the main body element of the HTML document it is on.
Source§

fn synthesize_presentational_hints_for_legacy_attributes<V>( &self, _visited_handling: VisitedHandlingMode, hints: &mut V, )

Generate the proper applicable declarations due to presentational hints, and insert them into hints.
Source§

fn local_name(&self) -> &LocalName

Returns element’s local name.
Source§

fn namespace(&self) -> &Namespace

Returns element’s namespace.
Source§

fn query_container_size(&self, _display: &Display) -> Size2D<Option<Au>>

Returns the size of the element to be used in container size queries. This will usually be the size of the content area of the primary box, but can be None if there is no box or if some axis lacks size containment.
Source§

fn each_custom_state<F>(&self, _callback: F)
where F: FnMut(&AtomIdent),

Internal iterator for the classes of this element.
Source§

fn has_selector_flags(&self, flags: ElementSelectorFlags) -> bool

Returns true if the element has all of specified selector flags.
Source§

fn relative_selector_search_direction(&self) -> ElementSelectorFlags

Returns the search direction for relative selector invalidation, if it is on the search path.
Source§

fn compute_layout_damage( old: &ComputedValues, new: &ComputedValues, ) -> RestyleDamage

Compute the damage incurred by the change from the _old to _new.
Source§

fn owner_doc_matches_for_testing(&self, _: &Device) -> bool

A debug-only check that the device’s owner doc matches the actual doc we’re the root of. Read more
Source§

fn matches_user_and_content_rules(&self) -> bool

Whether this element should match user and content rules. Read more
Source§

fn traversal_parent(&self) -> Option<Self>

Get this node’s parent element from the perspective of a restyle traversal.
Source§

fn inheritance_parent(&self) -> Option<Self>

Returns the parent element we should inherit from. Read more
Source§

fn each_anonymous_content_child<F>(&self, _f: F)
where F: FnMut(Self),

Execute f for each anonymous content child (apart from ::before and ::after) whose originating element is self.
Source§

fn is_xul_element(&self) -> bool

Return whether this element is an element in the XUL namespace.
Source§

fn slotted_nodes(&self) -> &[Self::ConcreteNode]

Return the list of slotted nodes of this node.
Source§

fn unset_dirty_style_attribute(&self)

Unset the style attribute’s dirty bit. Servo doesn’t need to manage ditry bit for style attribute.
Source§

fn smil_override( &self, ) -> Option<ArcBorrow<'_, Locked<PropertyDeclarationBlock>>>

Get this element’s SMIL override declarations.
Source§

fn animation_declarations( &self, context: &SharedStyleContext<'_>, ) -> AnimationDeclarations

Get the combined animation and transition rules. Read more
Source§

fn each_part<F>(&self, _callback: F)

Internal iterator for the part names of this element.
Source§

fn each_exported_part<F>( &self, _name: &GenericAtomIdent<AtomStaticSet>, _callback: F, )

Internal iterator for the part names that this element exports for a given part name.
Source§

fn may_generate_pseudo( &self, pseudo: &PseudoElement, _primary_style: &ComputedValues, ) -> bool

Whether a given element may generate a pseudo-element. Read more
Source§

fn has_current_styles(&self, data: &ElementData) -> bool

Returns whether the element’s styles are up-to-date after traversal (i.e. in post traversal).
Source§

fn has_animation_only_dirty_descendants(&self) -> bool

Similar to the dirty_descendants but for representing a descendant of the element needs to be updated in animation-only traversal.
Source§

unsafe fn set_animation_only_dirty_descendants(&self)

Flag that this element has a descendant for animation-only restyle processing. Read more
Source§

unsafe fn unset_animation_only_dirty_descendants(&self)

Flag that this element has no descendant for animation-only restyle processing. Read more
Source§

unsafe fn clear_descendant_bits(&self)

Clear all bits related describing the dirtiness of descendants. Read more
Returns true if this element is a visited link. Read more
Source§

fn implemented_pseudo_element(&self) -> Option<PseudoElement>

Returns the pseudo-element implemented by this element, if any. Read more
Source§

fn has_animation_restyle_hints(&self) -> bool

Returns true if the element has animation restyle hints.
Source§

fn rule_hash_target(&self) -> Self

Return the element which we can use to look up rules in the selector maps. Read more
Source§

fn each_applicable_non_document_style_rule_data<'a, F>(&self, f: F) -> bool
where Self: 'a, F: FnMut(&'a CascadeData, Self),

Executes the callback for each applicable style rule data which isn’t the main document’s data (which stores UA / author rules). Read more
Source§

fn synthesize_view_transition_dynamic_rules<V>(&self, _rules: &mut V)

Generate the proper applicable declarations due to view transition dynamic rules, and insert them into rules. https://drafts.csswg.org/css-view-transitions-1/#document-dynamic-view-transition-style-sheet
Source§

impl<'a> TNode for &'a Node

Source§

type ConcreteElement = &'a Node

The concrete TElement type.
Source§

type ConcreteDocument = &'a Node

The concrete TDocument type.
Source§

type ConcreteShadowRoot = &'a Node

The concrete TShadowRoot type.
Source§

fn parent_node(&self) -> Option<Self>

Get this node’s parent node.
Source§

fn first_child(&self) -> Option<Self>

Get this node’s first child.
Source§

fn last_child(&self) -> Option<Self>

Get this node’s last child.
Source§

fn prev_sibling(&self) -> Option<Self>

Get this node’s previous sibling.
Source§

fn next_sibling(&self) -> Option<Self>

Get this node’s next sibling.
Source§

fn owner_doc(&self) -> Self::ConcreteDocument

Get the owner document of this node.
Source§

fn is_in_document(&self) -> bool

Returns whether the node is attached to a document.
Source§

fn traversal_parent(&self) -> Option<Self::ConcreteElement>

Get this node’s parent element from the perspective of a restyle traversal.
Source§

fn opaque(&self) -> OpaqueNode

Converts self into an OpaqueNode.
Source§

fn debug_id(self) -> usize

A debug id, only useful, mm… for debugging.
Source§

fn as_element(&self) -> Option<Self::ConcreteElement>

Get this node as an element, if it’s one.
Source§

fn as_document(&self) -> Option<Self::ConcreteDocument>

Get this node as a document, if it’s one.
Source§

fn as_shadow_root(&self) -> Option<Self::ConcreteShadowRoot>

Get this node as a ShadowRoot, if it’s one.
Source§

fn dom_children(&self) -> DomChildren<Self>

Iterate over the DOM children of a node.
Source§

fn dom_descendants(&self) -> DomDescendants<Self>

Iterate over the DOM children of a node, in preorder.
Source§

fn next_in_preorder(&self, scoped_to: Self) -> Option<Self>

Returns the next node after this one, in a pre-order tree-traversal of the subtree rooted at scoped_to.
Source§

fn depth(&self) -> usize

Returns the depth of this node in the DOM.
Source§

fn parent_element(&self) -> Option<Self::ConcreteElement>

Get this node’s parent element if present.
Source§

fn parent_element_or_host(&self) -> Option<Self::ConcreteElement>

Get this node’s parent element, or shadow host if it’s a shadow root.
Source§

impl<'a> TShadowRoot for &'a Node

Source§

type ConcreteNode = &'a Node

The concrete node type.
Source§

fn as_node(&self) -> Self::ConcreteNode

Get this ShadowRoot as a node.
Source§

fn host(&self) -> <Self::ConcreteNode as TNode>::ConcreteElement

Get the shadow host that hosts this ShadowRoot.
Source§

fn style_data<'b>(&self) -> Option<&'b CascadeData>
where Self: 'b,

Get the style data for this ShadowRoot.
Source§

fn parts<'a>(&self) -> &[<Self::ConcreteNode as TNode>::ConcreteElement]
where Self: 'a,

Get the list of shadow parts for this shadow root.
Source§

fn elements_with_id<'a>( &self, _id: &GenericAtomIdent<AtomStaticSet>, ) -> Result<&'a [<Self::ConcreteNode as TNode>::ConcreteElement], ()>
where Self: 'a,

Get a list of elements with a given ID in this shadow root, sorted by tree position. Read more
Source§

fn implicit_scope_for_sheet( &self, _sheet_index: usize, ) -> Option<ImplicitScopeRoot>

Get the implicit scope for a stylesheet in given index.
Source§

impl Eq for Node

Source§

impl Send for Node

Source§

impl Sync for Node

Auto Trait Implementations§

§

impl !Freeze for Node

§

impl !RefUnwindSafe for Node

§

impl Unpin for Node

§

impl !UnwindSafe for Node

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

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
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> MaybeBoxed<Box<T>> for T

Source§

fn maybe_boxed(self) -> Box<T>

Convert
Source§

impl<T> MaybeBoxed<T> for T

Source§

fn maybe_boxed(self) -> T

Convert
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> ErasedDestructor for T
where T: 'static,