#[non_exhaustive]pub struct CheckRule {
pub condition: Value,
pub message: Option<String>,
}Expand description
One @checks rule: a condition (a binding or a function call) and the
message to show when it fails.
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.condition: ValueA {"@path": ...} or a function call, evaluating to a boolean or a
validation result.
message: Option<String>The fallback message.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for CheckRule
impl<'de> Deserialize<'de> for CheckRule
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 StructuralPartialEq for CheckRule
Auto Trait Implementations§
impl Forget for CheckRule
impl Freeze for CheckRulewhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<Value>: Freeze,
PhantomData<usize>: Freeze,
PhantomData<Bucket<String, Value>>: Freeze,
impl Move for CheckRule
impl RefUnwindSafe for CheckRule
impl Send for CheckRule
impl Sync for CheckRule
impl Unpin for CheckRule
impl UnsafeUnpin for CheckRulewhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<Value>: UnsafeUnpin,
PhantomData<usize>: UnsafeUnpin,
PhantomData<Bucket<String, Value>>: UnsafeUnpin,
impl UnwindSafe for CheckRule
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