pub struct RuleSet(/* private fields */);Expand description
Packed storage for all active RuleSet.
There are two equivalent ways RuleSet may be stored:
-
When stored textually, rules should be in one string, separated by spaces. This is how rules are specified in meet.csv files, for example.
-
When serialized by the compiler for the server, rules may be stored as a simple number, representing a bitfield of Rules. This is to save space, since the RuleSet field will be attached to each meet, and the Rule strings themselves are long.
It’s expected that the human-consumable openpowerlifting.csv will not include the RuleSet of each meet, and therefore it’s safe to serialize to a number.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for RuleSet
impl<'de> Deserialize<'de> for RuleSet
Source§fn deserialize<D: Deserializer<'de>>(
deserializer: D,
) -> Result<RuleSet, D::Error>
fn deserialize<D: Deserializer<'de>>( deserializer: D, ) -> Result<RuleSet, D::Error>
Deserialize this value from the given Serde deserializer. Read more
impl Copy for RuleSet
impl StructuralPartialEq for RuleSet
Auto Trait Implementations§
impl Freeze for RuleSet
impl RefUnwindSafe for RuleSet
impl Send for RuleSet
impl Sync for RuleSet
impl Unpin for RuleSet
impl UnwindSafe for RuleSet
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