pub struct Pair<LatA, LatB> { /* private fields */ }
Expand description
Pair compound lattice.
LatA
and LatB
specify the nested lattice types.
When merging, both sub-lattices are always merged.
Implementations§
source§impl<LatA, LatB> Pair<LatA, LatB>
impl<LatA, LatB> Pair<LatA, LatB>
sourcepub fn new_from(a: impl Into<LatA>, b: impl Into<LatB>) -> Self
pub fn new_from(a: impl Into<LatA>, b: impl Into<LatB>) -> Self
Create a Pair
from the given values, using Into
.
sourcepub fn as_reveal_ref(&self) -> (&LatA, &LatB)
pub fn as_reveal_ref(&self) -> (&LatA, &LatB)
Reveal the inner value as a shared reference.
sourcepub fn as_reveal_mut(&mut self) -> (&mut LatA, &mut LatB)
pub fn as_reveal_mut(&mut self) -> (&mut LatA, &mut LatB)
Reveal the inner value as an exclusive reference.
sourcepub fn into_reveal(self) -> (LatA, LatB)
pub fn into_reveal(self) -> (LatA, LatB)
Gets the inner by value, consuming self.
Trait Implementations§
source§impl<LatA, LatB> DeepReveal for Pair<LatA, LatB>where
LatA: DeepReveal,
LatB: DeepReveal,
impl<LatA, LatB> DeepReveal for Pair<LatA, LatB>where
LatA: DeepReveal,
LatB: DeepReveal,
§type Revealed = (<LatA as DeepReveal>::Revealed, <LatB as DeepReveal>::Revealed)
type Revealed = (<LatA as DeepReveal>::Revealed, <LatB as DeepReveal>::Revealed)
The underlying type when revealed.
source§fn deep_reveal(self) -> Self::Revealed
fn deep_reveal(self) -> Self::Revealed
Reveals the underlying lattice types recursively.
source§impl<'de, LatA, LatB> Deserialize<'de> for Pair<LatA, LatB>where
LatA: Deserialize<'de>,
LatB: Deserialize<'de>,
impl<'de, LatA, LatB> Deserialize<'de> for Pair<LatA, LatB>where
LatA: Deserialize<'de>,
LatB: Deserialize<'de>,
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
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<LatASelf, LatAOther, LatBSelf, LatBOther> LatticeFrom<Pair<LatAOther, LatBOther>> for Pair<LatASelf, LatBSelf>where
LatASelf: LatticeFrom<LatAOther>,
LatBSelf: LatticeFrom<LatBOther>,
impl<LatASelf, LatAOther, LatBSelf, LatBOther> LatticeFrom<Pair<LatAOther, LatBOther>> for Pair<LatASelf, LatBSelf>where
LatASelf: LatticeFrom<LatAOther>,
LatBSelf: LatticeFrom<LatBOther>,
source§fn lattice_from(other: Pair<LatAOther, LatBOther>) -> Self
fn lattice_from(other: Pair<LatAOther, LatBOther>) -> Self
Convert from the
Other
lattice into Self
.source§impl<LatASelf, LatAOther, LatBSelf, LatBOther> Merge<Pair<LatAOther, LatBOther>> for Pair<LatASelf, LatBSelf>
impl<LatASelf, LatAOther, LatBSelf, LatBOther> Merge<Pair<LatAOther, LatBOther>> for Pair<LatASelf, LatBSelf>
source§impl<LatASelf, LatAOther, LatBSelf, LatBOther> PartialEq<Pair<LatAOther, LatBOther>> for Pair<LatASelf, LatBSelf>
impl<LatASelf, LatAOther, LatBSelf, LatBOther> PartialEq<Pair<LatAOther, LatBOther>> for Pair<LatASelf, LatBSelf>
source§impl<LatASelf, LatAOther, LatBSelf, LatBOther> PartialOrd<Pair<LatAOther, LatBOther>> for Pair<LatASelf, LatBSelf>where
LatASelf: PartialOrd<LatAOther>,
LatBSelf: PartialOrd<LatBOther>,
impl<LatASelf, LatAOther, LatBSelf, LatBOther> PartialOrd<Pair<LatAOther, LatBOther>> for Pair<LatASelf, LatBSelf>where
LatASelf: PartialOrd<LatAOther>,
LatBSelf: PartialOrd<LatBOther>,
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
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 moreimpl<LatA: Copy, LatB: Copy> Copy for Pair<LatA, LatB>
impl<LatA: Eq, LatB: Eq> Eq for Pair<LatA, LatB>
impl<LatASelf, LatAOther, LatBSelf, LatBOther> LatticeOrd<Pair<LatAOther, LatBOther>> for Pair<LatASelf, LatBSelf>where
Self: PartialOrd<Pair<LatAOther, LatBOther>>,
Auto Trait Implementations§
impl<LatA, LatB> Freeze for Pair<LatA, LatB>
impl<LatA, LatB> RefUnwindSafe for Pair<LatA, LatB>where
LatA: RefUnwindSafe,
LatB: RefUnwindSafe,
impl<LatA, LatB> Send for Pair<LatA, LatB>
impl<LatA, LatB> Sync for Pair<LatA, LatB>
impl<LatA, LatB> Unpin for Pair<LatA, LatB>
impl<LatA, LatB> UnwindSafe for Pair<LatA, LatB>where
LatA: UnwindSafe,
LatB: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<This, Other> NaiveLatticeOrd<Other> for This
impl<This, Other> NaiveLatticeOrd<Other> for This
source§fn naive_cmp(&self, other: &Rhs) -> Option<Ordering>
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