[][src]Struct legion::storage::ComponentWriter

pub struct ComponentWriter<'a, T: Component> { /* fields omitted */ }

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

Implementations

impl<'a, T: Component> ComponentWriter<'a, T>[src]

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

Writes the given components into the component storage.

Safety

ptr must point to a valid array of T 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.

Auto Trait Implementations

impl<'a, T> RefUnwindSafe for ComponentWriter<'a, T> where
    <T as Component>::Storage: RefUnwindSafe

impl<'a, T> Send for ComponentWriter<'a, T> where
    <T as Component>::Storage: Send

impl<'a, T> Sync for ComponentWriter<'a, T> where
    <T as Component>::Storage: Sync

impl<'a, T> Unpin for ComponentWriter<'a, T>

impl<'a, T> !UnwindSafe for ComponentWriter<'a, T>

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