pub trait StrictSum: StrictType {
const ALL_VARIANTS: &'static [(u8, &'static str)];
// Required method
fn variant_name(&self) -> &'static str;
// Provided methods
fn strict_check_variants() { ... }
fn variant_name_by_tag(tag: u8) -> Option<VariantName> { ... }
fn variant_ord(&self) -> u8 { ... }
}
Required Associated Constants§
const ALL_VARIANTS: &'static [(u8, &'static str)]
Required Methods§
fn variant_name(&self) -> &'static str
Provided Methods§
fn strict_check_variants()
fn variant_name_by_tag(tag: u8) -> Option<VariantName>
fn variant_ord(&self) -> u8
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.