Trait DynAtomSet

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

Source

fn str_to_bits(&self, keyword: &str) -> u32

Converts a string keyword to the corresponding atom variant, returning its bit representation.

Source

fn bits_to_str(&self, bits: u32) -> &'static str

Converts this atom’s bit representation back to its string representation.

Source

fn bits(&self) -> u32

Get the current bits of this Atom.

Implementors§

Source§

impl<T: AtomSet + Clone + 'static> DynAtomSet for T

Blanket implementation so any AtomSet can be used as a DynAtomSet