API reference

aster_blueprint::retained

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.

Compiled data outputs lowered into the existing retained Aster scene. No painter, input router, application snapshot or acknowledgement is created.

Structs

structaster_blueprint::retained::RetainedInstance

pub struct RetainedInstance { /* see fields */ }

Owns both runtime adoption and scene transaction, so callers cannot advance its data cache independently of a successful scene commit.

Methods

  • fn new(plan: Arc<Plan>, specs: Vec<VisualSpec>, limits: VisualLimits) -> Result<Self, RetainedError>
  • fn new_with<R>(plan: Arc<Plan>, specs: Vec<VisualSpec>, limits: VisualLimits, initialize: impl FnOnce(&mut Edit<'_>) -> Result<R, Error>) -> Result<(Self, R), RetainedError> — Inserts caller-owned existing Aster controls after graph nodes in the same cold scene transaction. Return their handles only after commit.
  • fn scene(&self) -> &Scene
  • fn runtime(&self) -> &RuntimeInstance
  • fn node(&self, key: NodeKey) -> Option<NodeId>
  • fn evaluate(&mut self, parameters: &BTreeMap<Symbol, Literal>, resources: &dyn ResourceResolver, clock: Option<f64>) -> Result<Candidate, RuntimeError>
  • fn commit(&mut self, candidate: Candidate, output: Output) -> Result<SceneStamp, RetainedError> — Validates exact staged data and prepared resource fit/scale before any writes. Scene failure leaves both scene and runtime adoption unchanged.
  • fn commit_with<R>(&mut self, candidate: Candidate, output: Output, update: impl FnOnce(&Candidate, &mut Edit<'_>) -> Result<R, Error>) -> Result<(SceneStamp, R), RetainedError> — Composes graph writes and ordinary control writes in one scene edit. Return cloned control candidates here; adopt them only after Ok. External callback side effects remain the caller's responsibility.
  • fn commit_for_renderer(&mut self, candidate: Candidate, output: Output, renderer: &mut Renderer) -> Result<SceneStamp, RetainedError> — As commit, admitting the Scene edit against renderer with Edit::commit_for_renderer. A refusal leaves the Scene, runtime cache and generation unchanged. Direct render_scene only; no frame is rendered, and affine/group PreparedScene composition is not covered.
  • fn commit_with_for_renderer<R>(&mut self, candidate: Candidate, output: Output, renderer: &mut Renderer, update: impl FnOnce(&Candidate, &mut Edit<'_>) -> Result<R, Error>) -> Result<(SceneStamp, R), RetainedError> — commit_with plus renderer admission.
  • fn epoch(&self) -> u64 — The plan epoch: 0 when cold, plus one per adopted retarget.
  • fn node_capacity(&self) -> usize — Scene node capacity fixed when this instance was built cold.
  • fn command_limit(&self) -> usize — Scene expanded-command limit fixed when this instance was built cold.
  • fn node_endpoint(&self, key: NodeKey) -> Option<NodeEndpoint>
  • fn resolve_endpoint(&self, endpoint: &NodeEndpoint) -> Result<NodeId, StaleEndpoint> — Resolve an endpoint to its live NodeId, or refuse it as stale.
  • fn prepare_retarget(&self, plan: Arc<Plan>, specs: Vec<VisualSpec>, parameters: &BTreeMap<Symbol, Literal>, resources: &dyn ResourceResolver, clock: Option<f64>, output: Output) -> Result<PreparedRetarget, RetargetError> — All fallible, Scene-free work of a retarget; changes nothing. Refuses with CapacityExceeded when the specs alone need more nodes than the Scene's fixed capacity. Pair with [PreparedRetarget::commit].
  • fn retarget(&mut self, plan: Arc<Plan>, specs: Vec<VisualSpec>, parameters: &BTreeMap<Symbol, Literal>, resources: &dyn ResourceResolver, clock: Option<f64>, output: Output) -> Result<RetargetReport, RetargetError>
  • fn retarget_with<R>(&mut self, plan: Arc<Plan>, specs: Vec<VisualSpec>, parameters: &BTreeMap<Symbol, Literal>, resources: &dyn ResourceResolver, clock: Option<f64>, output: Output, update: impl FnOnce(&Candidate, &mut Edit<'_>) -> Result<R, Error>) -> Result<(RetargetReport, R), RetargetError> — As retarget, with a hook to write ordinary control nodes in the same Scene edit. An Err from the hook aborts everything.
  • fn retarget_for_renderer(&mut self, plan: Arc<Plan>, specs: Vec<VisualSpec>, parameters: &BTreeMap<Symbol, Literal>, resources: &dyn ResourceResolver, clock: Option<f64>, output: Output, renderer: &mut Renderer) -> Result<RetargetReport, RetargetError> — As retarget, admitting the single Scene edit against renderer with Edit::commit_for_renderer. A refusal (for example a finite but enormous Recording) leaves nodes, runtime, visual table and epoch exactly as before. Direct render_scene only; PreparedScene affine/group composition is not covered.
  • fn retarget_with_for_renderer<R>(&mut self, plan: Arc<Plan>, specs: Vec<VisualSpec>, parameters: &BTreeMap<Symbol, Literal>, resources: &dyn ResourceResolver, clock: Option<f64>, output: Output, renderer: &mut Renderer, update: impl FnOnce(&Candidate, &mut Edit<'_>) -> Result<R, Error>) -> Result<(RetargetReport, R), RetargetError> — retarget_with plus renderer admission.
  • fn cold_rebuild(plan: Arc<Plan>, specs: Vec<VisualSpec>, limits: VisualLimits, parameters: &BTreeMap<Symbol, Literal>, resources: &dyn ResourceResolver, clock: Option<f64>, output: Output) -> Result<Self, RetainedError> — Explicit, caller-chosen fallback when a retarget reports CapacityExceeded (or any time a larger Scene is wanted): build a brand new instance for plan with limits, evaluate and commit it. Takes no existing instance, so the old one stays untouched until the caller replaces it. Node ids are NOT retained: every visual gets a fresh id and the epoch restarts at 0, so old NodeIds and endpoints are dead.

structaster_blueprint::retained::VisualLimits

pub struct VisualLimits { /* see fields */ }

Public fields

fieldtype
nodesusize
commandsusize

Trait implementations: Clone, Copy, Debug, Default

structaster_blueprint::retained::VisualSpec

pub struct VisualSpec { /* see fields */ }

Public fields

fieldtype
keymodel::NodeKey
model_keyaster_ui::ModelKeyApplication-selected key; never inferred from a graph identity.
boundsmodel::Symbol
contentContent

Trait implementations: Clone, Debug

Enums

enumaster_blueprint::retained::Content

pub enum Content { Fill, Drawing, Label, Prepared }

Variants

  • Fill — Name of a compiled Srgb8 output. Resolved to a typed slot once.
  • Drawing
  • Label
  • Prepared — A compiled Paint/Drawing/Label output, resolved once to its typed slot.

Trait implementations: Clone, Debug

enumaster_blueprint::retained::RetainedError

pub enum RetainedError { Runtime, Aster, Commit, MissingOutput, OutputType, DuplicateKey, NoFit }

Variants

  • Runtime
  • Aster
  • Commit
  • MissingOutput
  • OutputType
  • DuplicateKey
  • NoFit

Trait implementations: Debug, Display, Error, From<Error>, From<RuntimeError>