Skip to main content

AnyModifierElement

Trait AnyModifierElement 

Source
pub trait AnyModifierElement: Debug {
Show 16 methods // Required methods fn element_type(&self) -> TypeId; fn maker(&self) -> ElementMaker<'_>; fn key(&self) -> Option<u64>; fn hash_code(&self) -> u64; fn equals_element(&self, other: &dyn AnyModifierElement) -> bool; fn inspector_name(&self) -> &'static str; fn record_inspector_properties( &self, visitor: &mut dyn FnMut(&'static str, String), ); fn requires_update(&self) -> bool; fn auto_invalidates_on_update(&self) -> bool; fn update_invalidation_kind(&self) -> Option<InvalidationKind>; fn as_any(&self) -> &dyn Any; // Provided methods fn capabilities(&self) -> NodeCapabilities { ... } fn provides_composition_locals(&self) -> bool { ... } fn provided_composition_locals(&self) -> Vec<ProvidedValue> { ... } fn equals_node(&self, _node: &dyn ModifierNode) -> bool { ... } fn equals_plain(&self, _fns: &PlainFns, _words: &[u32]) -> bool { ... }
}
Expand description

Type-erased modifier element used by the runtime to reconcile chains.

Required Methods§

Source

fn element_type(&self) -> TypeId

The type of the element itself.

Source

fn maker(&self) -> ElementMaker<'_>

How a chain keeps the element: by a node it makes, or as a value.

Source

fn key(&self) -> Option<u64>

The key that tells apart several elements of one type, or None when the element has none.

Source

fn hash_code(&self) -> u64

The hash of the element, computed once when the element was wrapped.

Source

fn equals_element(&self, other: &dyn AnyModifierElement) -> bool

Whether other is an element of the same type with equal data.

Source

fn inspector_name(&self) -> &'static str

The name that inspector tooling shows for the element.

Source

fn record_inspector_properties( &self, visitor: &mut dyn FnMut(&'static str, String), )

Reports each inspector property of the element to visitor as a name and a value.

Source

fn requires_update(&self) -> bool

Whether the node must be updated even when the new element equals the old one.

Source

fn auto_invalidates_on_update(&self) -> bool

Whether updating an existing node invalidates all pipeline stages that its capabilities cover.

Source

fn update_invalidation_kind(&self) -> Option<InvalidationKind>

The one pipeline stage that an update invalidates, or None to invalidate by capabilities.

Source

fn as_any(&self) -> &dyn Any

Returns the element as Any, for downcasting to its concrete type.

Provided Methods§

Source

fn capabilities(&self) -> NodeCapabilities

The capabilities of the nodes that the element creates.

Source

fn provides_composition_locals(&self) -> bool

Whether this element has composition locals for its content.

Source

fn provided_composition_locals(&self) -> Vec<ProvidedValue>

The composition locals this element hands to its content.

Source

fn equals_node(&self, _node: &dyn ModifierNode) -> bool

Whether node is of this element’s node type and keeps an element equal to this one: always false for an element whose node keeps none.

Source

fn equals_plain(&self, _fns: &PlainFns, _words: &[u32]) -> bool

Whether words, the value of a plain element of the type fns tells, hold a value equal to this element: always false for an element that is not plain.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§