pub struct ParamsCheck { /* private fields */ }Expand description
The compiled schema of one action’s with: block.
Implementations§
Source§impl ParamsCheck
impl ParamsCheck
Sourcepub fn validate(&self, with: &Value) -> Vec<Violation>
pub fn validate(&self, with: &Value) -> Vec<Violation>
Every way with fails the action’s schema, one violation per thing
to fix.
An object with several unexpected keys gives one violation per key, so
each can point at its own key. A value of the wrong type gives that
violation alone: the rules about its value do not apply to it.
Otherwise, of the rules one value breaks, those with an x-message
say more than the generic ones and are the ones kept, and of two
bounds on the same side only the tighter is.
Sourcepub fn message(
&self,
action: ActionType,
with: &Value,
violation: &Violation,
values: Values,
) -> String
pub fn message( &self, action: ActionType, with: &Value, violation: &Violation, values: Values, ) -> String
The violation in words, for the author of the step holding with.
A violation about a value reads as the rule, then the value found when
values allows it. Keys are always named: they are the definition’s,
never a secret.
Auto Trait Implementations§
impl Freeze for ParamsCheck
impl RefUnwindSafe for ParamsCheck
impl Send for ParamsCheck
impl Sync for ParamsCheck
impl Unpin for ParamsCheck
impl UnsafeUnpin for ParamsCheck
impl UnwindSafe for ParamsCheck
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