pub struct ConditionSchema {
pub properties: BTreeMap<String, PropSchema>,
pub required: Vec<String>,
pub absent: Vec<String>,
pub prop_type: Option<PropType>,
pub any_of: Vec<ConditionSchema>,
pub one_of: Vec<ConditionSchema>,
pub not: Option<Box<ConditionSchema>>,
}Fields§
§properties: BTreeMap<String, PropSchema>§required: Vec<String>§absent: Vec<String>Properties the condition requires to be absent (properties.X: false
in JSON Schema rejects every value, so the instance can only satisfy the
condition by omitting the property).
prop_type: Option<PropType>The instance type the condition requires (if: {"type": ...}). A
condition stating a type only matches an instance of that type; resource
roots are always objects, so "object" is a no-op there while any other
type makes the condition unsatisfiable at the root.
any_of: Vec<ConditionSchema>§one_of: Vec<ConditionSchema>When non-empty, exactly one of these sub-conditions must match.
not: Option<Box<ConditionSchema>>When set, the condition matches only if this sub-condition does not.
Trait Implementations§
Source§impl Default for ConditionSchema
impl Default for ConditionSchema
Source§impl<'de> Deserialize<'de> for ConditionSchema
impl<'de> Deserialize<'de> for ConditionSchema
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
Auto Trait Implementations§
impl Freeze for ConditionSchema
impl RefUnwindSafe for ConditionSchema
impl Send for ConditionSchema
impl Sync for ConditionSchema
impl Unpin for ConditionSchema
impl UnsafeUnpin for ConditionSchema
impl UnwindSafe for ConditionSchema
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