pub enum EngineError {
AtlasError,
MissingTextureBinding,
IntermediateTextureTooLarge,
IntermediateTextureLimitReached,
TargetTooLarge,
InvalidTransform,
InvalidGeometry,
SchedulerEscalation {
reason: String,
},
RetainedKeyMissing {
key: u64,
},
TooManyBackdrops {
recorded: usize,
max: usize,
},
AlphaCapacity,
PaintCapacity,
}Expand description
Engine render errors — returned on frame paths, never panicked.
Mirrors the reference sparse-strips renderer’s error cases plus engine-specific constraints. The engine always returns errors on invalid or oversized resources rather than panicking, per Frust’s frame-path invariant (E17).
Variants§
AtlasError
MissingTextureBinding
IntermediateTextureTooLarge
IntermediateTextureLimitReached
TargetTooLarge
InvalidTransform
InvalidGeometry
A command’s own geometry — a rectangle’s extents, a corner radius, a path point, a stroke width, a dash length or phase — is non-finite.
Separate from InvalidTransform because the
two name different halves of a frame’s input: a transform maps geometry
onto the device grid, while this is the geometry itself, and a caller
chasing a blank frame needs to know which of the two it recorded wrong.
Both are refused by the same up-front walk, before any lowering runs.
SchedulerEscalation
A frame’s layer shape is outside what the engine’s scheduler serves.
reason names what was found — a layer graph needing a third live
intermediate page at one pass, a chain deeper than the two-page
ping-pong serves, a filter layer, a non-default blend mode — because the
caller’s own log is where a frame that produced no pixels has to be
explainable from.
Returned rather than panicked (E17), but it is not a route to a second
renderer: the engine tier carries none, and which renderer draws a
surface is settled when that surface is configured, not per frame. The
caller decides what becomes of the frame, and skipping it is the only
answer available — frust-render’s engine arm releases the acquired
texture unpresented, counts the refusal and logs reason rate-limited,
leaving whatever was presented last on the screen.
RetainedKeyMissing
A Command::DrawRetained named a
retained page the engine cannot composite it from: the key is not
resident (evicted, never recorded, or dropped with the store), or it is
resident at a placement the draw cannot be served from — another linear
transform or extent, or under a coverage-mask clip a composite cannot
honour (see crate::cache::retained).
The frame is refused before anything is recorded, exactly like every other variant here, and the retained store is cleared on the way out: the resident-key ledger the widget tree painted against was wrong, and the cheapest way back to an agreeing pair is an empty store whose empty ledger makes the next frame paint every body again. Logged once per refusal by the caller, like any refused frame.
TooManyBackdrops
A frame records more
Command::BackdropBlurs than the
engine serves in one frame
(MAX_BACKDROPS_PER_FRAME).
Each backdrop costs the frame a cut of its surface pass, a region copy and a blur’s whole pass sequence, so the count is bounded rather than left to grow with a widget tree; a frame past the bound is refused up front, before anything is recorded, exactly like a scheduler escalation — never rendered with some of its backdrops missing.
AlphaCapacity
PaintCapacity
Trait Implementations§
Source§impl Clone for EngineError
impl Clone for EngineError
Source§impl Debug for EngineError
impl Debug for EngineError
Source§impl Display for EngineError
impl Display for EngineError
Source§impl Error for EngineError
impl Error for EngineError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()