Skip to main content

BranchKey

Trait BranchKey 

Source
pub trait BranchKey:
    Send
    + Sync
    + 'static {
    // Required methods
    fn as_key(&self) -> &'static str;
    fn all_keys() -> &'static [&'static str];
}
Expand description

A routing key for conditional branching.

Implementors are fieldless enums whose variants map 1-to-1 to the named branches in a route node. The builder uses all_keys to verify exhaustiveness at build time.

Required Methods§

Source

fn as_key(&self) -> &'static str

The string key corresponding to this variant.

Source

fn all_keys() -> &'static [&'static str]

All possible keys for this type (one per variant).

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.

Implementors§