pub struct HeldElement<'a>(/* private fields */);Expand description
An element a chain holds, as a comparison with a new element reads it: the element itself, or the node that keeps every value of it.
Implementations§
Source§impl HeldElement<'_>
impl HeldElement<'_>
Sourcepub fn element_type(&self) -> TypeId
pub fn element_type(&self) -> TypeId
The type of the element.
Sourcepub fn node_type(&self) -> TypeId
pub fn node_type(&self) -> TypeId
The type of the node the element makes: its own type for a plain element, which makes none.
Sourcepub fn capabilities(&self) -> NodeCapabilities
pub fn capabilities(&self) -> NodeCapabilities
The capabilities of the element’s node.
Sourcepub fn requires_update(&self) -> bool
pub fn requires_update(&self) -> bool
Whether the element asks for an update of its node even when equal: one its node holds never does, nor does a plain one.
Sourcepub fn is_kept_by_value(&self) -> bool
pub fn is_kept_by_value(&self) -> bool
Whether the chain keeps the element’s values, in its node or as words, in place of the element. Such an element asks for no update when equal, and an element equal to it is of its type, so that one asks for none either.
Sourcepub fn is(&self, element: &DynModifierElement) -> bool
pub fn is(&self, element: &DynModifierElement) -> bool
Whether element is this element itself, not only an equal one.
Sourcepub fn equals(&self, element: &dyn AnyModifierElement) -> bool
pub fn equals(&self, element: &dyn AnyModifierElement) -> bool
Whether element is of this element’s type with equal data.
Sourcepub fn plain<E: PlainElement>(&self) -> Option<E>
pub fn plain<E: PlainElement>(&self) -> Option<E>
The element’s value, when the chain keeps it as words of an E.
Sourcepub fn to_element(&self) -> DynModifierElement
pub fn to_element(&self) -> DynModifierElement
The element, made again from its node when the node holds it.