#[non_exhaustive]pub struct Refusal {
pub code: RefusalCode,
pub path: String,
pub project_id: Option<String>,
pub rule: Option<Box<RefusalRule>>,
}Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.code: RefusalCode§path: String§project_id: Option<String>§rule: Option<Box<RefusalRule>>The schema rule the value at path broke, when validation can name a
single one. It holds schema text, so it is never serialized: a
serialized refusal keeps only the code and the pointer. Boxed so the
many Result<_, Refusal> returns stay small.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Refusal
impl<'de> Deserialize<'de> for Refusal
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Refusal
Source§impl Error for Refusal
impl Error for Refusal
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
impl StructuralPartialEq for Refusal
Auto Trait Implementations§
impl Forget for Refusal
impl Freeze for Refusalwhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
*const RefusalRule is !null: Freeze,
PhantomData<RefusalRule>: Freeze,
impl Move for Refusal
impl RefUnwindSafe for Refusal
impl Send for Refusal
impl Sync for Refusal
impl Unpin for Refusal
impl UnsafeUnpin for Refusalwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
*const RefusalRule is !null: UnsafeUnpin,
PhantomData<RefusalRule>: UnsafeUnpin,
impl UnwindSafe for Refusal
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