pub struct Pair<LatA, LatB> {
pub a: LatA,
pub b: LatB,
}
Expand description
Pair compound lattice.
LatA
and LatB
specify the nested lattice types.
When merging, both sub-lattices are always merged.
Fields§
§a: LatA
The “left” Lattice of the Pair lattice.
b: LatB
The “right” Lattice of the Pair lattice.
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,
source§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<LatA, LatB, __LatAOther, __LatBOther> LatticeFrom<Pair<__LatAOther, __LatBOther>> for Pair<LatA, LatB>where
LatA: LatticeFrom<__LatAOther>,
LatB: LatticeFrom<__LatBOther>,
impl<LatA, LatB, __LatAOther, __LatBOther> LatticeFrom<Pair<__LatAOther, __LatBOther>> for Pair<LatA, LatB>where
LatA: LatticeFrom<__LatAOther>,
LatB: 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<LatA, LatB, __LatAOther, __LatBOther> Merge<Pair<__LatAOther, __LatBOther>> for Pair<LatA, LatB>
impl<LatA, LatB, __LatAOther, __LatBOther> Merge<Pair<__LatAOther, __LatBOther>> for Pair<LatA, LatB>
source§impl<LatA, LatB, __LatAOther, __LatBOther> PartialEq<Pair<__LatAOther, __LatBOther>> for Pair<LatA, LatB>
impl<LatA, LatB, __LatAOther, __LatBOther> PartialEq<Pair<__LatAOther, __LatBOther>> for Pair<LatA, LatB>
source§impl<LatA, LatB, __LatAOther, __LatBOther> PartialOrd<Pair<__LatAOther, __LatBOther>> for Pair<LatA, LatB>where
LatA: PartialOrd<__LatAOther>,
LatB: PartialOrd<__LatBOther>,
impl<LatA, LatB, __LatAOther, __LatBOther> PartialOrd<Pair<__LatAOther, __LatBOther>> for Pair<LatA, LatB>where
LatA: PartialOrd<__LatAOther>,
LatB: PartialOrd<__LatBOther>,
impl<LatA: Copy, LatB: Copy> Copy for Pair<LatA, LatB>
impl<LatA: Eq, LatB: Eq> Eq for Pair<LatA, LatB>
impl<LatA, LatB, __LatAOther, __LatBOther> LatticeOrd<Pair<__LatAOther, __LatBOther>> for Pair<LatA, LatB>where
LatA: PartialOrd<__LatAOther>,
LatB: PartialOrd<__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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. 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