Struct tsukurou::world::World[][src]

pub struct World { /* fields omitted */ }

An ordered collection of blocks that are arranged in 3D space, dynamically loaded as "chunks".

Methods

impl World
[src]

Creates a World with an empty set of loaded chunks.

Creates a World from an existing set of loaded chunks.

References the chunk at the given location, or returns None if not loaded.

Mutably references the chunk at the given location, or returns None if not loaded.

Returns a borrowing iterator over the loaded chunks.

Returns a mutably borrowing iterator over the loaded chunks.

References the block at the given location, or returns None if the block's parent chunk is not loaded.

Mutably references the block at the given location, or returns None if the block's parent chunk is not loaded.

Important traits for Blocks<'a>

Returns a borrowing iterator over the loaded blocks.

Important traits for BlocksMut<'a>

Returns a mutably borrowing iterator over the loaded blocks.

Loads this chunk into the set of known loaded chunks.

Errors

Will return Err if a chunk is already loaded at that location, returning the passed Chunk to the caller.

Unloads the given chunk, removing it from the set and returning it, or returns None if there is no loaded chunk at that location.

Begins unloading all chunks from the set, returning an iterator over them to allow them to be processed.

Trait Implementations

impl Default for World
[src]

Returns the "default value" for a type. Read more

Auto Trait Implementations

impl Send for World

impl Sync for World