Skip to main content

Node

Struct Node 

Source
pub struct Node {
Show 32 fields pub id: NodeId, pub role: Role, pub name: Option<String>, pub name_source: NameSource, pub description: Option<String>, pub value: Option<Value>, pub placeholder: Option<String>, pub tooltip: Option<String>, pub states: States, pub relations: Relations, pub set: SetInfo, pub test_id: Option<String>, pub widget_id: Option<WidgetId>, pub kind: Kind, pub sources: SourceSet, pub props: BTreeMap<String, String>, pub text_size: Option<f32>, pub text_geometry: Option<TextGeometry>, pub cursor_seen: Option<CursorSeen>, pub bounds: Rect, pub visible_bounds: Option<Rect>, pub scroll: Option<Scroll>, pub scroll_ancestors: Vec<ScrollAncestor>, pub focusable_ordinal: Option<u32>, pub layer: Layer, pub window: WindowId, pub order: u32, pub parent: Option<NodeId>, pub children: Vec<NodeId>, pub raw: Vec<u32>, pub ignored: bool, pub path: NodePath,
}
Expand description

One node.

Fields§

§id: NodeId

Its index in this tree.

§role: Role

Its role.

§name: Option<String>

Its accessible name, as reported.

§name_source: NameSource

Where the name came from.

§description: Option<String>

Its description.

§value: Option<Value>

Its value.

§placeholder: Option<String>

Its placeholder.

§tooltip: Option<String>

Its tooltip.

§states: States

Its states.

§relations: Relations

Its relations.

§set: SetInfo

Level and position in its set.

§test_id: Option<String>

Its test id.

§widget_id: Option<WidgetId>

Its widget id.

§kind: Kind

What reported it.

§sources: SourceSet

Which sources contributed fields.

§props: BTreeMap<String, String>

Component extras, such as a tab’s unsaved.

§text_size: Option<f32>

Text size in logical pixels, from annotations only.

§text_geometry: Option<TextGeometry>

Caret positions, from annotations only.

§cursor_seen: Option<CursorSeen>

The cursor kind handed to it this frame, for annotated nodes.

§bounds: Rect

Window coordinates, scroll translation applied.

§visible_bounds: Option<Rect>

The part not clipped by an enclosing scrollable or the window.

§scroll: Option<Scroll>

Its own scroll state, if it scrolls.

§scroll_ancestors: Vec<ScrollAncestor>

Enclosing scrollables, innermost last.

§focusable_ordinal: Option<u32>

Its position among focusable callbacks across the interface.

§layer: Layer

Its overlay layer.

§window: WindowId

Its window.

§order: u32

Operation order, which is paint order within a layer.

§parent: Option<NodeId>

Its parent in the arena.

§children: Vec<NodeId>

Its children in the arena.

§raw: Vec<u32>

Index path in the raw tree it came from.

§ignored: bool

An unnamed generic, transparent to queries and YAML.

§path: NodePath

Its stable path.

Trait Implementations§

Source§

impl Clone for Node

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Node

Source§

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

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

impl<'de> Deserialize<'de> for Node

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for Node

Source§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl Serialize for Node

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for Node

Auto Trait Implementations§

§

impl Forget for Node

§

impl Freeze for Node

§

impl Move for Node

§

impl RefUnwindSafe for Node

§

impl Send for Node
where RawVecInner: Send, NodeRef<Owned, StateName, StateSource, LeafOrInternal>: Send, BoxRaw<(StateName, StateSource)>: Send, &'static str: Send, String: Send, NodeRef<Owned, String, String, LeafOrInternal>: Send, BoxRaw<(String, String)>: Send,

§

impl Sync for Node
where RawVecInner: Sync, NodeRef<Owned, StateName, StateSource, LeafOrInternal>: Sync, BoxRaw<(StateName, StateSource)>: Sync, String: Sync, NodeRef<Owned, String, String, LeafOrInternal>: Sync, BoxRaw<(String, String)>: Sync,

§

impl Unpin for Node
where *const u8 is !null: Unpin, *const LeafNode<StateName, StateSource> is !null: Unpin, Box<(StateName, StateSource)>: Unpin, &'static str: Unpin, String: Unpin, *const LeafNode<String, String> is !null: Unpin, Box<(String, String)>: Unpin,

§

impl UnsafeUnpin 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<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.