#[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
Message
Caller-authored or general message with no additional typed reason.
UnknownKey
A required key or declaration could not be found.
Fields
IndexOutOfBounds
An invalid logical position, including addresses outside machine-word range.
Fields
index: Vec<ExactInteger>Original index, before machine-word conversion.
WrongType
An actual role cannot supply the requested native payload 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
ShapeMismatch
Actual logical shape differs from the required 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.
NonConvergence
Actual iterative process did not converge.
Fields
reason: NonConvergenceReasonObserved termination reason.
BudgetExceeded
A concrete resource or work budget was insufficient.
Fields
resource: BudgetResourceThe affected resource.
LayoutConflict
A measured layout constraint failed at its real component address.
Unrepresentable
A selected glyph requires paint that cannot be represented by the native outline contract.
Fields
paint: GlyphPaintActual required paint.
MissingResource(MissingResource)
A required resource was unavailable.
Trait Implementations§
Source§impl Clone for DiagnosticKind
impl Clone for DiagnosticKind
Source§impl Debug for DiagnosticKind
impl Debug for DiagnosticKind
impl Eq for DiagnosticKind
Source§impl PartialEq for DiagnosticKind
impl PartialEq for DiagnosticKind
impl StructuralPartialEq for DiagnosticKind
Auto Trait Implementations§
impl Forget for DiagnosticKind
impl Freeze for DiagnosticKindwhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
*const ArcInner<[u8]> is !null: Freeze,
PhantomData<ArcInner<[u8]>>: Freeze,
PhantomData<RawKey>: Freeze,
*const RawKey is !null: Freeze,
*const ArcInner<str> is !null: Freeze,
PhantomData<ArcInner<str>>: Freeze,
PhantomData<ExactInteger>: Freeze,
PhantomData<usize>: Freeze,
PhantomData<DiagnosticReference>: Freeze,
*const DiagnosticReference is !null: Freeze,
&'static str: Freeze,
*const ArcInner<Vec<AddressSegment>> is !null: Freeze,
PhantomData<ArcInner<Vec<AddressSegment>>>: Freeze,
*const ArcInner<Vec<FontFamily>> is !null: Freeze,
PhantomData<ArcInner<Vec<FontFamily>>>: Freeze,
impl Move for DiagnosticKind
impl RefUnwindSafe for DiagnosticKind
impl Send for DiagnosticKind
impl Sync for DiagnosticKind
impl Unpin for DiagnosticKind
impl UnsafeUnpin for DiagnosticKindwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
*const ArcInner<[u8]> is !null: UnsafeUnpin,
PhantomData<ArcInner<[u8]>>: UnsafeUnpin,
PhantomData<RawKey>: UnsafeUnpin,
*const RawKey is !null: UnsafeUnpin,
*const ArcInner<str> is !null: UnsafeUnpin,
PhantomData<ArcInner<str>>: UnsafeUnpin,
PhantomData<ExactInteger>: UnsafeUnpin,
PhantomData<usize>: UnsafeUnpin,
PhantomData<DiagnosticReference>: UnsafeUnpin,
*const DiagnosticReference is !null: UnsafeUnpin,
&'static str: UnsafeUnpin,
*const ArcInner<Vec<AddressSegment>> is !null: UnsafeUnpin,
PhantomData<ArcInner<Vec<AddressSegment>>>: UnsafeUnpin,
*const ArcInner<Vec<FontFamily>> is !null: UnsafeUnpin,
PhantomData<ArcInner<Vec<FontFamily>>>: UnsafeUnpin,
impl UnwindSafe for DiagnosticKindwhere
RawVecInner: UnwindSafe,
Arc<[u8]>: UnwindSafe,
BoxRaw<RawKey>: UnwindSafe,
Arc<str>: UnwindSafe,
Arc<()>: UnwindSafe,
Arc<[RawKey]>: UnwindSafe,
BoxRaw<DiagnosticReference>: UnwindSafe,
&'static str: UnwindSafe,
Arc<Vec<AddressSegment>>: UnwindSafe,
Arc<Vec<FontFamily>>: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
impl<T> Scalar for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.