pub enum Cond {
Always,
TopLabel {
step: String,
label: String,
},
MassAtLeast {
step: String,
option: String,
threshold: Decimal,
uncalibrated_threshold: UncalibratedThreshold,
},
TopMassBelow {
step: String,
threshold: Decimal,
uncalibrated_threshold: UncalibratedThreshold,
},
ExpectationAtLeast {
step: String,
value: Decimal,
},
Exact(Predicate),
Empty(String),
Nonempty(String),
All(Vec<Cond>),
Any(Vec<Cond>),
Not(Box<Cond>),
ProvenanceWithin {
reference: String,
classes: Vec<ProvenanceClass>,
},
}Expand description
Policy conditions (spec 002, 3.11.3).
Variants§
Always
TopLabel
MassAtLeast
TopMassBelow
ExpectationAtLeast
Exact(Predicate)
Empty(String)
Nonempty(String)
All(Vec<Cond>)
Any(Vec<Cond>)
Not(Box<Cond>)
ProvenanceWithin
True when the referenced value’s provenance is within classes
(spec 033, 3.4.7).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Cond
impl<'de> Deserialize<'de> for Cond
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
Source§impl JsonSchema for Cond
impl JsonSchema for Cond
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreimpl StructuralPartialEq for Cond
Auto Trait Implementations§
impl Freeze for Cond
impl RefUnwindSafe for Cond
impl Send for Cond
impl Sync for Cond
impl Unpin for Cond
impl UnsafeUnpin for Cond
impl UnwindSafe for Cond
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