Enum bbecs::components::Components[][src]

pub enum Components {
    Point(Vec<Point>),
    F32(Vec<f32>),
    Color(Vec<Color>),
    Mesh(Vec<Mesh>),
    U32(Vec<u32>),
    Usize(Vec<usize>),
    Bool(Vec<bool>),
    GgezKeyCode(Vec<KeyCode>),
}

These components are used to store data into the world. Each of the components contains a vector of the appropriate data. Generally consumers of this library will not need to call Components directly. However the methods attached to components will be used to extract the data.

Variants

Point(Vec<Point>)
F32(Vec<f32>)
Color(Vec<Color>)
Mesh(Vec<Mesh>)
U32(Vec<u32>)
Usize(Vec<usize>)
Bool(Vec<bool>)
GgezKeyCode(Vec<KeyCode>)

Trait Implementations

impl CastComponents<Color> for Components[src]

impl CastComponents<Mesh> for Components[src]

impl CastComponents<Point> for Components[src]

fn cast_mut(&mut self) -> Result<&mut Vec<Point>>[src]

Cast the components to it’s contained data as long as it is really a point.

use bbecs::components::{Components, CastComponents};
use bbecs::data_types::point::Point;
let mut wrapped_locations = Components::Point(vec![]);
let locations: &mut Vec<Point> = wrapped_locations.cast_mut().unwrap();

impl CastComponents<VirtualKeyCode> for Components[src]

impl CastComponents<bool> for Components[src]

impl CastComponents<f32> for Components[src]

impl CastComponents<u32> for Components[src]

impl CastComponents<usize> for Components[src]

impl Clone for Components[src]

impl Debug for Components[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> SetParameter for T

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,