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.
Actual Aster resource bridge for authored blueprint assets.
Maps typed, process-local opaque handles to the existing aster-ui
resources an asset may reference: Paint, Arc<Recording> and a measured
Label. It does not duplicate the theme dictionary, mint global named theme
keys, or carry an asset-alias table; that namespace is owned elsewhere. No
painter, router or pool wire is created here.
Handles are local tokens, never serialized and never authority. The arena is small and bounded: insertion is refused before any slot or budget is written when the fixed slot capacity or retained recording-command budget would be exceeded, and removal frees both. Retrieval re-checks the exact owning arena and slot generation, so a foreign-arena handle, a removed handle, or a handle whose slot was reused fail instead of aliasing another resource.
Only retained command counts are measured; total resident bytes / RSS are not derivable from this facade and are not claimed. Errors never echo resource payloads.
Structs
structaster_blueprint::resources::ArenaId
pub struct ArenaId(..)Process-local arena identity. Not persisted, not an asset ID, not authority.
Trait implementations: Clone, Copy, Debug, Eq, PartialEq, StructuralPartialEq
structaster_blueprint::resources::Handle
pub struct Handle<K> { /* see fields */ }Typed local opaque handle. The kind parameter keeps families apart at the type level: a paint handle cannot be passed where a label is required.
Methods
fn arena(&self) -> ArenaId— The owning arena token.fn slot(&self) -> u32— The slot index inside the owning arena.fn generation(&self) -> u32— The slot generation recorded at insertion.
Trait implementations: Clone, Copy, Debug, Eq, PartialEq
structaster_blueprint::resources::ResourceArena
pub struct ResourceArena { /* see fields */ }Bounded, process-local arena of retained blueprint resources.
The arena owns its slots; it is not a global registry, not a theme table and not an alias namespace. Capacity is fixed at construction, freed slot indices are reused, and every removal releases the retained command count the resource was charged with.
Methods
fn new(capacity: usize, command_budget: usize) -> Result<Self, ResourceError>— Creates an empty arena with a fixed slot capacity and command budget.fn arena_id(&self) -> ArenaId— The process-local identity of this arena.fn capacity(&self) -> usize— The fixed slot capacity chosen at construction.fn command_budget(&self) -> usize— The retained recording-command budget chosen at construction.fn retained_commands(&self) -> usize— Recording commands currently retained by live slots.fn live_slots(&self) -> usize— Number of live (non-empty) slots.fn slot_count(&self) -> usize— Number of allocated slots, live plus free plus retired.fn insert_paint(&mut self, paint: Paint) -> Result<PaintHandle, ResourceError>— Retains an existing paint. A paint costs no retained commands.fn insert_recording(&mut self, recording: Arc<Recording>) -> Result<RecordingHandle, ResourceError>— Retains an existing recording and charges its command count.fn insert_label(&mut self, label: Label) -> Result<LabelHandle, ResourceError>— Retains an existing measured label and charges its content commands.fn paint(&self, handle: PaintHandle) -> Result<&Paint, ResourceError>— Borrows the retained paint behind a handle.fn recording(&self, handle: RecordingHandle) -> Result<&Arc<Recording>, ResourceError>— Borrows the retained recording behind a handle.fn label_payload(&self, handle: LabelHandle) -> Result<&Label, ResourceError>— Borrows the retained label behind a handle after exact owner, generation and kind admission.fn label(&self, handle: LabelHandle, scale: f64, available: LayoutSize) -> Result<&Label, ResourceError>— Borrows the retained label behind a handle at an explicit output scale.fn remove_paint(&mut self, handle: PaintHandle) -> Result<(), ResourceError>— Removes a retained paint and frees its slot.fn remove_recording(&mut self, handle: RecordingHandle) -> Result<(), ResourceError>— Removes a retained recording, releasing its retained command count.fn remove_label(&mut self, handle: LabelHandle) -> Result<(), ResourceError>— Removes a retained label, releasing its content command count.
Trait implementations: Debug
Enums
enumaster_blueprint::resources::LabelKind
pub enum LabelKind { }Marker tag for label handles.
enumaster_blueprint::resources::PaintKind
pub enum PaintKind { }Marker tag for paint handles.
enumaster_blueprint::resources::RecordingKind
pub enum RecordingKind { }Marker tag for recording handles.
enumaster_blueprint::resources::ResourceError
pub enum ResourceError { Capacity, Budget, Allocation, IdentityExhausted, UnknownArena, UnknownHandle, StaleGeneration, KindMismatch, ScaleMismatch, BoundsExceeded }Refusal of a resource-arena operation. Names only the reason, never content.
Variants
Capacity— The fixed slot capacity would be exceeded.Budget— The retained recording-command budget would be exceeded.Allocation— Cold slot reservation failed.IdentityExhausted— The process-local arena identity counter is exhausted.UnknownArena— The handle belongs to a different arena.UnknownHandle— The handle indexes no live slot in its arena.StaleGeneration— The slot was removed or reused since the handle was issued.KindMismatch— The slot holds a different resource family (defensive; unreachable through the typed handles).ScaleMismatch— A prepared label refuses the requested output scale.BoundsExceeded— A label does not fit the caller's explicit available bounds.
Trait implementations: Clone, Copy, Debug, Display, Eq, Error, From<ResourceError>, PartialEq, StructuralPartialEq
Type aliases
typeaster_blueprint::resources::LabelHandle
pub type LabelHandle = Handle<LabelKind>;Handle to a measured [Label].
typeaster_blueprint::resources::PaintHandle
pub type PaintHandle = Handle<PaintKind>;Handle to an existing [Paint].
typeaster_blueprint::resources::RecordingHandle
pub type RecordingHandle = Handle<RecordingKind>;Handle to an existing Arc<Recording>.