pub struct NodeInterface { /* private fields */ }Expand description
Runtime inspection handle for an expanded node.
Implementations§
Source§impl NodeInterface
impl NodeInterface
Sourcepub fn global_id(&self) -> Option<UniqueTemplateNodeIdentifier>
pub fn global_id(&self) -> Option<UniqueTemplateNodeIdentifier>
Compiler-global template id for this node, if it originated from a template node.
Sourcepub fn engine_id(&self) -> ExpandedNodeIdentifier
pub fn engine_id(&self) -> ExpandedNodeIdentifier
Runtime-expanded id for this concrete node.
Sourcepub fn layout_properties(&self) -> LayoutProperties
pub fn layout_properties(&self) -> LayoutProperties
Current layout properties after common-property collection.
Sourcepub fn measured_size(&self) -> Option<(f64, f64)>
pub fn measured_size(&self) -> Option<(f64, f64)>
Measured bounds reported by a native or text-backed node.
Sourcepub fn subtree_layout_hull(&self) -> LocalProperty<LayoutHull>
pub fn subtree_layout_hull(&self) -> LocalProperty<LayoutHull>
Node-local subtree hull published by the engine for container measurement.
pub fn autosize(&self) -> Option<(f64, f64)>
use measured_size() instead
Sourcepub fn with_properties<V, T: ToFromPaxAny>(
&self,
f: impl FnOnce(&mut T) -> V,
) -> Option<V>
pub fn with_properties<V, T: ToFromPaxAny>( &self, f: impl FnOnce(&mut T) -> V, ) -> Option<V>
Borrow the node’s typed property object if it has the requested type.
Sourcepub fn is_of_type<T: ToFromPaxAny>(&self) -> bool
pub fn is_of_type<T: ToFromPaxAny>(&self) -> bool
Check whether the node’s property object is of type T.
Sourcepub fn instance_flags(&self) -> InstanceFlags
pub fn instance_flags(&self) -> InstanceFlags
Static flags from the node’s instance.
Sourcepub fn transform_and_bounds(
&self,
) -> LocalProperty<TransformAndBounds<NodeLocal, Window>>
pub fn transform_and_bounds( &self, ) -> LocalProperty<TransformAndBounds<NodeLocal, Window>>
Reactive transform-and-bounds property for this node.
Sourcepub fn render_parent(&self) -> Option<NodeInterface>
pub fn render_parent(&self) -> Option<NodeInterface>
Parent in render traversal order.
Sourcepub fn containing_component(&self) -> Option<NodeInterface>
pub fn containing_component(&self) -> Option<NodeInterface>
Containing component for template scoping and slot ownership.
Sourcepub fn template_parent(&self) -> Option<NodeInterface>
pub fn template_parent(&self) -> Option<NodeInterface>
Parent in template ownership order.
Sourcepub fn is_descendant_of(&self, node: &NodeInterface) -> bool
pub fn is_descendant_of(&self, node: &NodeInterface) -> bool
True if this node is below node in the template-parent chain.
Sourcepub fn children(&self) -> Vec<NodeInterface>
pub fn children(&self) -> Vec<NodeInterface>
Mounted child nodes.
Sourcepub fn flattened_projected_children_count(&self) -> LocalProperty<usize>
pub fn flattened_projected_children_count(&self) -> LocalProperty<usize>
Reactive count of slot children after repeat/conditional flattening.
Trait Implementations§
Source§impl Clone for NodeInterface
impl Clone for NodeInterface
Source§impl Debug for NodeInterface
impl Debug for NodeInterface
impl Eq for NodeInterface
Source§impl From<Rc<ExpandedNode>> for NodeInterface
impl From<Rc<ExpandedNode>> for NodeInterface
Source§fn from(expanded_node: Rc<ExpandedNode>) -> Self
fn from(expanded_node: Rc<ExpandedNode>) -> Self
Source§impl Interpolatable for NodeInterface
impl Interpolatable for NodeInterface
Source§fn interpolate(&self, _other: &Self, _t: f64) -> Self
fn interpolate(&self, _other: &Self, _t: f64) -> Self
Source§impl Ord for NodeInterface
impl Ord for NodeInterface
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for NodeInterface
impl PartialEq for NodeInterface
Source§impl PartialOrd for NodeInterface
impl PartialOrd for NodeInterface
Auto Trait Implementations§
impl !RefUnwindSafe for NodeInterface
impl !Send for NodeInterface
impl !Sync for NodeInterface
impl !UnwindSafe for NodeInterface
impl Freeze for NodeInterface
impl Unpin for NodeInterface
impl UnsafeUnpin for NodeInterface
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.