TransitionTable

Trait TransitionTable 

Source
pub trait TransitionTable {
    type KeyType: Clone;
    type IterType<'a>: Iterator<Item = (Self::KeyType, &'a GeneralSamNodeID)>
       where Self: 'a,
             Self::KeyType: 'a;

    // Required methods
    fn from_kv_iter<'b, Iter: IntoIterator<Item = (Self::KeyType, &'b GeneralSamNodeID)>>(
        iter: Iter,
    ) -> Self
       where Self::KeyType: 'b;
    fn get(&self, key: &Self::KeyType) -> Option<&GeneralSamNodeID>;
    fn get_mut(&mut self, key: &Self::KeyType) -> Option<&mut GeneralSamNodeID>;
    fn iter(&self) -> Self::IterType<'_>;

    // Provided methods
    fn contains_key(&self, key: &Self::KeyType) -> bool { ... }
    fn transitions(
        &self,
    ) -> TransitionIter<'_, Self::KeyType, Self::IterType<'_>>  { ... }
}

Required Associated Types§

Source

type KeyType: Clone

Source

type IterType<'a>: Iterator<Item = (Self::KeyType, &'a GeneralSamNodeID)> where Self: 'a, Self::KeyType: 'a

Required Methods§

Source

fn from_kv_iter<'b, Iter: IntoIterator<Item = (Self::KeyType, &'b GeneralSamNodeID)>>( iter: Iter, ) -> Self
where Self::KeyType: 'b,

Source

fn get(&self, key: &Self::KeyType) -> Option<&GeneralSamNodeID>

Source

fn get_mut(&mut self, key: &Self::KeyType) -> Option<&mut GeneralSamNodeID>

Source

fn iter(&self) -> Self::IterType<'_>

Provided Methods§

Source

fn contains_key(&self, key: &Self::KeyType) -> bool

Source

fn transitions(&self) -> TransitionIter<'_, Self::KeyType, Self::IterType<'_>>

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§

Source§

impl<K: Clone + Ord, C: AsRef<[(K, GeneralSamNodeID)]> + AsMut<[(K, GeneralSamNodeID)]> + FromIterator<(K, GeneralSamNodeID)>> TransitionTable for BisectTable<K, C>

Source§

type KeyType = K

Source§

type IterType<'a> = BisectTableIter<'a, K> where Self: 'a, Self::KeyType: 'a

Source§

impl<K: SmallAlphabet, C: AsRef<[Option<GeneralSamNodeID>]> + AsMut<[Option<GeneralSamNodeID>]> + FromIterator<Option<GeneralSamNodeID>> + Clone> TransitionTable for WholeAlphabetTable<K, C>

Source§

type KeyType = K

Source§

type IterType<'a> = WholeAlphabetTableIter<'a, K> where Self: 'a, Self::KeyType: 'a

Source§

impl<KeyType: Clone + Ord> TransitionTable for BTreeTransTable<KeyType>

Source§

type KeyType = KeyType

Source§

type IterType<'a> = WithKeyDerefedIter<'a, KeyType, Iter<'a, KeyType, usize>> where Self: 'a, Self::KeyType: 'a

Source§

impl<KeyType: Hash + Eq + Clone> TransitionTable for HashTransTable<KeyType>

Source§

type KeyType = KeyType

Source§

type IterType<'a> = WithKeyDerefedIter<'a, KeyType, Iter<'a, KeyType, usize>> where Self: 'a, Self::KeyType: 'a