API reference

aster_ui::semantics

Pre-1.0: signatures are not frozen. Generated from rustdoc JSON of the compiled crate; rustdoc JSON format version 60. Only public items are listed.

Owned, bounded semantic policy tied to acknowledged facade frames.

This is a portable application/host contract, not an OS accessibility bridge. Supplied order is logical semantic order; omitted scene ancestors remain traversable and the nearest supplied ancestor becomes the semantic parent.

Structs

structaster_ui::semantics::AccessibilityPolicy

pub struct AccessibilityPolicy { /* see fields */ }

Public fields

fieldtype
text_scalef64
reduced_motionbool
high_contrastbool

Trait implementations: Clone, Copy, Debug, Default, PartialEq, StructuralPartialEq

structaster_ui::semantics::ActionRequest

pub struct ActionRequest<'a> { /* see fields */ }

Methods

  • fn snapshot(self) -> SnapshotId
  • fn presentation(self) -> PresentationId
  • fn frame(self) -> FrameReceipt
  • fn node(self) -> NodeId
  • fn model_key(self) -> Option<ModelKey>
  • fn action(self) -> Action<'a>

Trait implementations: Clone, Copy, Debug, PartialEq, StructuralPartialEq

structaster_ui::semantics::Actions

pub struct Actions(..)

Methods

  • const NONE: Self
  • fn with(self, action: ActionKind) -> Self
  • fn contains(self, action: ActionKind) -> bool

Trait implementations: Clone, Copy, Debug, Default, Eq, PartialEq, StructuralPartialEq

structaster_ui::semantics::Description

pub struct Description<'a> { /* see fields */ }

Intent metadata: the application must actually apply these policies to its layout/paint. Publishing this value does not change the rendered frame.

Public fields

fieldtype
nodeNodeId
roleRole
name&'a str
description&'a str
valueOption<&'a str>
numericOption<NumericValue>
stateState
actionsActions

Methods

  • fn new(node: NodeId, role: Role, name: &'a str) -> Self

Trait implementations: Clone, Copy, Debug

structaster_ui::semantics::Limits

pub struct Limits { /* see fields */ }

Public fields

fieldtype
nodesusize
text_bytesusizeAggregate UTF-8 payload in each of the three store planes.
ancestor_depthusize
action_text_bytesusize

Trait implementations: Clone, Copy, Debug, Eq, PartialEq, StructuralPartialEq

structaster_ui::semantics::Node

pub struct Node<'a> { /* see fields */ }

Methods

  • fn index(self) -> usize
  • fn node_id(self) -> NodeId
  • fn model_key(self) -> Option<ModelKey>
  • fn parent(self) -> Option<usize>
  • fn role(self) -> Role
  • fn name(self) -> &'a str
  • fn description(self) -> &'a str
  • fn value(self) -> Option<&'a str>
  • fn numeric(self) -> Option<NumericValue>
  • fn state(self) -> State
  • fn effectively_hidden(self) -> bool
  • fn actions(self) -> Actions
  • fn bounds(self) -> LogicalRect
  • fn paint_map(self) -> Affine2D

Trait implementations: Clone, Copy

structaster_ui::semantics::NumericValue

pub struct NumericValue { /* see fields */ }

Public fields

fieldtype
valuef64
minf64
maxf64
stepf64

Trait implementations: Clone, Copy, Debug, PartialEq, StructuralPartialEq

structaster_ui::semantics::Presenter

pub struct Presenter { /* see fields */ }

Three planes preserve accepted and pending output even when a new stage or acknowledgement fails. All heap storage is admitted by new.

Methods

  • fn new(limits: Limits) -> Result<Self, SemanticError>
  • fn limits(&self) -> Limits
  • fn storage(&self) -> StorageUsage
  • fn stage(&mut self, scene: &Scene, frame: &Frame<'_>, descriptions: &[Description<'_>], policy: AccessibilityPolicy) -> Result<Ticket, SemanticError>
  • fn stage_info(&mut self, scene: &Scene, frame: FrameInfo, descriptions: &[Description<'_>], policy: AccessibilityPolicy) -> Result<Ticket, SemanticError> — Stage accessibility from produced identity/geometry without borrowing pixels.
  • fn acknowledge(&mut self, ticket: Ticket, input: &InputPresenter) -> Result<SnapshotId, SemanticError>
  • fn snapshot(&self) -> Option<Snapshot<'_>>
  • fn suspend(&mut self)
  • fn action<'a>(&self, id: SnapshotId, node: NodeId, action: Action<'a>, input: &InputPresenter) -> Result<ActionRequest<'a>, SemanticError> — Produces a typed request only. No scene mutation, callback or automatic default action occurs. Applications resolve stale live model identities.

structaster_ui::semantics::Recording

pub struct Recording { /* see fields */ }

Bounded owned historical copy for host recording/inspection. It supplies no action-dispatch method and retains no mutable scene or pixel resource.

Methods

  • fn new(nodes: usize, text_bytes: usize) -> Result<Self, SemanticError>
  • fn capture(&mut self, snapshot: Snapshot<'_>) -> Result<(), SemanticError>
  • fn snapshot(&self) -> Option<Snapshot<'_>>
  • fn storage(&self) -> StorageUsage

structaster_ui::semantics::Snapshot

pub struct Snapshot<'a> { /* see fields */ }

Methods

  • fn id(self) -> SnapshotId
  • fn frame(self) -> FrameReceipt
  • fn presentation(self) -> PresentationId
  • fn policy(self) -> AccessibilityPolicy
  • fn output(self) -> Output
  • fn len(self) -> usize
  • fn is_empty(self) -> bool
  • fn node(self, index: usize) -> Option<Node<'a>>
  • fn find(self, node: NodeId) -> Option<Node<'a>>
  • fn nodes(self) -> impl ExactSizeIterator<Item = Node<'a>>
  • fn children(self, parent: Option<usize>) -> impl Iterator<Item = Node<'a>>

Trait implementations: Clone, Copy

structaster_ui::semantics::SnapshotId

pub struct SnapshotId { /* see fields */ }

Trait implementations: Clone, Copy, Debug, Eq, PartialEq, StructuralPartialEq

structaster_ui::semantics::State

pub struct State { /* see fields */ }

Public fields

fieldtype
disabledbool
hiddenbool
read_onlybool
focusedbool
selectedOption<bool>
checkedOption<Checked>
expandedOption<bool>
invalidboolThe value is refused by validation (a field showing an error).
requiredboolThe user must provide a value before the form can be submitted.

Trait implementations: Clone, Copy, Debug, Default, Eq, PartialEq, StructuralPartialEq

structaster_ui::semantics::StorageUsage

pub struct StorageUsage { /* see fields */ }

Public fields

fieldtype
entry_bytesusize
index_bytesusize
text_bytesusize
object_bytesusize

Trait implementations: Clone, Copy, Debug, Default, Eq, PartialEq, StructuralPartialEq

structaster_ui::semantics::Ticket

pub struct Ticket { /* see fields */ }

Trait implementations: Clone, Copy, Debug, Eq, PartialEq, StructuralPartialEq

Enums

enumaster_ui::semantics::Action

pub enum Action<'a> { Activate, Focus, Increment, Decrement, SetValue, SetNumericValue, SetSelection }

Methods

  • fn kind(self) -> ActionKind

Variants

  • Activate
  • Focus
  • Increment
  • Decrement
  • SetValue
  • SetNumericValue
  • SetSelection

Trait implementations: Clone, Copy, Debug, PartialEq, StructuralPartialEq

enumaster_ui::semantics::ActionKind

pub enum ActionKind { Activate, Focus, Increment, Decrement, SetValue, SetSelection }

Variants

  • Activate
  • Focus
  • Increment
  • Decrement
  • SetValue
  • SetSelection

Trait implementations: Clone, Copy, Debug, Eq, PartialEq, StructuralPartialEq

enumaster_ui::semantics::Checked

pub enum Checked { Off, On, Mixed }

Variants

  • Off
  • On
  • Mixed

Trait implementations: Clone, Copy, Debug, Eq, PartialEq, StructuralPartialEq

enumaster_ui::semantics::Role

pub enum Role { Group, Text, Button, TextField, CheckBox, Slider, List, ListItem, Dialog, Image, Heading }

Variants

  • Group
  • Text
  • Button
  • TextField
  • CheckBox
  • Slider
  • List
  • ListItem
  • Dialog
  • Image
  • Heading — A heading of a document or a section, with its outline level (1 is the top; 0 when the level is unknown).

Trait implementations: Clone, Copy, Debug, Eq, PartialEq, StructuralPartialEq

enumaster_ui::semantics::SemanticError

pub enum SemanticError { Core, Capacity, TextCapacity, DepthLimit, DuplicateNode, InvalidPolicy, InvalidNumericValue, InvalidTextBoundary, StaleSnapshot, FrameMismatch, PresentationMismatch, NotInteractive, UnsupportedAction }

Variants

  • Core
  • Capacity
  • TextCapacity
  • DepthLimit
  • DuplicateNode
  • InvalidPolicy
  • InvalidNumericValue
  • InvalidTextBoundary
  • StaleSnapshot
  • FrameMismatch
  • PresentationMismatch
  • NotInteractive
  • UnsupportedAction

Trait implementations: Clone, Copy, Debug, Display, Eq, Error, From<Error>, PartialEq, StructuralPartialEq