pub struct EntityCollectionExtractor<S, E> { /* private fields */ }Expand description
A concrete entity extractor for a specific solution and entity type.
§Type Parameters
S- The solution typeE- The entity type
Implementations§
Source§impl<S, E> EntityCollectionExtractor<S, E>where
S: 'static,
E: 'static,
impl<S, E> EntityCollectionExtractor<S, E>where
S: 'static,
E: 'static,
Trait Implementations§
Source§impl<S, E> Debug for EntityCollectionExtractor<S, E>
impl<S, E> Debug for EntityCollectionExtractor<S, E>
Source§impl<S, E> EntityExtractor for EntityCollectionExtractor<S, E>
impl<S, E> EntityExtractor for EntityCollectionExtractor<S, E>
Source§fn count(&self, solution: &dyn Any) -> Option<usize>
fn count(&self, solution: &dyn Any) -> Option<usize>
Number of entities in
solution; None when solution is not the expected type.Source§fn get<'a>(&self, solution: &'a dyn Any, index: usize) -> Option<&'a dyn Any>
fn get<'a>(&self, solution: &'a dyn Any, index: usize) -> Option<&'a dyn Any>
Borrows entity
index; None on a solution type mismatch or when index is out of range.Source§fn get_mut<'a>(
&self,
solution: &'a mut dyn Any,
index: usize,
) -> Option<&'a mut dyn Any>
fn get_mut<'a>( &self, solution: &'a mut dyn Any, index: usize, ) -> Option<&'a mut dyn Any>
Mutably borrows entity
index; None on a solution type mismatch or
when index is out of range.Source§fn entity_refs(&self, solution: &dyn Any) -> Vec<EntityRef>
fn entity_refs(&self, solution: &dyn Any) -> Vec<EntityRef>
Returns an iterator over entity references.
Source§fn clone_box(&self) -> Box<dyn EntityExtractor>
fn clone_box(&self) -> Box<dyn EntityExtractor>
Clone this extractor.
Source§fn clone_entity_boxed(
&self,
solution: &dyn Any,
index: usize,
) -> Option<Box<dyn Any + Send + Sync>>
fn clone_entity_boxed( &self, solution: &dyn Any, index: usize, ) -> Option<Box<dyn Any + Send + Sync>>
Clones an entity as a boxed value for insertion into the constraint session. Read more
Source§fn entity_type_id(&self) -> TypeId
fn entity_type_id(&self) -> TypeId
TypeId of the extracted entity type.Auto Trait Implementations§
impl<S, E> Freeze for EntityCollectionExtractor<S, E>
impl<S, E> RefUnwindSafe for EntityCollectionExtractor<S, E>
impl<S, E> Send for EntityCollectionExtractor<S, E>
impl<S, E> Sync for EntityCollectionExtractor<S, E>
impl<S, E> Unpin for EntityCollectionExtractor<S, E>
impl<S, E> UnsafeUnpin for EntityCollectionExtractor<S, E>
impl<S, E> UnwindSafe for EntityCollectionExtractor<S, E>
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