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.
Application snapshots paired with the existing acknowledged input lifecycle.
This module supplies no window, backend permissions or persistence authority. A host acknowledges the exact submitted CPU frame after its own native submission succeeds. This cannot prove physical display scanout.
Structs
structaster_ui::app::AcknowledgedContext
pub struct AcknowledgedContext<'a> { /* see fields */ }The acknowledged context an application receives during one dispatch: the exact acknowledged stamp, snapshot, geometry and identity, and no way to stage or acknowledge a frame.
Methods
fn stamp(&self) -> ViewStamp— The exact acknowledged stamp: snapshot, presentation and frame.fn parts(&self) -> &AcknowledgedParts<'a>— The acknowledged geometry, policies and focus.fn bounds(&self, node: NodeId) -> Result<LogicalRect, Error>— The acknowledged world bounds of a node.fn map(&self, node: NodeId) -> Result<Affine2D, Error>— The acknowledged node-local to world paint map of a node.fn hit(&self, point: DevicePoint) -> Result<Option<HitTarget>, Error>— The exact acknowledged hit test, filtered by the presented policies.fn focused(&self) -> Option<InteractionTarget>— The acknowledged focus target, if any.fn model_key(&self, node: NodeId) -> Result<Option<ModelKey>, Error>— The acknowledged model key of a node.fn bind<A>(&self, node: NodeId, value: A) -> Result<BoundAction<A>, PresentationError>— Bind a deliberate action to the acknowledged snapshot and geometry.fn press_anchor(&self, node: NodeId, pointer: Option<PointerId>) -> Result<PressAnchor, PressError>— Anchors a deliberate press against the acknowledged plane, so a native host can prove press continuity inside a dispatch without holding the presentation.fn key_anchor(&self, node: NodeId) -> Result<PressAnchor, PressError>— Anchors a deliberate key press, without a pointer or a position.fn press_continuity(&self, anchor: &PressAnchor, position: DevicePoint) -> Result<(), PressError>— Checks that a deliberate pointer press may still complete.fn key_continuity(&self, anchor: &PressAnchor) -> Result<(), PressError>— Checks that a deliberate key press may still complete.fn validate<A>(&self, action: &BoundAction<A>) -> Result<(), PresentationError>— Revalidate a bound action against the acknowledged snapshot and geometry.
Trait implementations: ActionBinding, Clone, ControlContext, Copy, MenuContext
structaster_ui::app::AcknowledgedFrame
pub struct AcknowledgedFrame<'a> { /* see fields */ }The exact result of one acknowledgement: the update of the acknowledged frame and the read-only acknowledged context of the plane it acknowledged.
The retired captures are copied into the frame, so the update and the context can be delivered together. The copy is bounded by the admitted pointer capacity and carries no geometry.
Methods
fn update(&self) -> PresentationUpdate<'_>— The exact update of this acknowledgement.fn context(&self) -> &AcknowledgedContext<'a>— The read-only acknowledged context of the acknowledged plane: the exact acknowledged stamp, snapshot, geometry, policies and focus.
structaster_ui::app::AcknowledgedParts
pub struct AcknowledgedParts<'a> { /* see fields */ }The read-only acknowledged pieces an application receives during one dispatch: the exact acknowledged geometry, policies, focus and identity. It exposes no way to stage, acknowledge or mutate the presentation.
Methods
fn presentation(&self) -> PresentationId— The acknowledged presentation these pieces describe.fn bounds(&self, node: NodeId) -> Result<LogicalRect, Error>— The acknowledged world bounds of a node.fn map(&self, node: NodeId) -> Result<Affine2D, Error>— The acknowledged node-local to world paint map of a node.fn hit(&self, point: DevicePoint) -> Result<Option<HitTarget>, Error>— The exact acknowledged hit test, filtered by the presented policies.fn focused(&self) -> Option<InteractionTarget>— The acknowledged focus target, if any.fn model_key(&self, node: NodeId) -> Result<Option<ModelKey>, Error>— The acknowledged model key of a node.
Trait implementations: Clone, Copy
structaster_ui::app::BoundAction
pub struct BoundAction<A> { /* see fields */ }A local UI proposal, not an authority token. It may cross an async boundary; validate it against the coordinator and then the controller's domain state.
Methods
fn stamp(&self) -> ViewStampfn node(&self) -> NodeIdfn model_key(&self) -> ModelKeyfn value(&self) -> &Afn into_value(self) -> A
Trait implementations: Debug
structaster_ui::app::GeometryId
pub struct GeometryId(..)The opaque continuity identity of an acknowledged input plane.
It stays the same while the acknowledged geometry, the effective policies and the output are exactly unchanged, and is fresh for every other acknowledged plane. It is never a hash and never a copy of a plane.
Trait implementations: Clone, Copy, Debug, Eq, PartialEq, StructuralPartialEq
structaster_ui::app::Presentation
pub struct Presentation<T> { /* see fields */ }The pending and visible model payloads are distinct. No model deep copy is made. Shared payload heaps and caller-held snapshots are application budgets.
Methods
fn new(limits: InputLimits) -> Result<Self, Error>fn enable_paint_transforms(&mut self) -> Result<bool, Error>fn reserved_bytes(&self) -> usize— Includes the existing router's reserved bytes and this fixed object; excludes payload Arc allocations and all application/renderer resources.fn input(&self) -> &InputRouter— Shared-only access: callers cannot publish coordinates behind the model coordinator's back. Existing semantic snapshots can use coordinates().fn visible(&self) -> Option<(ViewStamp, &Snapshot<T>)>fn pending(&self) -> Option<(Submission, &Snapshot<T>)>fn stage(&mut self, snapshot: Snapshot<T>, scene: &Scene, frame: &Frame<'_>, policies: &[Interaction]) -> Result<Submission, PresentationError>— Stage against the scene actually used for this CPU frame. The caller supplies the exact model snapshot used to compose it. Aster cannot infer that an arbitrary model produced particular pixels. Failure preserves both the old visible state and any previous successful pending pairing.fn stage_info(&mut self, snapshot: Snapshot<T>, scene: &Scene, frame: FrameInfo, policies: &[Interaction]) -> Result<Submission, PresentationError>— Pair a model snapshot with renderer-minted metadata, without retaining CPU pixels. Submission acknowledgement remains a separate host assertion.fn acknowledge(&mut self, submission: Submission, submitted_frame: FrameReceipt) -> Result<PresentationUpdate<'_>, PresentationError>— A host assertion of successful submission of THIS frame, never a guessed newest-model acknowledgement. On failure/uncertainty the native adapter must call suspend() and process retired focus/captures before more input. This is suitable for synchronous submit or an exact async completion.fn acknowledge_with_context(&mut self, submission: Submission, submitted_frame: FrameReceipt) -> Result<AcknowledgedFrame<'_>, PresentationError>— Acknowledge this exact submitted frame and return the exact update together with the read-only acknowledged context of the plane that was just acknowledged.fn acknowledged_context(&self) -> Option<AcknowledgedContext<'_>>— The read-only acknowledged context of the visible presentation.fn suspend(&mut self) -> PresentationUpdate<'_>— Invalidate uncertain display/seat mapping and retire both retained model pairings. No queued completion can revive them after suspend/teardown.fn dispatch_pointer(&mut self, event: PointerEvent, handler: impl FnMut(RoutedPointer, &Snapshot<T>) -> EventReply) -> Result<PointerDispatch, Error>fn dispatch_key(&mut self, event: KeyEvent, handler: impl FnMut(RoutedKey, &Snapshot<T>) -> EventReply) -> Result<KeyDispatch, Error>fn focus(&mut self, node: Option<NodeId>) -> Result<Option<FocusChange>, Error>fn capture(&mut self, pointer: PointerId, node: NodeId) -> Result<Option<CapturedPointer>, Error>fn release(&mut self, pointer: PointerId) -> Option<CapturedPointer>fn bind_action<A>(&self, node: NodeId, value: A) -> Result<BoundAction<A>, PresentationError>— Stamp a proposal against a currently presented node/model key. This checks identity, not backend authorization or semantic action policy. Applications still implement deliberate activation and domain checks.fn acknowledged_parts(&self) -> Option<AcknowledgedParts<'_>>— The read-only acknowledged pieces of the visible presentation. The application can read the exact geometry, policies, focus and identity without any way to stage, acknowledge or mutate the presentation.fn press_anchor(&self, node: NodeId, pointer: Option<PointerId>) -> Result<PressAnchor, PressError>— Anchors one deliberate press against the acknowledged plane. A pointer press carries its pointer; a deliberate key press carriesNone.fn key_anchor(&self, node: NodeId) -> Result<PressAnchor, PressError>— Anchors a deliberate key press. No pointer and no position are fabricated: the anchor proves the node, the model snapshot and the acknowledged plane.fn press_continuity(&self, anchor: &PressAnchor, position: DevicePoint) -> Result<(), PressError>— Checks that a deliberate pointer press may still complete against the current accepted plane only. A paint-only repaint keeps the plane's continuity identity and therefore survives; any other acknowledged change does not.fn key_continuity(&self, anchor: &PressAnchor) -> Result<(), PressError>— Checks that a deliberate key press may still complete: the same node, the same model snapshot, the same acknowledged plane, and the current focus still on that node.fn dispatch_pointer_with(&mut self, event: PointerEvent, handler: impl FnMut(RoutedPointer, &Snapshot<T>, &AcknowledgedContext<'c>) -> EventReply) -> Result<PointerDispatch, Error>— Routes a pointer event and offers the handler the read-only acknowledged context. The existing dispatch API is unchanged.fn dispatch_key_with(&mut self, event: KeyEvent, handler: impl FnMut(RoutedKey, &Snapshot<T>, &AcknowledgedContext<'c>) -> EventReply) -> Result<KeyDispatch, Error>— Routes a key event and offers the handler the read-only acknowledged context. The existing dispatch API is unchanged.fn validate_action<A>(&self, action: &BoundAction<A>) -> Result<&Snapshot<T>, PresentationError>— Revalidate just before consuming a delayed proposal. The returned model is the same exact immutable snapshot, never a newer async update.
Trait implementations: ActionBinding, ControlContext, MenuContext
structaster_ui::app::PressAnchor
pub struct PressAnchor { /* see fields */ }A bounded, value-free anchor for one deliberate press.
It records the pressed node, its model key, the model snapshot, the pointer and the continuity identity of the acknowledged plane at the press. It holds no payload and allocates nothing.
Methods
fn node(&self) -> NodeId— The pressed node.fn pointer(&self) -> Option<PointerId>— The pointer that pressed, orNonefor a deliberate key press.fn key(&self) -> ModelKey— The model key of the pressed node at the press.fn snapshot(&self) -> SnapshotId— The model snapshot at the press.
Trait implementations: Clone, Copy, Debug
structaster_ui::app::Snapshot
pub struct Snapshot<T> { /* see fields */ }Methods
fn id(&self) -> SnapshotIdfn data(&self) -> &Tfn shared(&self) -> Arc<T>
Trait implementations: Clone
structaster_ui::app::SnapshotId
pub struct SnapshotId { /* see fields */ }Trait implementations: Clone, Copy, Debug, Eq, PartialEq, StructuralPartialEq
structaster_ui::app::SnapshotSource
pub struct SnapshotSource { /* see fields */ }One application's identity source. Counter exhaustion never wraps.
Methods
fn new() -> Result<Self, Error>fn capture<T>(&mut self, data: Arc<T>) -> Result<Snapshot<T>, Error>— The application owns allocation/budgeting and must treat this payload as immutable. Interior mutation behind an unchanged identity violates the contract, just as changing bytes behind an immutable image identity does.fn try_capture_with<T, E>(&mut self, build: impl FnOnce() -> Result<Arc<T>, E>) -> Result<Snapshot<T>, CaptureWithError<E>>— Capture one payload the caller builds, as a single transaction.
structaster_ui::app::Submission
pub struct Submission { /* see fields */ }Methods
fn frame(self) -> FrameReceiptfn snapshot(self) -> SnapshotId
Trait implementations: Clone, Copy, Debug, Eq, PartialEq, StructuralPartialEq
structaster_ui::app::ViewStamp
pub struct ViewStamp { /* see fields */ }Methods
fn snapshot(self) -> SnapshotIdfn input(self) -> PresentationIdfn frame(self) -> FrameReceipt
Trait implementations: Clone, Copy, Debug, Eq, PartialEq, StructuralPartialEq
structaster_ui::app::async_state::AsyncState
pub struct AsyncState<D, V> { /* see fields */ }Typed request state for one caller-owned domain identity.
The state holds one stable domain identity, one checked generation counter, one request phase and at most one confirmed payload. It never queues completions: a late completion is refused, not buffered.
Methods
fn new(domain: D) -> Result<Self, AsyncError>— Creates an idle state for a stable caller domain identity.fn resumed(domain: D, last_issued: u64) -> Result<Self, AsyncError>— Creates an idle state whose generation counter continues afterlast_issued.fn domain(&self) -> &D— The caller's stable domain identity.fn generation(&self) -> Generation— The most recently issued generation. Zero means that none was issued.fn phase(&self) -> RequestPhase— The lifecycle of the most recent request.fn availability(&self) -> &Availability<V>— What is known about the domain's value.fn is_torn_down(&self) -> bool— True once the state has been torn down.fn begin(&mut self) -> Result<RequestToken<D>, AsyncError>— Mints a request for the domain.fn confirm(&mut self, token: &RequestToken<D>, value: V) -> Result<(), AsyncError>— Applies a value the backend confirmed.fn refuse(&mut self, token: &RequestToken<D>) -> Result<(), AsyncError>— Records a backend refusal. The prior confirmed payload is preserved.fn timeout(&mut self, token: &RequestToken<D>) -> Result<(), AsyncError>— Records that the caller's own deadline elapsed. The caller owns time; this module has no clock.fn cancel(&mut self, token: &RequestToken<D>) -> Result<(), AsyncError>— Cancels the in-flight request. A late completion is refused.fn disconnect(&mut self) -> Result<(), AsyncError>— Records that the source went away.fn mark_stale(&mut self) -> Result<(), AsyncError>— Marks the confirmed payload as possibly outdated without losing it.fn teardown(&mut self)— Retires the state.
structaster_ui::app::async_state::Generation
pub struct Generation(..)Monotonic request generation for one domain. Never wraps.
Methods
const FIRST: Generation— The first generation issued for a domain.const fn from_counter(value: u64) -> Generation— Builds a counter value from a raw number.const fn value(self) -> u64— The raw counter value. Zero means that no request was issued yet.fn advance(self) -> Result<Generation, AsyncError>— The next generation, or a typed failure instead of wrapping.
Trait implementations: Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd, StructuralPartialEq
structaster_ui::app::async_state::RequestToken
pub struct RequestToken<D> { /* see fields */ }A minted request identity.
Only [AsyncState::begin] creates a token. The token carries the caller's
stable domain identity and the checked generation, so a completion that
belongs to a replaced request, another domain or another state instance
is refused instead of applied.
Methods
fn generation(&self) -> Generation— The generation this token was minted with.fn domain(&self) -> &D— The caller's stable domain identity this token was minted for.
Trait implementations: Clone, Debug, Eq, PartialEq, StructuralPartialEq
structaster_ui::app::state_adapter::ActionObservation
pub struct ActionObservation<'a, C, R, O> { /* see fields */ }Historical borrowed observation of an external SDK action.
The SDK must admit the record before it is passed to observe_action;
this type does not validate protocol transitions or backend authority.
Retaining an observation does not retain connection validity. Revalidate
the request at an action/completion boundary using the current adapter.
Methods
fn binding(&self) -> &'a SourceRequest<C, R>— Exact external request and connection, without another action identity.fn timed_out(&self) -> bool— The SDK's local deadline observation. Does not imply backend failure.fn late(&self) -> bool— Whether a final authoritative result was observed after the SDK's local deadline observation. This does not infer the backend's execution time. Computed only from the caller's admitted final outcome and deadline flag; no clock or independent arrival-order measurement exists here.fn outcome(&self) -> Option<&'a O>— The exact authoritative outcome, including refused/failed details.
structaster_ui::app::state_adapter::PresentedState
pub struct PresentedState<'a, C, K, V> { /* see fields */ }Historical receipt pairing a projection with an actual acknowledged stamp.
Keeping this receipt does not keep its connection or presentation current. Revalidate at every action/completion boundary using the current adapter and acknowledged context. A receipt retained after disconnect is data, not durable authorization to dispatch an action.
Methods
fn stamp(&self) -> ViewStamp— The existing Aster snapshot/presentation/frame identity, not a copy ID.fn source(&self) -> &'a SourceState<C, K, V>— The external projection that supplied the acknowledged model.
structaster_ui::app::state_adapter::SourceRequest
pub struct SourceRequest<C, R> { /* see fields */ }A binding of an existing external request key to one connection lease.
Methods
fn connection(&self) -> &C— The exact SDK connection key at binding time.fn request(&self) -> &R— The exact request key minted by the SDK.
structaster_ui::app::state_adapter::SourceState
pub struct SourceState<C, K, V> { /* see fields */ }External source identity and secret-free payload inside an Aster snapshot.
It introduces no snapshot counter, wire format or lifecycle. Private lease metadata prevents reuse across adapter instances/connection replacements.
Methods
fn connection(&self) -> &C— The SDK's connection key.fn source(&self) -> &K— The SDK's source key, unchanged.fn value(&self) -> &V— The application's immutable, secret-free projection.
structaster_ui::app::state_adapter::StateAdapter
pub struct StateAdapter<C> { /* see fields */ }A connection-scoped bridge, independent of any SDK wire or payload type.
Call connect for every accepted SDK connection replacement, even if its
external key compares equal. Call disconnect when the SDK disconnects.
The app must also disconnect/cancel its own async state and presentation.
Methods
const fn new() -> Self— Start disconnected. Does not allocate.fn connect(&mut self, connection: C)— Activate the SDK's accepted connection. Retires all prior bindings.fn disconnect(&mut self)— Retire bindings. Does not mutate external clients or application state.fn connection(&self) -> Option<&C>— The current external connection key, if any.fn project<K, V>(&self, source: K, value: V) -> Result<SourceState<C, K, V>, AdapterError>— Wrap a secret-free external projection for capture with SnapshotSource.fn bind_request<R>(&self, request: R) -> Result<SourceRequest<C, R>, AdapterError>— Bind the exact request key minted by the external SDK.fn acknowledged<'a, K, V>(&self, snapshot: &'a Snapshot<SourceState<C, K, V>>, context: &AcknowledgedContext<'_>) -> Result<PresentedState<'a, C, K, V>, AdapterError>— Associate an SDK projection with the exact acknowledged Aster snapshot.fn observe_action<'a, R: PartialEq, O>(&self, binding: &'a SourceRequest<C, R>, received_connection: &C, received_request: &R, timed_out: bool, authoritative_outcome: Option<&'a O>) -> Result<ActionObservation<'a, C, R, O>, AdapterError>— Borrow one observation from the external client's current action record.
Trait implementations: Default
Enums
enumaster_ui::app::CaptureWithError
pub enum CaptureWithError<E> { Source, Build }The failure of one transactional snapshot capture.
The source failure is a crate error; the build failure is the caller's own
error type, returned and formatted unchanged. Snapshot data T is not
stored in this error and needs no formatting trait; the builder error's
own Debug and Display implementations control its reported contents.
Variants
Source— The source could not reserve the next revision. The builder was never invoked and the counter is unchanged.Build— The caller's builder refused. The counter is unchanged and no snapshot exists.
Trait implementations: Debug, Display, Error
enumaster_ui::app::PresentationError
pub enum PresentationError { Core, StaleSubmission, WrongFrame, Unpublished, StaleAction, MissingModelKey }Variants
CoreStaleSubmissionWrongFrameUnpublishedStaleActionMissingModelKey
Trait implementations: Clone, Copy, Debug, Display, Eq, Error, From<Error>, PartialEq, StructuralPartialEq
enumaster_ui::app::PressError
pub enum PressError { Unpublished, NotPresented, KeyChanged, StaleSnapshot, StaleGeometry, NotTarget }Why a deliberate press cannot be completed. A refusal never changes the accepted presentation.
Variants
Unpublished— Nothing is published.NotPresented— The node is not in the acknowledged presentation.KeyChanged— The node's model key changed.StaleSnapshot— The model snapshot changed, so the press no longer means the same.StaleGeometry— The acknowledged geometry, policies or output changed.NotTarget— The release does not hit the pressed node in the current accepted plane.
Trait implementations: Clone, Copy, Debug, Eq, PartialEq, StructuralPartialEq
enumaster_ui::app::async_state::AsyncError
pub enum AsyncError { TornDown, ForeignRequest, StaleRequest, AlreadyCancelled, AlreadyTimedOut, AlreadyRefused, AlreadyConfirmed, GenerationExhausted, IdentityExhausted }A typed refusal of a state transition. Every refusal preserves the prior valid state.
Variants
TornDown— The state was torn down. No further transition is accepted.ForeignRequest— The token was minted for another domain or another state instance.StaleRequest— A newer request replaced this one, so the completion is too late.AlreadyCancelled— The request was already cancelled.AlreadyTimedOut— The request was already timed out.AlreadyRefused— The request was already refused.AlreadyConfirmed— The request was already confirmed.GenerationExhausted— The generation counter would overflow. It never wraps.IdentityExhausted— The process-local state identity is exhausted.
Trait implementations: Clone, Copy, Debug, Display, Eq, Error, PartialEq, StructuralPartialEq
enumaster_ui::app::async_state::Availability
pub enum Availability<V> { Unknown, Known, Stale, Disconnected }What is known about a domain's value right now.
[Availability::Unknown] is not a value. A confirmed zero is
[Availability::Known] carrying a zero payload, and the two never
compare equal.
Methods
fn is_unknown(&self) -> bool— True when nothing has been confirmed yet.fn is_known(&self) -> bool— True when a current value is confirmed.fn value(&self) -> Option<&V>— The confirmed value, whether current or stale.
Variants
Unknown— Nothing has been confirmed yet.Known— A confirmed value that is still current.Stale— A previously confirmed value that may no longer be current.Disconnected— The source is unavailable, so no value is claimed.
Trait implementations: Clone, Copy, Debug, Eq, PartialEq, StructuralPartialEq
enumaster_ui::app::async_state::RequestPhase
pub enum RequestPhase { Idle, Pending, Refused, TimedOut, Confirmed, Cancelled }The lifecycle of the most recent request for one domain.
Variants
Idle— No request has been issued for this domain.Pending— A request is in flight.Refused— The backend refused the request.TimedOut— The caller reported that its own deadline elapsed.Confirmed— The backend confirmed the request.Cancelled— The request was cancelled by the caller or ended by a disconnection.
Trait implementations: Clone, Copy, Debug, Eq, PartialEq, StructuralPartialEq
enumaster_ui::app::state_adapter::AdapterError
pub enum AdapterError { Disconnected, StaleConnection, StaleRequest, UnacknowledgedSnapshot }Why an external projection cannot be used in the current connection/view.
Variants
Disconnected— There is no active external connection.StaleConnection— The projection or result belongs to another connection or lease.StaleRequest— The result names another external request.UnacknowledgedSnapshot— The supplied snapshot is not the context's acknowledged snapshot.
Trait implementations: Clone, Copy, Debug, Display, Eq, Error, PartialEq, StructuralPartialEq
Traits
traitaster_ui::app::ActionBinding
pub trait ActionBindingThe read-only acknowledged identity a deliberate action binds against.
Presentation and AcknowledgedContext both satisfy it, so one control can
be driven from a headless test or from a native host.
Required and provided methods
fn action_stamp(&self) -> Option<ViewStamp>— The acknowledged stamp a binding is made against.fn bind_action<A>(&self, node: NodeId, value: A) -> Result<BoundAction<A>, PresentationError>— Bind a value to a node in the acknowledged presentation.fn validate_action<A>(&self, action: &BoundAction<A>) -> Result<(), PresentationError>— Revalidate a bound action against the acknowledged presentation.fn action_bounds(&self, node: NodeId) -> Result<LogicalRect, Error>— The acknowledged world bounds of a node.