pub struct Not<T>(_);
Expand description
Used to filter out components.
Get and iterators will skip entities that have this component.
Simply add !
in front of the view reference at iterator creation.
Example
use shipyard::{Component, IntoIter, View, World};
#[derive(Component, Debug, PartialEq, Eq)]
struct U32(u32);
#[derive(Component, Debug, PartialEq, Eq)]
struct USIZE(usize);
let mut world = World::new();
world.add_entity((USIZE(0), U32(1)));
world.add_entity((USIZE(2),));
let (usizes, u32s) = world.borrow::<(View<USIZE>, View<U32>)>().unwrap();
let mut iter = (&usizes, !&u32s).iter();
assert_eq!(iter.next(), Some((&USIZE(2), ())));
assert_eq!(iter.next(), None);
let mut iter = (&usizes, &u32s).iter();
assert_eq!(iter.next(), Some((&USIZE(0), &U32(1))));
assert_eq!(iter.next(), None);
Trait Implementations
sourceimpl<'w, T: Component> AbstractMut for Not<FullRawWindow<'w, T, T::Tracking>>
impl<'w, T: Component> AbstractMut for Not<FullRawWindow<'w, T, T::Tracking>>
sourceimpl<'w, T: Component> AbstractMut for Not<FullRawWindowMut<'w, T, T::Tracking>>
impl<'w, T: Component> AbstractMut for Not<FullRawWindowMut<'w, T, T::Tracking>>
sourceimpl<'tmp, T: Component<Tracking = All>> AbstractMut for Not<Inserted<FullRawWindow<'tmp, T, All>>>
impl<'tmp, T: Component<Tracking = All>> AbstractMut for Not<Inserted<FullRawWindow<'tmp, T, All>>>
sourceimpl<'tmp, T: Component<Tracking = Insertion>> AbstractMut for Not<Inserted<FullRawWindow<'tmp, T, Insertion>>>
impl<'tmp, T: Component<Tracking = Insertion>> AbstractMut for Not<Inserted<FullRawWindow<'tmp, T, Insertion>>>
sourceimpl<'tmp, T: Component<Tracking = All>> AbstractMut for Not<Inserted<FullRawWindowMut<'tmp, T, All>>>
impl<'tmp, T: Component<Tracking = All>> AbstractMut for Not<Inserted<FullRawWindowMut<'tmp, T, All>>>
sourceimpl<'tmp, T: Component<Tracking = Insertion>> AbstractMut for Not<Inserted<FullRawWindowMut<'tmp, T, Insertion>>>
impl<'tmp, T: Component<Tracking = Insertion>> AbstractMut for Not<Inserted<FullRawWindowMut<'tmp, T, Insertion>>>
sourceimpl<'tmp, T: Component<Tracking = All>> AbstractMut for Not<InsertedOrModified<FullRawWindow<'tmp, T, All>>>
impl<'tmp, T: Component<Tracking = All>> AbstractMut for Not<InsertedOrModified<FullRawWindow<'tmp, T, All>>>
sourceimpl<'tmp, T: Component<Tracking = Insertion>> AbstractMut for Not<InsertedOrModified<FullRawWindow<'tmp, T, Insertion>>>
impl<'tmp, T: Component<Tracking = Insertion>> AbstractMut for Not<InsertedOrModified<FullRawWindow<'tmp, T, Insertion>>>
sourceimpl<'tmp, T: Component<Tracking = Modification>> AbstractMut for Not<InsertedOrModified<FullRawWindow<'tmp, T, Modification>>>
impl<'tmp, T: Component<Tracking = Modification>> AbstractMut for Not<InsertedOrModified<FullRawWindow<'tmp, T, Modification>>>
sourceimpl<'tmp, T: Component<Tracking = All>> AbstractMut for Not<InsertedOrModified<FullRawWindowMut<'tmp, T, All>>>
impl<'tmp, T: Component<Tracking = All>> AbstractMut for Not<InsertedOrModified<FullRawWindowMut<'tmp, T, All>>>
sourceimpl<'tmp, T: Component<Tracking = Insertion>> AbstractMut for Not<InsertedOrModified<FullRawWindowMut<'tmp, T, Insertion>>>
impl<'tmp, T: Component<Tracking = Insertion>> AbstractMut for Not<InsertedOrModified<FullRawWindowMut<'tmp, T, Insertion>>>
sourceimpl<'tmp, T: Component<Tracking = Modification>> AbstractMut for Not<InsertedOrModified<FullRawWindowMut<'tmp, T, Modification>>>
impl<'tmp, T: Component<Tracking = Modification>> AbstractMut for Not<InsertedOrModified<FullRawWindowMut<'tmp, T, Modification>>>
sourceimpl<'tmp, T: Component<Tracking = All>> AbstractMut for Not<Modified<FullRawWindow<'tmp, T, All>>>
impl<'tmp, T: Component<Tracking = All>> AbstractMut for Not<Modified<FullRawWindow<'tmp, T, All>>>
sourceimpl<'tmp, T: Component<Tracking = Modification>> AbstractMut for Not<Modified<FullRawWindow<'tmp, T, Modification>>>
impl<'tmp, T: Component<Tracking = Modification>> AbstractMut for Not<Modified<FullRawWindow<'tmp, T, Modification>>>
sourceimpl<'tmp, T: Component<Tracking = All>> AbstractMut for Not<Modified<FullRawWindowMut<'tmp, T, All>>>
impl<'tmp, T: Component<Tracking = All>> AbstractMut for Not<Modified<FullRawWindowMut<'tmp, T, All>>>
sourceimpl<'tmp, T: Component<Tracking = Modification>> AbstractMut for Not<Modified<FullRawWindowMut<'tmp, T, Modification>>>
impl<'tmp, T: Component<Tracking = Modification>> AbstractMut for Not<Modified<FullRawWindowMut<'tmp, T, Modification>>>
sourceimpl<T: IntoAbstract> IntoAbstract for Not<T> where
Not<T::AbsView>: AbstractMut,
impl<T: IntoAbstract> IntoAbstract for Not<T> where
Not<T::AbsView>: AbstractMut,
type AbsView = Not<<T as IntoAbstract>::AbsView>
impl<T: Copy> Copy for Not<T>
Auto Trait Implementations
impl<T> RefUnwindSafe for Not<T> where
T: RefUnwindSafe,
impl<T> Send for Not<T> where
T: Send,
impl<T> Sync for Not<T> where
T: Sync,
impl<T> Unpin for Not<T> where
T: Unpin,
impl<T> UnwindSafe for Not<T> where
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more