Skip to main content

Targets

Struct Targets 

Source
pub struct Targets<T: Ord> {
    pub success: BTreeMap<String, Vec<Condition>>,
    pub bands: BTreeMap<T, BTreeMap<String, Band>>,
    pub floors: BTreeMap<String, u32>,
    pub medians: Vec<MedianTarget>,
}
Expand description

What each entrant should achieve, over the game’s own tier type T (whatever its stages are labelled with). Targets::checks gives a stage’s checks from it.

Fields§

§success: BTreeMap<String, Vec<Condition>>

What makes a try a success, per entrant.

§bands: BTreeMap<T, BTreeMap<String, Band>>

The share of successes wanted, per tier and entrant.

§floors: BTreeMap<String, u32>

The share under which a run is blocked, in percent, per entrant that has one.

§medians: Vec<MedianTarget>

Medians compared between two entrants, on a stage of any tier.

Implementations§

Source§

impl<T: Ord> Targets<T>

Source

pub fn checks(&self, tier: &T, entrants: &[&str]) -> Vec<Check>

The checks of a stage of tier that entrants play: a Check::Rate per entrant, in the order given, that has both a success rule and a band for tier, then each median, in file order, whose two entrants both play. Every check names only entrants of entrants.

Source

pub fn unknown_entrants(&self, known: &[&str]) -> Vec<String>

The names the targets use that aren’t in known, sorted, each once: a misspelt entrant would otherwise just get no check.

Trait Implementations§

Source§

impl<T: Clone + Ord> Clone for Targets<T>

Source§

fn clone(&self) -> Targets<T>

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<T: Debug + Ord> Debug for Targets<T>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de, T> Deserialize<'de> for Targets<T>
where T: Ord + Deserialize<'de>,

Source§

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<T: Eq + Ord> Eq for Targets<T>

Source§

impl<T> JsonSchema for Targets<T>
where T: JsonSchema + Ord,

Source§

fn schema_name() -> Cow<'static, str>

The name of the generated JSON Schema. Read more
Source§

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

Generates a JSON Schema for this type. Read more
Source§

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 more
Source§

impl<T: PartialEq + Ord> PartialEq for Targets<T>

Source§

fn eq(&self, other: &Targets<T>) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl<T> Serialize for Targets<T>
where T: Ord + Serialize,

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl<T: PartialEq + Ord> StructuralPartialEq for Targets<T>

Auto Trait Implementations§

§

impl<T> Freeze for Targets<T>

§

impl<T> RefUnwindSafe for Targets<T>
where T: RefUnwindSafe,

§

impl<T> Send for Targets<T>
where T: Send,

§

impl<T> Sync for Targets<T>
where T: Sync,

§

impl<T> Unpin for Targets<T>

§

impl<T> UnsafeUnpin for Targets<T>

§

impl<T> UnwindSafe for Targets<T>
where T: RefUnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.