Trait WorldWritable

Source
pub trait WorldWritable {
    // Required methods
    fn write(self: Arc<Self>, world: &mut World, cmd: &CommandBuffer);
    fn write_components(&self) -> Vec<ComponentTypeId>;
    fn write_tags(&self) -> Vec<TagTypeId>;
}
Expand description

This trait can be used to implement custom world writer types that can be directly inserted into the command buffer, for more custom and complex world operations. This is analogous to the CommandBuffer::exec_mut function type, but does not perform explicit any/any archetype access.

Required Methods§

Source

fn write(self: Arc<Self>, world: &mut World, cmd: &CommandBuffer)

Destructs the writer and performs the write operations on the world.

Source

fn write_components(&self) -> Vec<ComponentTypeId>

Returns the list of ComponentTypeId which are written by this command buffer. This is leveraged to allow parralel command buffer flushing.

Source

fn write_tags(&self) -> Vec<TagTypeId>

Returns the list of TagTypeId which are written by this command buffer. This is leveraged to allow parralel command buffer flushing.

Implementors§