IterableLattice

Trait IterableLattice 

Source
pub trait IterableLattice: Lattice {
    type IntoIterUp: Iterator<Item = Self::Item>;
    type IntoIterDown: Iterator<Item = Self::Item>;

    // Required methods
    unsafe fn unsafe_bottom_to_top(&self) -> Result<Self::IntoIterUp, String>;
    unsafe fn unsafe_top_to_bottom(&self) -> Result<Self::IntoIterDown, String>;

    // Provided methods
    fn bottom_to_top(&self) -> Result<IntoIter<SafeElement<Self::Item>>, String> { ... }
    fn top_to_bottom(&self) -> Result<IntoIter<SafeElement<Self::Item>>, String> { ... }
}
Expand description

General trait for iterable lattices, ie. lattice with some useful iterators

Required Associated Types§

Source

type IntoIterUp: Iterator<Item = Self::Item>

Type of iterator for iterating lattice from bottom to top

Source

type IntoIterDown: Iterator<Item = Self::Item>

Type of iterator for iterating lattice from top to bottom

Required Methods§

Source

unsafe fn unsafe_bottom_to_top(&self) -> Result<Self::IntoIterUp, String>

Unsafe iterator of the full lattice, non decreasing with inference;

  • error means that the iterator cannot be iterated (e.g. lattice with too much elements)
  • Output: iterator or error
Source

unsafe fn unsafe_top_to_bottom(&self) -> Result<Self::IntoIterDown, String>

Unsafe iterator of the full lattice, non increasing with inference;

  • error means that the iterator cannot be iterated (e.g. lattice with too much elements)
  • Output: iterator or error

Provided Methods§

Source

fn bottom_to_top(&self) -> Result<IntoIter<SafeElement<Self::Item>>, String>

Safe iterator of the full lattice, non decreasing with inference;

  • error means that the iterator cannot be iterated (e.g. lattice with too much elements)
  • Output: iterator or error
Source

fn top_to_bottom(&self) -> Result<IntoIter<SafeElement<Self::Item>>, String>

Safe iterator of the full lattice, non increasing with inference;

  • error means that the iterator cannot be iterated (e.g. lattice with too much elements)
  • Output: iterator or error

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§