Struct lattices::VecUnion

source ·
pub struct VecUnion<Lat> { /* private fields */ }
Expand description

Vec-union compound lattice.

Contains any number of Lat sub-lattices. Sub-lattices are indexed starting at zero, merging combines corresponding sub-lattices and keeps any excess.

Similar to MapUnion<<usize, Lat>> but requires the key indices start with 0, 1, 2, etc: i.e. integers starting at zero with no gaps.

Implementations§

source§

impl<Lat> VecUnion<Lat>

source

pub fn new(vec: Vec<Lat>) -> Self

Create a new VecUnion from a Vec of Lat instances.

source

pub fn new_from(vec: impl Into<Vec<Lat>>) -> Self

Create a new VecUnion from an Into<Vec<Lat>>.

source

pub fn as_reveal_ref(&self) -> &Vec<Lat>

Reveal the inner value as a shared reference.

source

pub fn as_reveal_mut(&mut self) -> &mut Vec<Lat>

Reveal the inner value as an exclusive reference.

source

pub fn into_reveal(self) -> Vec<Lat>

Gets the inner by value, consuming self.

Trait Implementations§

source§

impl<Lat: Clone> Clone for VecUnion<Lat>

source§

fn clone(&self) -> VecUnion<Lat>

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<Lat: Debug> Debug for VecUnion<Lat>

source§

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

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

impl<Lat> DeepReveal for VecUnion<Lat>
where Lat: DeepReveal,

source§

type Revealed = Vec<<Lat as DeepReveal>::Revealed>

The underlying type when revealed.
source§

fn deep_reveal(self) -> Self::Revealed

Reveals the underlying lattice types recursively.
source§

impl<Lat> Default for VecUnion<Lat>

source§

fn default() -> Self

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

impl<'de, Lat> Deserialize<'de> for VecUnion<Lat>
where Lat: 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<Lat> IsBot for VecUnion<Lat>

source§

fn is_bot(&self) -> bool

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

impl<Lat> IsTop for VecUnion<Lat>

source§

fn is_top(&self) -> bool

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

impl<LatSelf, LatOther> LatticeFrom<VecUnion<LatOther>> for VecUnion<LatSelf>
where LatSelf: LatticeFrom<LatOther>,

source§

fn lattice_from(other: VecUnion<LatOther>) -> Self

Convert from the Other lattice into Self.
source§

impl<LatSelf, LatOther> Merge<VecUnion<LatOther>> for VecUnion<LatSelf>
where LatSelf: Merge<LatOther> + LatticeFrom<LatOther>,

source§

fn merge(&mut self, other: VecUnion<LatOther>) -> 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<LatSelf, LatOther> PartialEq<VecUnion<LatOther>> for VecUnion<LatSelf>
where LatSelf: PartialEq<LatOther>,

source§

fn eq(&self, other: &VecUnion<LatOther>) -> bool

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

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

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

impl<LatSelf, LatOther> PartialOrd<VecUnion<LatOther>> for VecUnion<LatSelf>
where LatSelf: PartialOrd<LatOther>,

source§

fn partial_cmp(&self, other: &VecUnion<LatOther>) -> 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

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

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

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

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

impl<Lat> Serialize for VecUnion<Lat>
where Lat: 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<Lat: Eq> Eq for VecUnion<Lat>

source§

impl<LatSelf, LatOther> LatticeOrd<VecUnion<LatOther>> for VecUnion<LatSelf>
where Self: PartialOrd<VecUnion<LatOther>>,

Auto Trait Implementations§

§

impl<Lat> Freeze for VecUnion<Lat>

§

impl<Lat> RefUnwindSafe for VecUnion<Lat>
where Lat: RefUnwindSafe,

§

impl<Lat> Send for VecUnion<Lat>
where Lat: Send,

§

impl<Lat> Sync for VecUnion<Lat>
where Lat: Sync,

§

impl<Lat> Unpin for VecUnion<Lat>
where Lat: Unpin,

§

impl<Lat> UnwindSafe for VecUnion<Lat>
where Lat: 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> CloneToUninit for T
where T: Clone,

source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. 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,

source§

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

source§

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

source§

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