#[non_exhaustive]pub enum Check {
#[non_exhaustive] Rate {
entrant: String,
success: Vec<Condition>,
band: Band,
floor: Option<u32>,
},
#[non_exhaustive] Median {
entrant: String,
measure: String,
among: Vec<Condition>,
want: Want,
than: String,
},
}Expand description
A check of a run, kept as data.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
#[non_exhaustive]Rate
The share of entrant’s tries that meet every success condition
is within band. A share under floor percent blocks the run.
Fields
This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
#[non_exhaustive]Median
The median of measure over entrant’s tries that meet among
is lower or higher than the same median of entrant than.
Fields
This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
Implementations§
Source§impl Check
impl Check
Sourcepub fn rate(
entrant: impl Into<String>,
success: Vec<Condition>,
band: Band,
) -> Self
pub fn rate( entrant: impl Into<String>, success: Vec<Condition>, band: Band, ) -> Self
A Rate: the share of entrant’s tries that meet
every success condition is within band, with no floor
(with_floor sets one).
Sourcepub fn median(
entrant: impl Into<String>,
measure: impl Into<String>,
want: Want,
than: impl Into<String>,
) -> Self
pub fn median( entrant: impl Into<String>, measure: impl Into<String>, want: Want, than: impl Into<String>, ) -> Self
A Median: the median of measure over all of
entrant’s tries leans want of entrant than’s
(with_among narrows the tries).
Sourcepub fn with_floor(self, floor: Option<u32>) -> Self
pub fn with_floor(self, floor: Option<u32>) -> Self
The check with its floor floor, if it is a rate; any other check
as it was.
Sourcepub fn with_among(self, among: Vec<Condition>) -> Self
pub fn with_among(self, among: Vec<Condition>) -> Self
The check over the tries that meet among, if it is a median; any
other check as it was.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Check
impl<'de> Deserialize<'de> for Check
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 Check
Source§impl JsonSchema for Check
impl JsonSchema for Check
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 Check
Auto Trait Implementations§
impl Freeze for Check
impl RefUnwindSafe for Check
impl Send for Check
impl Sync for Check
impl Unpin for Check
impl UnsafeUnpin for Check
impl UnwindSafe for Check
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