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.
A reusable named default material dictionary over the existing seams.
This module authors exactly one reusable thing: a bounded, named
aster.materials.v1 vocabulary that binds the three material surfaces
(ui.material.inside, ui.material.outline, ui.material.outside) to
caller-owned prepared handles. It reuses the existing theme layer
([Theme], ThemeInstance), the existing typed resource dictionary
([ResourceEntry]), the existing prepared-handle seam ([PreparedHandle],
[SurfaceHandle]) and the existing bounded [ResourceArena]. It adds no
kernel, no registry, no resource id, no wire protocol and no painter: every
value it produces is a value the current code already computes.
The vocabulary is deliberately small and it is not a widget library and not a complete default theme. It defines material bindings only: no layout, no typography, no motion and no stock visual blueprint. The host still owns presentation; nothing here proves a renderer can present these surfaces.
[DefaultMaterialTheme] is caller-created and owns
- one [
ResourceArena] whose default has two paint slots and zero retained recording commands (with_limitsadmits explicit extra storage), - exactly two retained paints (the
insideandoutlinesolids), and - one caller-owned handle map that binds the surface and paint names to those existing handles.
The base [Theme] is built by this value and exposed as a borrowed
Arc<Theme>, so callers can share it with independent ThemeInstances.
The arena and the handle map are exposed both immutably and explicitly
mutably. There is no hidden refresh, no cache and no lifetime extension: a
caller which removes or reuses an arena slot invalidates the old handles
itself, and the next admission refuses the stale handle.
(documentation continues in the source)
Structs
structaster_blueprint::material_theme::DefaultMaterialTheme
pub struct DefaultMaterialTheme { /* see fields */ }Caller-owned default material vocabulary and its explicit resource storage.
Methods
fn new(palette: MaterialPalette) -> Result<Self, MaterialThemeError>— Builds theaster.materials.v1vocabulary and binds its handles.fn with_limits(palette: MaterialPalette, slots: usize, commands: usize) -> Result<Self, MaterialThemeError>— Explicit storage limits for callers adding custom material overrides. Two slots are used by the default paints. Recording overrides consume additional caller-admitted slots and their actual command budget. Original arena/allocation/identity and theme refusals remain typed.fn base(&self) -> &Arc<Theme>— The owned base theme, shared as a borrowedArc.fn arena(&self) -> &ResourceArena— The owned arena, borrowed.fn handles(&self) -> &BTreeMap<Symbol, PreparedHandle>— The caller-owned handle map, borrowed.fn arena_mut(&mut self) -> &mut ResourceArena— Explicit caller-owned mutable arena access, with no hidden refresh.fn handles_mut(&mut self) -> &mut BTreeMap<Symbol, PreparedHandle>— Explicit caller-owned mutable handle-map access.fn inside_paint(&self) -> PaintHandle— The initially issuedinsidepaint handle; explicit mutation may retire it.fn outline_paint(&self) -> PaintHandle— The initially issuedoutlinepaint handle; explicit mutation may retire it.
structaster_blueprint::material_theme::MaterialPalette
pub struct MaterialPalette { /* see fields */ }Caller-supplied solid colors for the two material paints.
These two fields are the only color inputs to [DefaultMaterialTheme::new];
the constructor holds no third, hidden palette. [Default] documents the
neutral starting colors: an opaque neutral blue inside and an opaque
neutral gray outline. Both are explicit byte sRGB, never an untagged linear
color.
Public fields
| field | type | |
|---|---|---|
inside | aster_ui::Srgb8 | Solid color of the inside material. |
outline | aster_ui::Srgb8 | Solid color of the outline material. |
Trait implementations: Clone, Copy, Debug, Default, Eq, PartialEq, StructuralPartialEq
Enums
enumaster_blueprint::material_theme::MaterialThemeError
pub enum MaterialThemeError { Resource, Asset }Preserves the original arena or authored-theme construction refusal.
Variants
ResourceAsset
Trait implementations: Debug, Display, Error, From<AssetError>, From<ResourceError>
Constants
constaster_blueprint::material_theme::BUTTON_INSIDE
pub const BUTTON_INSIDE: &strui.button.inside alias of [MATERIAL_INSIDE].
constaster_blueprint::material_theme::BUTTON_OUTLINE
pub const BUTTON_OUTLINE: &strui.button.outline alias of [MATERIAL_OUTLINE].
constaster_blueprint::material_theme::BUTTON_OUTSIDE
pub const BUTTON_OUTSIDE: &strui.button.outside alias of [MATERIAL_OUTSIDE].
constaster_blueprint::material_theme::CARD_INSIDE
pub const CARD_INSIDE: &strui.card.inside alias of [MATERIAL_INSIDE].
constaster_blueprint::material_theme::CARD_MATERIAL
pub const CARD_MATERIAL: &strHost paint binding used by the existing stock card (ui.card.material).
constaster_blueprint::material_theme::CARD_OUTLINE
pub const CARD_OUTLINE: &strui.card.outline alias of [MATERIAL_OUTLINE].
constaster_blueprint::material_theme::CARD_OUTSIDE
pub const CARD_OUTSIDE: &strui.card.outside alias of [MATERIAL_OUTSIDE].
constaster_blueprint::material_theme::COMMAND_BUDGET
pub const COMMAND_BUDGET: usizeDefault retained recording-command budget of the owned arena.
constaster_blueprint::material_theme::MATERIAL_INSIDE
pub const MATERIAL_INSIDE: &strInside material surface binding (ui.material.inside).
constaster_blueprint::material_theme::MATERIAL_OUTLINE
pub const MATERIAL_OUTLINE: &strOutline material surface binding (ui.material.outline).
constaster_blueprint::material_theme::MATERIAL_OUTSIDE
pub const MATERIAL_OUTSIDE: &strOutside material surface binding (ui.material.outside), explicitly empty.
constaster_blueprint::material_theme::MATERIAL_THEME_NAME
pub const MATERIAL_THEME_NAME: &strVersioned name of the default material vocabulary.
constaster_blueprint::material_theme::MATERIAL_THEME_VERSION
pub const MATERIAL_THEME_VERSION: u32Version of the default material vocabulary.
constaster_blueprint::material_theme::PAINT_SLOTS
pub const PAINT_SLOTS: usizeDefault paint-slot capacity of the owned arena.