Trait despero::ecs::traits::View

source ·
pub trait View<'a> {
    type Superset;

    // Required method
    fn split(orig: Self::Superset) -> Self;
}
Expand description

Traits for types which represent a view or subset of some other type.

Required Associated Types§

source

type Superset

The type which View comes from

Required Methods§

source

fn split(orig: Self::Superset) -> Self

Splits from the containing superset

Implementations on Foreign Types§

source§

impl<'a, T> View<'a> for &'a T

§

type Superset = &'a T

source§

fn split(orig: <&'a T as View<'a>>::Superset) -> &'a T

source§

impl<'a, T> View<'a> for &'a mut T

Implementors§

source§

impl<'a, A, T> View<'a> for SubWorldRaw<A, T>where A: Deref<Target = World>, T: ComponentBorrow,

§

type Superset = A