Trait pliantdb_core::schema::view::map::EnumKey[][src]

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

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

Loading content...