Skip to main content

Crate icedwright_semantics

Crate icedwright_semantics 

Source
Expand description

The semantic tree icedwright’s locators, actions, audits, snapshots and inspector read.

A live app records a RawTree of operation calls and annotations; infer fuses it into a SemanticTree of roles, names, states, relations and geometry. NodePath names a node across snapshots, diff compares two, and yaml writes and reads the snapshot format. TreeBuilder builds trees by hand for tests.

Modules§

yaml
The semantic tree as YAML: one line per node with its role, quoted name, attributes in brackets and a value or text after a colon. Unnamed generics are hoisted away and owned subtrees print under their owner.

Structs§

Node
One node.
NodeBuilder
Builds one annotated node and its children.
NodeChange
A node present in both snapshots whose fields differ.
NodeId
A node’s index in one tree. Never compare ids from different snapshots; use NodePath.
NodePath
A node’s name in a form that finds it again in the next frame or the next run.
Relations
Resolved relations to other nodes in the same tree.
Scroll
A node’s own scroll state.
ScrollAncestor
A scrollable enclosing a node.
SemanticTree
The semantic tree of every window.
SetInfo
Level, position in its set and set size, from annotations.
SourceSet
Which sources contributed a node’s non-state fields.
States
A node’s states. None means no source could say; derived states are always known.
TextGeometry
Caret positions in a text node, from annotations.
TreeBuilder
Builds a tree of one or more windows.
TreeDiff
What changed between two snapshots, keyed by node path. Ignored generics are left out.
WindowId
A window, as the recorder’s caller names it. Stable for the window’s life.

Enums§

Checked
The checked state of a checkable role.
CursorSeen
The kind of mouse cursor a widget was handed for its last mouse event this frame.
Error
YAML and path parse errors. Folded into icedwright::Error with From.
Kind
What reported a node, for of_type and the inspector.
Layer
The overlay layer a node is in.
NameSource
Where a node’s accessible name came from.
OperationKind
The operation callback an inferred node came from.
Segment
One step of a path.
StateName
A state a semantic node can carry.
StateSource
Which source set a state.
StateValue
What a source or a selector says about one state.
TreeWarning
Something worth knowing about how a tree was built. Audits report these.
Value
A value a node reports.
WidgetId
An iced_core::widget::Id, read from its Debug form.

Functions§

diff
Nodes added, removed and changed between two snapshots.
infer
Builds the semantic tree from a recording. Linear in the number of raw nodes.
named_from_content
Whether a role takes its accessible name from the text of its descendants.

Type Aliases§

SemanticNode
The name other parts of icedwright use for a node.