pub enum SchemaOverlayError {
MissingTypeName,
NotAnObject {
type_name: String,
},
TooDeep {
type_name: String,
max_depth: usize,
},
Unsupported {
type_name: String,
path: String,
detail: String,
},
NoEffect {
type_name: String,
},
CyclicRef {
type_name: String,
cycle: Vec<String>,
},
RefChainTooLong {
type_name: String,
definition: String,
hops: usize,
},
ConflictingEnums {
type_name: String,
property: String,
},
DanglingRef {
type_name: String,
path: String,
target: String,
},
}Expand description
Why an overlay schema was rejected.
Every overlay entry point is fallible and validates its input up front: a rejected overlay leaves the schema store untouched rather than registering a half-usable schema.
Variants§
MissingTypeName
The resource type name was empty.
NotAnObject
The schema was not a JSON object.
TooDeep
The schema nests deeper than MAX_OVERLAY_DEPTH.
Unsupported
The schema uses a construct the compiled model cannot represent, which would otherwise compile to a weaker schema than the caller wrote.
NoEffect
The schema carried no keyword the compiler understands, so applying it would change nothing.
CyclicRef
The definition $ref graph contains a cycle, naming the definitions on it.
RefChainTooLong
A chain of $refs longer than resolution can follow to its end, which
would leave the constraints at the end of the chain unenforced.
ConflictingEnums
A property ended up with both enum representations populated, which the compiled model forbids.
DanglingRef
After the whole overlay sequence was applied, a $ref still points at a
definition the schema does not contain, so the property it sits on
validates nothing.
Trait Implementations§
Source§impl Clone for SchemaOverlayError
impl Clone for SchemaOverlayError
Source§impl Debug for SchemaOverlayError
impl Debug for SchemaOverlayError
Source§impl Display for SchemaOverlayError
impl Display for SchemaOverlayError
impl Eq for SchemaOverlayError
Source§impl Error for SchemaOverlayError
impl Error for SchemaOverlayError
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()
Source§impl From<SchemaOverlayError> for SchemaValidatorConfigError
impl From<SchemaOverlayError> for SchemaValidatorConfigError
Source§fn from(e: SchemaOverlayError) -> Self
fn from(e: SchemaOverlayError) -> Self
Source§impl PartialEq for SchemaOverlayError
impl PartialEq for SchemaOverlayError
impl StructuralPartialEq for SchemaOverlayError
Auto Trait Implementations§
impl Freeze for SchemaOverlayError
impl RefUnwindSafe for SchemaOverlayError
impl Send for SchemaOverlayError
impl Sync for SchemaOverlayError
impl Unpin for SchemaOverlayError
impl UnsafeUnpin for SchemaOverlayError
impl UnwindSafe for SchemaOverlayError
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
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§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.