pub enum Xor<L, R> {
Left(L),
Right(R),
}
Expand description
A Query
which matches if the L
or R
queries match, but not both.
Variants§
Implementations§
Trait Implementations§
Source§impl<L, R> Ord for Xor<L, R>
impl<L, R> Ord for Xor<L, R>
Source§impl<L, R> PartialOrd for Xor<L, R>where
L: PartialOrd,
R: PartialOrd,
impl<L, R> PartialOrd for Xor<L, R>where
L: PartialOrd,
R: PartialOrd,
Source§impl<L, R> Query for Xor<L, R>
impl<L, R> Query for Xor<L, R>
Source§type Item<'a> = Xor<<L as Query>::Item<'a>, <R as Query>::Item<'a>>
type Item<'a> = Xor<<L as Query>::Item<'a>, <R as Query>::Item<'a>>
The item returned by this query. This is usually the same type as
Self
, but with a modified lifetime.Source§type ArchState = Xor<<L as Query>::ArchState, <R as Query>::ArchState>
type ArchState = Xor<<L as Query>::ArchState, <R as Query>::ArchState>
Per-archetype state, e.g. pointers to archetype columns.
Source§type State = (<L as Query>::State, <R as Query>::State)
type State = (<L as Query>::State, <R as Query>::State)
Cached data for fetch initialization, e.g. component indices.
Source§fn init(
world: &mut World,
config: &mut HandlerConfig,
) -> Result<(ComponentAccess, <Xor<L, R> as Query>::State), InitError>
fn init( world: &mut World, config: &mut HandlerConfig, ) -> Result<(ComponentAccess, <Xor<L, R> as Query>::State), InitError>
Initialize the query. Returns an expression describing the components
accessed by the query and a new instance of
Self::State
.Source§fn new_state(world: &mut World) -> <Xor<L, R> as Query>::State
fn new_state(world: &mut World) -> <Xor<L, R> as Query>::State
Returns a new
Self::State
instance.impl<L, R> Copy for Xor<L, R>
impl<L, R> Eq for Xor<L, R>
impl<L, R> ReadOnlyQuery for Xor<L, R>where
L: ReadOnlyQuery,
R: ReadOnlyQuery,
impl<L, R> StructuralPartialEq for Xor<L, R>
Auto Trait Implementations§
impl<L, R> Freeze for Xor<L, R>
impl<L, R> RefUnwindSafe for Xor<L, R>where
L: RefUnwindSafe,
R: RefUnwindSafe,
impl<L, R> Send for Xor<L, R>
impl<L, R> Sync for Xor<L, R>
impl<L, R> Unpin for Xor<L, R>
impl<L, R> UnwindSafe for Xor<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<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.