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§
Sourcetype IntoIterUp: Iterator<Item = Self::Item>
type IntoIterUp: Iterator<Item = Self::Item>
Type of iterator for iterating lattice from bottom to top
Sourcetype IntoIterDown: Iterator<Item = Self::Item>
type IntoIterDown: Iterator<Item = Self::Item>
Type of iterator for iterating lattice from top to bottom
Required Methods§
Sourceunsafe fn unsafe_bottom_to_top(&self) -> Result<Self::IntoIterUp, String>
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
Sourceunsafe fn unsafe_top_to_bottom(&self) -> Result<Self::IntoIterDown, String>
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§
Sourcefn bottom_to_top(&self) -> Result<IntoIter<SafeElement<Self::Item>>, String>
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
Sourcefn top_to_bottom(&self) -> Result<IntoIter<SafeElement<Self::Item>>, String>
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.