Skip to main content

DiagnosticKind

Enum DiagnosticKind 

Source
#[non_exhaustive]
pub enum DiagnosticKind {
Show 14 variants Message, UnknownKey { key: Option<RawKey>, }, IndexOutOfBounds { index: Vec<ExactInteger>, shape: Option<Vec<usize>>, }, WrongType { expected: DataValueType, actual: DataValueType, }, Ambiguous { candidates: Vec<DiagnosticReference>, }, InvalidValue { value: Option<RawKey>, constraint: String, }, ShapeMismatch { expected: Vec<usize>, actual: Vec<usize>, }, StaleReference { reference: Box<DiagnosticReference>, current: Option<Box<DiagnosticReference>>, }, ReentrantOperation { active: OperationPhase, attempted: OperationPhase, }, NonConvergence { algorithm: &'static str, iterations: usize, reason: NonConvergenceReason, }, BudgetExceeded { resource: BudgetResource, required: u128, limit: u128, }, LayoutConflict { reason: FitReason, }, Unrepresentable { face_sha256: [u8; 32], face_index: u32, glyph_id: u16, paint: GlyphPaint, }, MissingResource(MissingResource),
}
Expand description

Exact data and circumstances of a detected failure.

The set grows with the actual supported producers. Message is also available for caller-authored errors without a native reason.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

Message

Caller-authored or general message with no additional typed reason.

§

UnknownKey

A required key or declaration could not be found.

Fields

§key: Option<RawKey>

Original key when the lookup used a key; other selectors appear in context.

§

IndexOutOfBounds

An invalid logical position, including addresses outside machine-word range.

Fields

§index: Vec<ExactInteger>

Original index, before machine-word conversion.

§shape: Option<Vec<usize>>

Actual logical domain shape, when the address has a selected domain.

§

WrongType

An actual role cannot supply the requested native payload type.

Fields

§expected: DataValueType

Requested value type.

§actual: DataValueType

Actual value type.

§

Ambiguous

A singular query matched multiple declarations or members.

Fields

§candidates: Vec<DiagnosticReference>

All actual matching references or member addresses.

§

InvalidValue

A value does not satisfy a declared constraint.

Fields

§value: Option<RawKey>

The actual value, or None for a missing value.

§constraint: String

The constraint imposed by the producer.

§

ShapeMismatch

Actual logical shape differs from the required shape.

Fields

§expected: Vec<usize>

Required shape.

§actual: Vec<usize>

Actual shape.

§

StaleReference

An actual previous reference is no longer valid for this owner.

Fields

§reference: Box<DiagnosticReference>

The requested reference, including its original declaration identity.

§current: Option<Box<DiagnosticReference>>

The current matching declaration, when present.

§

ReentrantOperation

An attempted operation conflicts with an active operation of the same owner.

Fields

§active: OperationPhase

Currently active phase.

§attempted: OperationPhase

Attempted phase.

§

NonConvergence

Actual iterative process did not converge.

Fields

§algorithm: &'static str

The actual algorithm.

§iterations: usize

Number of iterations executed.

§reason: NonConvergenceReason

Observed termination reason.

§

BudgetExceeded

A concrete resource or iteration limit was exceeded.

Fields

§resource: BudgetResource

The affected resource.

§required: u128

Required usage in that resource’s units.

§limit: u128

Allowed usage in those same units.

§

LayoutConflict

A measured layout constraint failed at its real component address.

Fields

§reason: FitReason

Actual typed fit failure reason and address.

§

Unrepresentable

A selected glyph requires paint that cannot be represented by the native outline contract.

Fields

§face_sha256: [u8; 32]

Exact identity of the retained font bytes.

§face_index: u32

Actual face in the retained font.

§glyph_id: u16

Selected glyph index.

§paint: GlyphPaint

Actual required paint.

§

MissingResource(MissingResource)

A required resource was unavailable.

Trait Implementations§

Source§

impl Clone for DiagnosticKind

Source§

fn clone(&self) -> DiagnosticKind

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 DiagnosticKind

Source§

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

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

impl Eq for DiagnosticKind

Source§

impl PartialEq for DiagnosticKind

Source§

fn eq(&self, other: &DiagnosticKind) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for DiagnosticKind

Auto Trait Implementations§

§

impl Forget for DiagnosticKind

§

impl Freeze for DiagnosticKind

§

impl Move for DiagnosticKind

§

impl RefUnwindSafe for DiagnosticKind

§

impl Send for DiagnosticKind
where RawVecInner: Send, Arc<[u8]>: Send, BoxRaw<RawKey>: Send, Arc<str>: Send, Arc<()>: Send, Arc<[RawKey]>: Send, BoxRaw<DiagnosticReference>: Send, &'static str: Send, Arc<Vec<AddressSegment>>: Send, Arc<Vec<FontFamily>>: Send,

§

impl Sync for DiagnosticKind
where RawVecInner: Sync, Arc<[u8]>: Sync, BoxRaw<RawKey>: Sync, Arc<str>: Sync, Arc<()>: Sync, Arc<[RawKey]>: Sync, BoxRaw<DiagnosticReference>: Sync, Arc<Vec<AddressSegment>>: Sync, Arc<Vec<FontFamily>>: Sync,

§

impl Unpin for DiagnosticKind

§

impl UnsafeUnpin for DiagnosticKind

§

impl UnwindSafe for DiagnosticKind

Blanket Implementations§

Source§

impl<T> Allocation for T
where T: RefUnwindSafe + Send + Sync,

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<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
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> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> Scalar for T
where T: 'static + Clone + PartialEq + Debug,

Source§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

Source§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
Source§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
Source§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
Source§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
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, 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<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V