Struct chunked::CommandBuffer [−][src]
pub struct CommandBuffer { /* fields omitted */ }
A command buffer for entity changes.
This is used as an allocated list of Snapshot
modifications.
The primary benefit is that this can be kept around between snapshot
modifications and applied later. With CommandBuffer
s multiple systems can
determine changes in parallel and apply them at the end.
Implementations
impl CommandBuffer
[src]
impl CommandBuffer
[src]pub fn new() -> CommandBuffer
[src]
pub fn new() -> CommandBuffer
[src]Create a new, empty, command buffer.
pub fn merge(buffers: &[&CommandBuffer]) -> CommandBuffer
[src]
pub fn merge(buffers: &[&CommandBuffer]) -> CommandBuffer
[src]Merge multiple command buffers.
If multiple command buffers reference the same component, the rightmost wins.
pub fn iter_edits(&self) -> CommandBufferIterator<'_>
[src]
pub fn iter_edits(&self) -> CommandBufferIterator<'_>
[src]Iterate over the edit list for this command buffer.
This is usually used with Snapshot::modify
.
pub fn set_component<T: Component>(
&mut self,
entity_id: EntityID,
component: &T
)
[src]
pub fn set_component<T: Component>(
&mut self,
entity_id: EntityID,
component: &T
)
[src]Set a single component on an entity.
pub fn remove_component<T: Component>(&mut self, entity_id: EntityID)
[src]
pub fn remove_component<T: Component>(&mut self, entity_id: EntityID)
[src]Remove a single component from an entity.
Trait Implementations
impl Clone for CommandBuffer
[src]
impl Clone for CommandBuffer
[src]fn clone(&self) -> CommandBuffer
[src]
fn clone(&self) -> CommandBuffer
[src]Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]Performs copy-assignment from source
. Read more
Auto Trait Implementations
impl RefUnwindSafe for CommandBuffer
impl Send for CommandBuffer
impl Sync for CommandBuffer
impl Unpin for CommandBuffer
impl UnwindSafe for CommandBuffer
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> Pointable for T
impl<T> Pointable for T
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more