pub fn flush(&mut self, world: &mut W) {
        if self.world_id != world.id() {
            panic!("command buffers may only write into their parent world");
        }

        while let Some(command) = self.commands.pop_back() {
            match command {
                Command::WriteWorld(ptr) => ptr.write(world, self),
                Command::ExecMutWorld(closure) => closure(world),
            }
        }

        self.pending_insertion.clear();
    }
/// Flushes this command buffer, draining all stored commands and writing them to the world.
///
/// Command flushes are performed in a FIFO manner, allowing for reliable, linear commands being
/// executed in the order they were provided.
Flushes this command buffer, draining all stored commands and writing them to the world.
Command flushes are performed in a FIFO manner, allowing for reliable, linear commands being
executed in the order they were provided.
Flushes this command buffer draining all stored commands and writing them to the world . Command flushes are performed in a FIFO manner allowing for reliable linear commands being executed in the order they were provided .
pub fn flush(&mut self, world: &mut W) {
        if self.world_id != world.id() {
            panic!("command buffers may only write into their parent world");
        }
        while let Some(command) = self.commands.pop_back() {
            match command {
                Command::WriteWorld(ptr) => ptr.write(world, self),
                Command::ExecMutWorld(closure) => closure(world),
            }
        }
        self.pending_insertion.clear();
    }
pub fn flush ( & mut self , world : & mut W ) { if self . world_id != world . id ( ) { panic ! ( " " ) ; } while let Some ( command ) = self . commands . pop_back ( ) { match command { Command :: WriteWorld ( ptr ) => ptr . write ( world , self ) , Command :: ExecMutWorld ( closure ) => closure ( world ) , } } self . pending_insertion . clear ( ) ; }
Flushes this command buffer, draining all stored commands and writing them to the world.
Flushes this command buffer draining all stored commands and writing them to the world .
&mut self
world
&mut W
&mut self
world
&mut W