pub trait StringCode {
// Required method
fn code(&self) -> &str;
// Provided method
fn is_canonical(&self) -> bool { ... }
}Expand description
Trait for enums that have a canonical string code.
Implemented via macros across the paft workspace.
Required Methods§
Provided Methods§
Sourcefn is_canonical(&self) -> bool
fn is_canonical(&self) -> bool
Whether this value is a canonical enum variant (not an Other payload).
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".