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.
Transactional placement of one compiled material instance.
Uses the existing runtime candidate identity and Scene transaction. This adapter owns no theme, application state, input, clock or presentation.
Structs
structaster_blueprint::material_instance::MaterialInstance
pub struct MaterialInstance { /* see fields */ }One runtime and its fixed-topology material part in a caller-owned Scene.
Construction and evaluation do not write a Scene. Only successful commit
adopts the runtime cache and optional placed handle. The parent is fixed;
removing/replacing owned nodes externally makes subsequent updates fail.
No renderer capacity or arbitrary Recording admission is implied.
Methods
fn new(plan: Arc<Plan>, material: MaterialPlan, parent: Option<NodeId>) -> Result<Self, MaterialInstanceError>fn runtime(&self) -> &RuntimeInstance— Read-only access to the existing accepted runtime, not a second cache.fn part(&self) -> Option<&LayeredPart>— The accepted handle; absent until the first successful Scene commit.fn evaluate(&mut self, parameters: &BTreeMap<Symbol, Literal>, resources: &dyn ResourceResolver, clock: Option<f64>) -> Result<Candidate, RuntimeError>— Stage using caller-owned resources/parameters and optional caller clock.fn commit(&mut self, candidate: Candidate, scene: &mut Scene, output: Output, budget: &LayerBudget) -> Result<(), CommitFailure<MaterialInstanceError>>— Validate existing candidate ownership/generation before any preparation or Scene work. Prepare at the exact supplied output, update/insert into one Edit, commit it, then adopt the handle and runtime cache.fn commit_for_renderer(&mut self, candidate: Candidate, scene: &mut Scene, output: Output, budget: &LayerBudget, renderer: &mut Renderer) -> Result<(), CommitFailure<MaterialInstanceError>>— Ascommit, but the Scene edit is admitted withEdit::commit_for_rendereragainstrendererbefore anything is adopted. Output the direct renderer cannot paint (for example a finite but enormous Recording) is refused asScenewith the previous Scene, handle, runtime cache and generation unchanged. Covers directrender_sceneonly, not the affine/group PreparedScene route, and does not render or publish a frame.
Enums
enumaster_blueprint::material_instance::MaterialInstanceError
pub enum MaterialInstanceError { Runtime, Material, Layer, Scene }A preparation, layer or Scene failure. Failed transactions retain accepted state.
Variants
RuntimeMaterialLayerScene
Trait implementations: Debug, Display, Error