API reference

aster_blueprint::prepared

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.

Runtime-only prepared-value primitive.

A [RuntimeValue] carries a value the running application already holds: a validated authored [Literal], an existing Aster [Paint], an existing retained Arc<Recording>, or an existing measured [Label]. It is the runtime counterpart of the authored resource dictionary entry, not a dictionary of its own.

This type is deliberately narrow. It mints no identity, carries no protocol and is never serialized; it proves no authority and no output admission. Paint and Drawing stay distinct variants, and the Surface variant is a separate, explicit family: no variant converts into another, so a paint is never silently re-read as a surface and a surface is never silently re-read as a paint. The variants hold the existing payloads verbatim, so equality and debug reporting mirror the underlying facilities instead of inventing a new notion of identity.

Enums

enumaster_blueprint::prepared::RuntimeValue

pub enum RuntimeValue { Literal, Paint, Drawing, Label, Surface, Fluid }

A prepared value the runtime can carry.

#[non_exhaustive]: new carried families may be added later without breaking callers, and callers must handle a value by its declared type rather than assuming the current set of variants.

Runtime-only. This is not an authored source value, not a stable asset ID, not a wire/serialization form and not application authority. It borrows existing aster-ui payloads unchanged.

Methods

  • fn value_type(&self) -> ValueType — The declared type of the carried value.
  • fn as_literal(&self) -> Option<&Literal> — Borrows the carried literal, if this value is one.
  • fn as_paint(&self) -> Option<&Paint> — Borrows the carried paint, if this value is one.
  • fn as_drawing(&self) -> Option<&Arc<Recording>> — Borrows the carried recording Arc, if this value is one.
  • fn as_label(&self) -> Option<&Label> — Borrows the carried label, if this value is one.
  • fn as_surface(&self) -> Option<&Surface> — Borrows the carried surface, if this value is one.
  • fn into_surface(self) -> Option<Surface> — Takes the carried surface out of this value, if it is one.

Variants

  • Literal — A validated, non-secret authored literal payload.
  • Paint — An existing solid or gradient paint.
  • Drawing — An existing retained recording, shared by Arc.
  • Label — An existing measured label.
  • Surface — An existing caller-provided surface: nothing, an existing paint or an existing painted recording.
  • Fluid — A running fluid simulation (shared, immutable once produced; see crate::fluid_nodes).

Trait implementations: Clone, Debug, From<Surface>, PartialEq