Trait Atomize

Source
pub trait Atomize: Merge<Self::Atom> {
    type Atom: 'static + IsBot;
    type AtomIter: 'static + Iterator<Item = Self::Atom>;

    // Required method
    fn atomize(self) -> Self::AtomIter;
}
Expand description

Trait to atomize a lattice into individual elements. For example, a set_union::SetUnion will be broken up into individual singleton elements.

Formally, breaks up Self into an set of lattice points forming a (strong) antichain. “Strong” in the sense that any pair of lattice points in the antichain should have a greatest lower bound (GLB or “meet”) of bottom.

Required Associated Types§

Source

type Atom: 'static + IsBot

The type of atoms for this lattice.

Source

type AtomIter: 'static + Iterator<Item = Self::Atom>

The iter type iterating the antichain atoms.

Required Methods§

Source

fn atomize(self) -> Self::AtomIter

Atomize self: convert into an iter of atoms.

The returned iterator should be empty if and only if self.is_bot() is true. All atoms in the returned iterator should have self.is_bot() be false.

Returned values must merge to reform a value equal to the original self.

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 Atomize for ()

Implementors§

Source§

impl<Inner> Atomize for WithBot<Inner>
where Inner: 'static + Atomize + LatticeFrom<<Inner as Atomize>::Atom>,

Source§

type Atom = WithBot<<Inner as Atomize>::Atom>

Source§

type AtomIter = Box<dyn Iterator<Item = <WithBot<Inner> as Atomize>::Atom>>

Source§

impl<Inner> Atomize for WithTop<Inner>
where Inner: Atomize + LatticeFrom<<Inner as Atomize>::Atom>,

Source§

type Atom = WithTop<<Inner as Atomize>::Atom>

Source§

type AtomIter = Box<dyn Iterator<Item = <WithTop<Inner> as Atomize>::Atom>>

Source§

impl<Map, K> Atomize for UnionFind<Map>
where Map: 'static + MapMut<K, Cell<K>, Key = K, Item = Cell<K>> + IntoIterator<Item = (K, Cell<K>)>, K: 'static + Copy + Eq,

Source§

impl<Map, K, Val> Atomize for MapUnion<Map>
where Map: 'static + IntoIterator<Item = (K, Val)> + Keyed<Key = K, Item = Val> + Extend<(K, Val)> + for<'a> GetMut<&'a K, Item = Val>, K: 'static + Clone, Val: 'static + Atomize + LatticeFrom<<Val as Atomize>::Atom>,

Source§

type Atom = MapUnion<SingletonMap<K, <Val as Atomize>::Atom>>

Source§

type AtomIter = Box<dyn Iterator<Item = <MapUnion<Map> as Atomize>::Atom>>

Source§

impl<Set, Item> Atomize for SetUnion<Set>
where Set: Len + IntoIterator<Item = Item> + Extend<Item>, Set::IntoIter: 'static, Item: 'static,

Source§

type Atom = SetUnion<SingletonSet<Item>>

Source§

type AtomIter = Box<dyn Iterator<Item = <SetUnion<Set> as Atomize>::Atom>>