Struct recs::ComponentFilter [] [src]

pub struct ComponentFilter {
    // some fields omitted
}

List of component types.

The Ecs methods has_all and collect_with each take a ComponentFilter instance. The recommended way to actually create a ComponentFilter is with the component_filter! macro.

Methods

impl ComponentFilter
[src]

fn new() -> Self

Create a new component filter.

fn add<C: Component>(&mut self)

Add component type C to the filter.

fn remove<C: Component>(&mut self)

Remove component type C from the filter.

fn contains<C: Component>(&mut self) -> bool

Return true if the filter already contains component type C; otherwise false.

fn from_slice(slice: &[TypeId]) -> Self

Create a component filter from a vector/slice of TypeId instances. (Not recommended; used by the component_filter! macro.)

fn iter<'a>(&'a self) -> Box<Iterator<Item=TypeId> + 'a>

Return an iterator over all the contained component types.

Trait Implementations

impl Clone for ComponentFilter
[src]

fn clone(&self) -> ComponentFilter

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)
1.0.0

Performs copy-assignment from source. Read more

impl Debug for ComponentFilter
[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.

impl Eq for ComponentFilter
[src]

impl PartialEq for ComponentFilter
[src]

fn eq(&self, __arg_0: &ComponentFilter) -> bool

This method tests for self and other values to be equal, and is used by ==. Read more

fn ne(&self, __arg_0: &ComponentFilter) -> bool

This method tests for !=.

impl Default for ComponentFilter
[src]

fn default() -> ComponentFilter

Returns the "default value" for a type. Read more