StateIdConversion

Trait StateIdConversion 

Source
pub trait StateIdConversion {
    // Required methods
    fn to_state_id(&self, interner: &StringInterner) -> StateId;
    fn from_state_id(id: StateId, interner: &StringInterner) -> Option<String>;
}
Expand description

Helper trait for converting between strings and StateIds

Required Methods§

Source

fn to_state_id(&self, interner: &StringInterner) -> StateId

Convert a string slice to a StateId using the interner

Source

fn from_state_id(id: StateId, interner: &StringInterner) -> Option<String>

Convert a StateId back to a string using the interner

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.

Implementations on Foreign Types§

Source§

impl StateIdConversion for str

Source§

impl StateIdConversion for String

Implementors§