Enum flatbox_ecs::Or
source · pub enum Or<L, R> {
Left(L),
Right(R),
Both(L, R),
}
Expand description
Holds an L
, or an R
, or both
Variants§
Implementations§
source§impl<L, R> Or<L, R>
impl<L, R> Or<L, R>
sourcepub fn new(l: Option<L>, r: Option<R>) -> Option<Or<L, R>>
pub fn new(l: Option<L>, r: Option<R>) -> Option<Or<L, R>>
Construct an Or<L, R>
if at least one argument is Some
sourcepub fn split(self) -> (Option<L>, Option<R>)
pub fn split(self) -> (Option<L>, Option<R>)
Destructure into two Option
s, where either or both are Some
Trait Implementations§
source§impl<L, R> Ord for Or<L, R>
impl<L, R> Ord for Or<L, R>
source§impl<L, R> PartialEq for Or<L, R>
impl<L, R> PartialEq for Or<L, R>
source§impl<L, R> PartialOrd for Or<L, R>where
L: PartialOrd,
R: PartialOrd,
impl<L, R> PartialOrd for Or<L, R>where
L: PartialOrd,
R: PartialOrd,
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<L, R> Copy for Or<L, R>
impl<L, R> Eq for Or<L, R>
impl<L, R> StructuralPartialEq for Or<L, R>
Auto Trait Implementations§
impl<L, R> Freeze for Or<L, R>
impl<L, R> RefUnwindSafe for Or<L, R>where
L: RefUnwindSafe,
R: RefUnwindSafe,
impl<L, R> Send for Or<L, R>
impl<L, R> Sync for Or<L, R>
impl<L, R> Unpin for Or<L, R>
impl<L, R> UnwindSafe for Or<L, R>where
L: UnwindSafe,
R: 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<'a, Q> ComponentBorrow for Qwhere
Q: Query,
impl<'a, Q> ComponentBorrow for Qwhere
Q: Query,
source§impl<T> Downcast for T
impl<T> Downcast for T
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<'a, Q> Subset for Qwhere
Q: Query,
impl<'a, Q> Subset for Qwhere
Q: Query,
source§fn is_subset<U>() -> boolwhere
U: ComponentBorrow,
fn is_subset<U>() -> boolwhere
U: ComponentBorrow,
Returns true if U is a subset of Self
source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read moresource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.