#[non_exhaustive]pub enum Code {
ValidationFailed,
UnallowedParent,
UnallowedChild,
IntegrityError,
InvalidFunctionCall,
ExpressionError,
DataError,
RecursionLimitExceeded,
CatalogNotFound,
}Expand description
The specification’s error codes that agent-side validation reports.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
ValidationFailed
The message or a component does not match the schema or a rule.
UnallowedParent
A component sits under a parent its allowedParents does not name.
UnallowedChild
A container holds a child its allowedChildren does not name.
IntegrityError
The message does not fit the surfaces’ state (a surface created twice, or one updated before it exists).
InvalidFunctionCall
A callRendererFunction the renderer would refuse.
ExpressionError
A dynamic value cannot be evaluated: a template that does not parse,
@index outside a list template, a function that cannot be resolved
(found by crate::runtime::Runtime, which evaluates the surface).
DataError
An updateDataModel write the path does not allow (through a string,
a non-numeric segment on an array). Sent on the wire as
VALIDATION_FAILED, the code for a message field that fails.
RecursionLimitExceeded
A limit the reference SDKs share was passed: values nested more than
MAX_DEPTH deep, components more than MAX_DEPTH below root,
function calls nested more than MAX_CALL_DEPTH deep, or components
that refer to each other in a cycle. Sent as RECURSION_LIMIT_EXCEEDED,
the reference SDKs’ code; the specification leaves codes other than its
three validation ones open.
CatalogNotFound
A component or a function call resolves to no catalog this renderer
has: the one it names is not supported, or it names none and its surface
has no default. Sent as CATALOG_NOT_FOUND, the reference SDKs’ code.
Implementations§
Trait Implementations§
impl Copy for Code
impl Eq for Code
impl StructuralPartialEq for Code
Auto Trait Implementations§
impl Forget for Code
impl Freeze for Code
impl Move for Code
impl RefUnwindSafe for Code
impl Send for Code
impl Sync for Code
impl Unpin for Code
impl UnsafeUnpin for Code
impl UnwindSafe for Code
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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.