pub struct EitherKey<X, Y>(/* private fields */)
where
X: LcKey,
Y: LcKey;Expand description
A disjoint union X ⊔ Y of two key sets, used to form direct sums of
linear combinations, e.g. the basis for Lc<X, R> ⊕ Lc<Y, R> ≅ Lc<EitherKey<X, Y>, R>.
Implementations§
Source§impl<X, Y> EitherKey<X, Y>
impl<X, Y> EitherKey<X, Y>
pub fn from_left(x: X) -> Self
pub fn from_right(y: Y) -> Self
pub fn entity(&self) -> Either<&X, &Y> ⓘ
pub fn is_left(&self) -> bool
pub fn is_right(&self) -> bool
pub fn inner(&self) -> &Either<X, Y> ⓘ
pub fn into_left(self) -> X
pub fn into_right(self) -> Y
Trait Implementations§
impl<X, Y> Copy for EitherKey<X, Y>
impl<X, Y> Eq for EitherKey<X, Y>
impl<X, Y> LcKey for EitherKey<X, Y>
Source§impl<X, Y> Ord for EitherKey<X, Y>
impl<X, Y> Ord for EitherKey<X, Y>
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<X, Y> PartialOrd for EitherKey<X, Y>
impl<X, Y> PartialOrd for EitherKey<X, Y>
impl<X, Y> StructuralPartialEq for EitherKey<X, Y>
Auto Trait Implementations§
impl<X, Y> Freeze for EitherKey<X, Y>
impl<X, Y> RefUnwindSafe for EitherKey<X, Y>where
X: RefUnwindSafe,
Y: RefUnwindSafe,
impl<X, Y> Send for EitherKey<X, Y>
impl<X, Y> Sync for EitherKey<X, Y>
impl<X, Y> Unpin for EitherKey<X, Y>
impl<X, Y> UnsafeUnpin for EitherKey<X, Y>where
X: UnsafeUnpin,
Y: UnsafeUnpin,
impl<X, Y> UnwindSafe for EitherKey<X, Y>where
X: UnwindSafe,
Y: 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> Comparable<K> for Q
impl<Q, K> Comparable<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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
impl<T> IndexType for T
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 more