Module cock_lib::traits

source ·

Traits

  • FromString is a trait for objects that can be constructed from a string. The FromString::from_string function takes a string reference as input and returns an instance of the type implementing this trait based on the string.
  • GetVariants is a trait for objects that have a set of variants. The GetVariants::get_variants function returns a vector of strings, each representing a variant of the object.
  • Score is a trait for objects that can be scored. The score function returns a u32 representing the score of the object.