pub struct ScoreCard(/* private fields */);Expand description
Immutable tagged list of scores.
The final score of an individual can be composed of many labeled subscores (for manual evaluation later on). Pass the scoresas a list of tuples with a static string and a score. The final score is the total of all subscores.
Example:
let score = ScoreCard::new(vec![
("food", 10.0),
("thirst", -5.0)
]);Implementations§
Trait Implementations§
Source§impl<'a> AddAssign<&'a ScoreCard> for ScoreCard
impl<'a> AddAssign<&'a ScoreCard> for ScoreCard
Source§fn add_assign(&mut self, rhs: &'a ScoreCard)
fn add_assign(&mut self, rhs: &'a ScoreCard)
Performs the
+= operation. Read moreSource§impl Ord for ScoreCard
impl Ord for ScoreCard
Source§impl PartialOrd for ScoreCard
impl PartialOrd for ScoreCard
impl Eq for ScoreCard
Auto Trait Implementations§
impl Freeze for ScoreCard
impl RefUnwindSafe for ScoreCard
impl Send for ScoreCard
impl Sync for ScoreCard
impl Unpin for ScoreCard
impl UnwindSafe for ScoreCard
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)