Expand description
What an iced app links so icedwright can see and steer it.
semantic,test_idandSemanticExt::semanticdescribe what iced cannot infer: a role, a name, states, a typedTestId. Widget authors callreportfrom their ownoperate.task_name!declares aTaskName, andSaveNote::task(future)names a future so a test can hold, release, fail or replace it with a value of the right type.timeis the clock components should read, which a harness can move.#[derive(TestId)]and#[derive(Messages)]come fromicedwright-probe-macros.
With no features everything here is pass-through: semantic(el) converts back into el,
the builder methods do nothing, and SaveNote::task(future) returns the future itself. The
semantics feature sends annotations to the recorder, control lets a harness control
named tasks, and remote adds the endpoint and both of the others. Turn them on from
dev-dependencies so release builds never see them.
Modules§
- role
- Roles: the runtime
Roleenum, one zero-sized marker type per role, and the sealed capability traits that say what each role can do. - time
- The clock components should read instead of
Instant::now(), so a harness can move it.
Macros§
Structs§
- Annotation
- What an annotation says about a node: its role, name, states and relations.
- Semantic
- An element with an annotation. Convert it into an
Elementto use it. - Test
IdRef - A test id as the tree and the locators carry it.
- Variant
Path - A message variant’s path, such as
Saveor, for a nested enum,Editor::Bold.
Enums§
- Caret
Clock - Whether a widget’s caret blinks on the virtual clock or the real one. Written as the
caret-clockprop. - Checked
- The checked state of a checkable role.
- Click
Clock - Whether a widget counts multiple clicks on the virtual clock or through iced’s
mouse::Click, which reads the real one. Written as theclick-clockprop. - Cursor
Seen - The kind of mouse cursor a widget was handed for its last mouse event this frame.
- Key
- A key one annotation uses to name another in a relation such as
labelled_byorowns. - Role
- The runtime role of a node, carried by trees, YAML, selector strings and the wire.
Traits§
- Fallible
- A name whose output is a
Result, so a test can fail it with the error type. Implemented for every such name; asking to fail any other name does not compile. - Into
Test Id - What
.test_id(..),test_idandget_by_test_id(..)accept: aTestIdvalue, or a string for an id built at run time. - Messages
- Every variant of a message type, known at compile time.
- Named
Task - What a named task offers beyond being a future. Bring it into scope to call
detailorexternal. - Semantic
Ext .semantic()on anything that converts into anElement, for builder chains.- Task
Name - A task name. Declare one with
task_name!, never by hand. - TestId
- A test id the view and the tests name with the same value, so a typo does not compile.
Functions§
- report
- Reports an annotation for a widget at
boundsto whatever operation is running. - semantic
- Wraps an element so it can be described:
semantic(button("Delete")).role(role::Button). - test_id
- Wraps an element with only a test id.