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 graph outputs composed into the existing Aster material layers.
This module is a bridge, not a painter. It binds exactly one compiled graph plan to the caller's material-layer composition: the plan's declared outputs name the root bounds and each layer's bounds and surface, and one staged runtime candidate supplies their values.
The bridge owns no identity, no registry, no theme, no router and no
authority. The caller supplies the root model key, the clip and the
radius; the graph supplies only the declared values, and the surfaces are
the caller's own [aster_ui::Paint] and shared [aster_ui::Recording] payloads, carried
verbatim.
Resolution happens once. The constructor resolves every declared output
name to its slot and proves its declared type, so an evaluation never
re-resolves a name. [MaterialPlan::prepare] then reads the exact typed
payloads of a staged candidate and builds an ordinary
[PartSpec] for the existing
LayeredPart composition.
Preparing a part is a pure function of the candidate: it touches no scene and advances no cache. The caller decides when to insert or update the part, and does it inside the runtime's own commit transaction.
The legacy [LayerBinding] surface path supports Paint, Drawing and
explicit Surface surfaces, and continues to refuse a Label output
explicitly. The additive [PreparedLayerBinding::Label] variant binds an
actual measured label output: it is never approximated and its measured
content is lowered to the existing shared Recording only in
[MaterialPlan::prepare_for_output], after the label proves its prepared
output scale and fits its declared bounds. An authored literal is never
accepted in place of a surface or label payload.
(documentation continues in the source)
Structs
structaster_blueprint::material_plan::LayerBinding
pub struct LayerBinding { /* see fields */ }One layer's binding to the declared outputs of the bound plan.
bounds and surface are declared output names, not values. They are
resolved to slots once, when the plan is constructed.
Public fields
| field | type | |
|---|---|---|
key | model::Symbol | The caller's key for this layer. It is unique inside one plan. |
role | material_layers::LayerRole | The ordering role of this layer. |
bounds | model::Symbol | The declared output name of this layer's LogicalRect bounds. |
surface | model::Symbol | The declared output name of this layer's Paint or Drawing surface. |
Trait implementations: Clone, Debug
structaster_blueprint::material_plan::MaterialPlan
pub struct MaterialPlan { /* see fields */ }A graph plan bound to the caller's material-layer composition.
The plan identity is bound once, at construction: the declared outputs are resolved to their slots and their declared types are proved there. A candidate staged from another plan is refused before any slot value is read.
Methods
fn new(plan: &Plan, root_bounds: &Symbol, bindings: &[LayerBinding], root: RootSpec) -> Result<Self, MaterialPlanError>— Binds one compiled plan to the caller's layer bindings.fn new_prepared(plan: &Plan, root_bounds: &Symbol, bindings: &[PreparedLayerBinding], root: RootSpec) -> Result<Self, MaterialPlanError>— Binds one compiled plan to the caller's prepared layer bindings.fn plan_id(&self) -> PlanId— The plan identity this material plan is bound to.fn layer_count(&self) -> usize— The number of bound layers.fn layer_keys(&self) -> impl Iterator<Item = &Symbol>— The caller keys of the bound layers, in caller order.fn prepare(&self, candidate: &Candidate) -> Result<PartSpec, MaterialPlanError>— Builds the actual part specification of one staged candidate.fn prepare_for_output(&self, candidate: &Candidate, output: Output) -> Result<PartSpec, MaterialPlanError>— Builds the actual part specification of one staged candidate for the exact supplied output.
Trait implementations: Clone, Debug
structaster_blueprint::material_plan::RootSpec
pub struct RootSpec { /* see fields */ }The caller-owned root identity and composition parameters of one part.
Nothing here is inferred from the graph: the model key, the clip and the radius are the caller's explicit choices.
Public fields
| field | type | |
|---|---|---|
model_key | aster_ui::ModelKey | The explicit model key of the part root. |
clip | aster_ui::Clip | The clip applied to the part root subtree. |
radius | f64 | The default corner radius of the painted layers. |
Trait implementations: Clone, Copy, Debug
Enums
enumaster_blueprint::material_plan::MaterialPlanError
pub enum MaterialPlanError { MissingOutput, OutputType, LabelUnsupported, OutputRequired, Label, DuplicateKey, ForeignPlan, MissingValue, ValueType, InvalidBounds }The refusal of a material plan.
Variants
MissingOutput— The declared output name is not an output of the bound plan.OutputType— The declared output has an unsupported declared type.LabelUnsupported— ALabelsurface on the legacy [LayerBinding] path is refused explicitly instead of being approximated by another surface.OutputRequired— A bound label layer needs the exact output it is prepared for.Label— The carrier label content is not usable at the requested output.DuplicateKey— Two layer bindings of one plan share a caller key.ForeignPlan— The candidate was staged from another plan.MissingValue— The candidate carries no value for the declared slot.ValueType— The carried value does not match the declared output type.InvalidBounds— The carried rectangle is not usable geometry.
Trait implementations: Clone, Debug, Display, Eq, Error, From<MaterialPlanError>, PartialEq, StructuralPartialEq
enumaster_blueprint::material_plan::PreparedLayerBinding
pub enum PreparedLayerBinding { Surface, Label }One prepared layer binding: an exact surface binding or an explicit measured-label binding.
This is the additive, explicit-label form of one layer. It keeps the
legacy [LayerBinding] surface path exactly as it was, including its
explicit [MaterialPlanError::LabelUnsupported] refusal of a declared
Label output.
Variants
Surface— An exact surface layer, resolved exactly like [LayerBinding]:Paint,Drawingor explicitSurface. A declaredLabeloutput is still refused as [MaterialPlanError::LabelUnsupported].Label— An explicit measured-label layer.
Trait implementations: Clone, Debug
enumaster_blueprint::material_plan::SurfaceKind
pub enum SurfaceKind { Paint, Drawing, Surface }The surface families a layer may carry in this first slice.
The kind is fixed by the declared output type. Concrete Paint/Drawing remain exact; an explicit Surface output may change its carried family between evaluations without changing the compiled plan.
Variants
Paint— A solid or gradient paint, carried verbatim.Drawing— A retained recording, shared byArc.Surface— A whole explicit surface: nothing, a paint or a shared recording, carried verbatim.
Trait implementations: Clone, Copy, Debug, Eq, PartialEq, StructuralPartialEq