Struct legion::storage::EntityLayout [−][src]
pub struct EntityLayout { /* fields omitted */ }
Expand description
Describes the component types which are attached to an entity.
Implementations
Adds a new component to the layout.
pub unsafe fn register_component_raw(
&mut self,
type_id: ComponentTypeId,
f: fn() -> Box<dyn UnknownComponentStorage>
)
pub unsafe fn register_component_raw(
&mut self,
type_id: ComponentTypeId,
f: fn() -> Box<dyn UnknownComponentStorage>
)
Adds a new component to the layout.
Safety
The storage returned from the storage constructor function must be capable
of storing the component type identified by type_id
.
Returns a slice of component type IDs for the components inside the layout.
Returns true
if the layout contains the given component type.
Returns true
if the layout contains the given component type.
Trait Implementations
Returns the “default value” for a type. Read more
Calculates the filter’s result for the given entity layout.
Auto Trait Implementations
impl RefUnwindSafe for EntityLayout
impl Send for EntityLayout
impl Sync for EntityLayout
impl Unpin for EntityLayout
impl UnwindSafe for EntityLayout
Blanket Implementations
Mutably borrows from an owned value. Read more
Convert Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
. Read more
Convert Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
. Read more
Convert &Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s. Read more
Convert &mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s. Read more