Trait bonsaidb::core::key::EnumKey[][src]

pub trait EnumKey: ToPrimitive + FromPrimitive + Clone + Debug + Send + Sync { }
Expand description

Adds Key support to an enum. Requires implementing ToPrimitive and FromPrimitive, or using a crate like num-derive to do it automatically. Take care when using enums as keys: if the order changes or if the meaning of existing numerical values changes, make sure to update any related views’ version number to ensure the values are re-evaluated.

Implementors