Skip to main content

EngineError

Enum EngineError 

Source
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.

Fields

§reason: String

What the scheduler found that it does not serve.

§

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.

Fields

§key: u64

The raw key the DrawRetained carried.

§

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.

Fields

§recorded: usize

How many backdrop blurs the frame recorded.

§max: usize

The per-frame bound.

§

AlphaCapacity

§

PaintCapacity

Trait Implementations§

Source§

impl Clone for EngineError

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for EngineError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for EngineError

Source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for EngineError

1.30.0 · Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T, S> SimdFrom<T, S> for T
where S: Simd,

Source§

fn simd_from(_simd: S, value: T) -> T

Source§

impl<F, T, S> SimdInto<T, S> for F
where T: SimdFrom<F, S>, S: Simd,

Source§

fn simd_into(self, simd: S) -> T

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WasmNotSend for T
where T: Send,

Source§

impl<T> WasmNotSendSync for T

Source§

impl<T> WasmNotSync for T
where T: Sync,