[][src]Struct legion::storage::UnknownComponentWriter

pub struct UnknownComponentWriter<'a> { /* fields omitted */ }

Provides the ability to append new components to the entities in an archetype.

Implementations

impl<'a> UnknownComponentWriter<'a>[src]

pub unsafe fn extend_memcopy_raw(&mut self, ptr: *const u8, len: usize)[src]

Writes the given components into the component storage.

Safety

ptr must point to a valid array of the correct component type of length at least as long as len. The data in this array will be memcopied into the world's internal storage. If the component type is not Copy, then the caller must ensure that the memory copied is not accessed until it is re-initialized. It is recommended to immediately std::mem::forget the source after calling extend_memcopy.

pub fn ensure_capacity(&mut self, space: usize)[src]

Ensures that the given spare capacity is available in the target storage location. Calling this function before calling extend_memcopy is not required, but may avoid additional vector resizes.

pub fn move_archetype_from(
    &mut self,
    src_archetype: ArchetypeIndex,
    src: &mut dyn UnknownComponentStorage
)
[src]

Moves all of the components from the given storage location into this writer's storage.

pub fn move_component_from(
    &mut self,
    src_archetype: ArchetypeIndex,
    src_component: ComponentIndex,
    src: &mut dyn UnknownComponentStorage
)
[src]

Moves a single component from the given storage location into this writer's storage.

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> Downcast for T where
    T: Any
[src]

impl<T> DowncastSync for T where
    T: Send + Sync + Any
[src]

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

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

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>,