pub struct MapUnion<Map>(/* private fields */);
Expand description

Map-union compound lattice.

Each key corresponds to a lattice value instance. Merging map-union lattices is done by unioning the keys and merging the values of intersecting keys.

Implementations§

source§

impl<Map> MapUnion<Map>

source

pub fn new(val: Map) -> Self

Create a new MapUnion from a Map.

source

pub fn new_from(val: impl Into<Map>) -> Self

Create a new MapUnion from an Into<Map>.

source

pub fn as_reveal_ref(&self) -> &Map

Reveal the inner value as a shared reference.

source

pub fn as_reveal_mut(&mut self) -> &mut Map

Reveal the inner value as an exclusive reference.

source

pub fn into_reveal(self) -> Map

Gets the inner by value, consuming self.

Trait Implementations§

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>,

§

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

The type of atoms for this lattice.
§

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

The iter type iterating the antichain atoms.
source§

fn atomize(self) -> Self::AtomIter

Atomize self: convert into an iter of atoms. Read more
source§

impl<Map: Clone> Clone for MapUnion<Map>

source§

fn clone(&self) -> MapUnion<Map>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<Map: Debug> Debug for MapUnion<Map>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<Map, Val> DeepReveal for MapUnion<Map>
where Map: Keyed<Item = Val> + MapMapValues<Val>, Val: DeepReveal,

§

type Revealed = <Map as MapMapValues<Val>>::MapValue<<Val as DeepReveal>::Revealed>

The underlying type when revealed.
source§

fn deep_reveal(self) -> Self::Revealed

Reveals the underlying lattice types recursively.
source§

impl<Map: Default> Default for MapUnion<Map>

source§

fn default() -> MapUnion<Map>

Returns the “default value” for a type. Read more
source§

impl<'de, Map> Deserialize<'de> for MapUnion<Map>
where Map: Deserialize<'de>,

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl<Map> IsBot for MapUnion<Map>
where Map: Iter, Map::Item: IsBot,

source§

fn is_bot(&self) -> bool

Returns if self is lattice bottom (⊥). Read more
source§

impl<Map> IsTop for MapUnion<Map>

source§

fn is_top(&self) -> bool

Returns if self is lattice top (⊤). Read more
source§

impl<MapA, MapB, MapOut, ValFunc> LatticeBimorphism<MapUnion<MapA>, MapUnion<MapB>> for KeyedBimorphism<MapOut, ValFunc>
where ValFunc: LatticeBimorphism<MapA::Item, MapB::Item>, MapA: MapIter + SimpleKeyedRef + SimpleCollectionRef, MapB: for<'a> GetKeyValue<&'a MapA::Key, Key = MapA::Key> + SimpleCollectionRef, MapA::Key: Clone + Eq, MapA::Item: Clone, MapB::Item: Clone, MapOut: Default + MapInsert<MapA::Key> + Collection<Item = ValFunc::Output>,

§

type Output = MapUnion<MapOut>

The output lattice type.
source§

fn call(&mut self, lat_a: MapUnion<MapA>, lat_b: MapUnion<MapB>) -> Self::Output

Executes the function.
source§

impl<MapSelf, MapOther, K, ValSelf, ValOther> LatticeFrom<MapUnion<MapOther>> for MapUnion<MapSelf>
where MapSelf: Keyed<Key = K, Item = ValSelf> + FromIterator<(K, ValSelf)>, MapOther: IntoIterator<Item = (K, ValOther)>, ValSelf: LatticeFrom<ValOther>,

source§

fn lattice_from(other: MapUnion<MapOther>) -> Self

Convert from the Other lattice into Self.
source§

impl<MapSelf, MapOther, K, ValSelf, ValOther> Merge<MapUnion<MapOther>> for MapUnion<MapSelf>
where MapSelf: Keyed<Key = K, Item = ValSelf> + Extend<(K, ValSelf)> + for<'a> GetMut<&'a K, Item = ValSelf>, MapOther: IntoIterator<Item = (K, ValOther)>, ValSelf: Merge<ValOther> + LatticeFrom<ValOther>, ValOther: IsBot,

source§

fn merge(&mut self, other: MapUnion<MapOther>) -> bool

Merge other into the self lattice. Read more
source§

fn merge_owned(this: Self, delta: Other) -> Self
where Self: Sized,

Merge this and delta together, returning the new value.
source§

impl<MapSelf, MapOther, K, ValSelf, ValOther> PartialEq<MapUnion<MapOther>> for MapUnion<MapSelf>
where MapSelf: Map<K, ValSelf, Key = K, Item = ValSelf> + MapIter + SimpleKeyedRef, MapOther: Map<K, ValOther, Key = K, Item = ValOther> + MapIter + SimpleKeyedRef, ValSelf: PartialEq<ValOther> + IsBot, ValOther: IsBot,

source§

fn eq(&self, other: &MapUnion<MapOther>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<MapSelf, MapOther, K, ValSelf, ValOther> PartialOrd<MapUnion<MapOther>> for MapUnion<MapSelf>
where MapSelf: Map<K, ValSelf, Key = K, Item = ValSelf> + MapIter + SimpleKeyedRef, MapOther: Map<K, ValOther, Key = K, Item = ValOther> + MapIter + SimpleKeyedRef, ValSelf: PartialOrd<ValOther> + IsBot, ValOther: IsBot,

source§

fn partial_cmp(&self, other: &MapUnion<MapOther>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl<Map> Serialize for MapUnion<Map>
where Map: Serialize,

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl<Map: Copy> Copy for MapUnion<Map>

source§

impl<MapSelf> Eq for MapUnion<MapSelf>
where Self: PartialEq,

source§

impl<MapSelf, MapOther> LatticeOrd<MapUnion<MapOther>> for MapUnion<MapSelf>
where Self: PartialOrd<MapUnion<MapOther>>,

Auto Trait Implementations§

§

impl<Map> Freeze for MapUnion<Map>
where Map: Freeze,

§

impl<Map> RefUnwindSafe for MapUnion<Map>
where Map: RefUnwindSafe,

§

impl<Map> Send for MapUnion<Map>
where Map: Send,

§

impl<Map> Sync for MapUnion<Map>
where Map: Sync,

§

impl<Map> Unpin for MapUnion<Map>
where Map: Unpin,

§

impl<Map> UnwindSafe for MapUnion<Map>
where Map: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<This, Other> NaiveLatticeOrd<Other> for This
where This: Clone + Merge<Other>, Other: Clone + Merge<This>,

source§

fn naive_cmp(&self, other: &Rhs) -> Option<Ordering>

Naive compare based on the Merge::merge method. This method can be very inefficient; use PartialOrd::partial_cmp instead. Read more
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

source§

impl<T> Lattice for T