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: LatAThe “left” Lattice of the Pair lattice.
b: LatBThe “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>) -> Pair<LatA, LatB>
pub fn new_from(a: impl Into<LatA>, b: impl Into<LatB>) -> Pair<LatA, LatB>
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) -> <Pair<LatA, LatB> as DeepReveal>::Revealed
fn deep_reveal(self) -> <Pair<LatA, LatB> as DeepReveal>::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<Pair<LatA, LatB>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Pair<LatA, LatB>, <__D as Deserializer<'de>>::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>) -> Pair<LatA, LatB>
fn lattice_from(other: Pair<__LatAOther, __LatBOther>) -> Pair<LatA, LatB>
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>,
Source§impl<LatA, LatB> Serialize for Pair<LatA, LatB>
impl<LatA, LatB> Serialize for Pair<LatA, LatB>
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl<LatA, LatB> Copy for Pair<LatA, LatB>
impl<LatA, LatB> 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§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§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