pub struct SchemaReject {
pub path: String,
pub reason: &'static str,
pub cascading: bool,
}Expand description
A type that has no JSON Schema in the safe subset.
path names the offending field so the diagnostic points at the thing the
author must change, not merely at the type as a whole (R8). It is a
dotted/bracketed path from the root — "items[0].handler" — and is empty
when the root type itself is unrepresentable.
Fields§
§path: String§reason: &'static str§cascading: boolThe walk hit a Type::Error — a type that already failed to resolve
and already reported its own diagnostic. There is still no schema to
emit, so this is an Err, but the caller must stay silent rather than
cascade a second diagnostic onto the same mistake. This is the one
reject a caller suppresses; unsupported_cast_target_reason reaches the
same conclusion by returning None for Type::Error.
Implementations§
Trait Implementations§
Source§impl Clone for SchemaReject
impl Clone for SchemaReject
Source§impl Debug for SchemaReject
impl Debug for SchemaReject
impl Eq for SchemaReject
Source§impl PartialEq for SchemaReject
impl PartialEq for SchemaReject
impl StructuralPartialEq for SchemaReject
Auto Trait Implementations§
impl Freeze for SchemaReject
impl RefUnwindSafe for SchemaReject
impl Send for SchemaReject
impl Sync for SchemaReject
impl Unpin for SchemaReject
impl UnsafeUnpin for SchemaReject
impl UnwindSafe for SchemaReject
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
Mutably borrows from an owned value. Read more
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
Compare self to
key and return true if they are equal.