Skip to main content

LabelId

Trait LabelId 

Source
pub trait LabelId:
    Copy
    + Eq
    + Hash
    + Debug
    + Send
    + Sync
    + 'static {
    // Required methods
    fn as_str(&self) -> &'static str;
    fn from_str(label: &str) -> Option<Self>;
}
Expand description

Labels identify branches in internal/external choice.

Labels must be stable identifiers that can be sent across the wire and re-hydrated on the receiving side.

Required Methods§

Source

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

Stable textual identifier for serialization/logging.

Source

fn from_str(label: &str) -> Option<Self>

Parse a label from its textual identifier.

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§