pub struct Relation<T: Component> { /* private fields */ }Implementations§
Source§impl<T: Component> Relation<T>
impl<T: Component> Relation<T>
pub fn install_to_registry(registry: &mut Registry)
pub fn register_to_processor(processor: &mut WorldProcessor)
pub fn register_to_processor_debug(processor: &mut WorldProcessor)where
T: Debug,
pub fn new(payload: T, entity: Entity) -> Self
pub fn with(self, payload: T, entity: Entity) -> Self
pub fn type_hash(&self) -> TypeHash
pub fn is_empty(&self) -> bool
pub fn add(&mut self, payload: T, entity: Entity)
pub fn remove(&mut self, entity: Entity)
pub fn has(&self, entity: Entity) -> bool
pub fn payload(&self, entity: Entity) -> Option<&T>
pub fn payload_mut(&mut self, entity: Entity) -> Option<&mut T>
pub fn entities(&self) -> impl Iterator<Item = Entity> + '_
pub fn iter(&self) -> impl Iterator<Item = (&T, Entity)>
pub fn iter_mut(&mut self) -> impl Iterator<Item = (&mut T, Entity)>
Trait Implementations§
Source§impl<T: Ord + Component> Ord for Relation<T>
impl<T: Ord + Component> Ord for Relation<T>
1.21.0 · 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<T: PartialOrd + Component> PartialOrd for Relation<T>
impl<T: PartialOrd + Component> PartialOrd for Relation<T>
impl<T: Eq + Component> Eq for Relation<T>
impl<T: Component> StructuralPartialEq for Relation<T>
Auto Trait Implementations§
impl<T> Freeze for Relation<T>where
T: Freeze,
impl<T> RefUnwindSafe for Relation<T>where
T: RefUnwindSafe,
impl<T> Send for Relation<T>
impl<T> Sync for Relation<T>
impl<T> Unpin for Relation<T>where
T: Unpin,
impl<T> UnwindSafe for Relation<T>where
T: 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.