StringCode

Trait StringCode 

Source
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§

Source

fn code(&self) -> &str

Returns the canonical string code for this value.

Provided Methods§

Source

fn is_canonical(&self) -> bool

Whether this value is a canonical enum variant (not an Other payload).

Implementors§