pub trait DynAtomSet: Debug {
// Required methods
fn str_to_bits(&self, keyword: &str) -> u32;
fn bits_to_str(&self, bits: u32) -> &'static str;
fn bits(&self) -> u32;
}Expand description
Object-safe version of AtomSet for use with trait objects. This trait mirrors the functionality of AtomSet but is
compatible with dyn trait objects.
Required Methods§
Sourcefn str_to_bits(&self, keyword: &str) -> u32
fn str_to_bits(&self, keyword: &str) -> u32
Converts a string keyword to the corresponding atom variant, returning its bit representation.
Sourcefn bits_to_str(&self, bits: u32) -> &'static str
fn bits_to_str(&self, bits: u32) -> &'static str
Converts this atom’s bit representation back to its string representation.
Implementors§
impl<T: AtomSet + Clone + 'static> DynAtomSet for T
Blanket implementation so any AtomSet can be used as a DynAtomSet