#[non_exhaustive]pub enum Summary {
#[non_exhaustive] Sum {
measure: String,
label: Option<String>,
},
#[non_exhaustive] Spread {
measure: String,
up_to: u32,
label: Option<String>,
},
#[non_exhaustive] Most {
prefix: String,
skip_suffix: Option<String>,
label: Option<String>,
},
#[non_exhaustive] Median {
measure: String,
label: Option<String>,
},
#[non_exhaustive] Max {
measure: String,
label: Option<String>,
},
}Expand description
One number of an entrant’s tries, as playtest prints it after the
entrant’s name. A try missing the measure counts it as 0. label
defaults to the measure’s name ("most" for Most).
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
#[non_exhaustive]Sum
“won 83/100”: the sum of measure over the tries, of how many.
Fields
This variant is marked as non-exhaustive
#[non_exhaustive]Spread
“deaths per try 0: 30 1: 21 2: 25 3+: 24”: tries by value, the last bucket open.
Fields
This variant is marked as non-exhaustive
#[non_exhaustive]Most
“most: scout 41×”: among keys "<prefix><key>" set to 1 or more
(keys with a further skip_suffix left out), the key set in the
most tries, then the first by name; “nobody” if none.
Fields
This variant is marked as non-exhaustive
#[non_exhaustive]Median
“items median 1”: the lower middle value, 0 for no tries.
Fields
This variant is marked as non-exhaustive
#[non_exhaustive]Max
“items max 3”: the greatest value, 0 for no tries.
Fields
This variant is marked as non-exhaustive
Implementations§
Source§impl Summary
impl Summary
Sourcepub fn spread(measure: impl Into<String>, up_to: u32) -> Self
pub fn spread(measure: impl Into<String>, up_to: u32) -> Self
A Spread of measure, its last bucket
up_to and more.
Sourcepub fn most(prefix: impl Into<String>) -> Self
pub fn most(prefix: impl Into<String>) -> Self
A Most of the keys starting with prefix, none
left out (with_skip_suffix leaves some
out).
Sourcepub fn with_label(self, label: Option<String>) -> Self
pub fn with_label(self, label: Option<String>) -> Self
The item printed with label instead of its default.
Sourcepub fn with_skip_suffix(self, skip_suffix: Option<String>) -> Self
pub fn with_skip_suffix(self, skip_suffix: Option<String>) -> Self
The item leaving out keys ending with skip_suffix, if it is a
Most; any other item as it was.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Summary
impl<'de> Deserialize<'de> for Summary
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>,
impl Eq for Summary
impl StructuralPartialEq for Summary
Auto Trait Implementations§
impl Freeze for Summary
impl RefUnwindSafe for Summary
impl Send for Summary
impl Sync for Summary
impl Unpin for Summary
impl UnsafeUnpin for Summary
impl UnwindSafe for Summary
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.