[][src]Struct worldgen::world::tile::Tile

pub struct Tile<T> { /* fields omitted */ }

Objects to generate in the world based on given constraints

Implementations

impl<T: Clone> Tile<T>[src]

pub fn new(value: T) -> Tile<T>[src]

Construct a new tile represented by the given object.

pub fn when(self, constraint: Constraint) -> Tile<T>[src]

Adds a constraint to the tile.

pub fn value(&self) -> T[src]

Returns the value this tile is represented by.

pub fn satisfied_by(
    &self,
    x: i64,
    y: i64,
    size: Size,
    chunk_x: i64,
    chunk_y: i64,
    nms: &mut HashMap<u64, Vec<Vec<f64>>>
) -> bool
[src]

Returns true if the given value would satisfy all of this tile's constraints.

Auto Trait Implementations

impl<T> !RefUnwindSafe for Tile<T>

impl<T> !Send for Tile<T>

impl<T> !Sync for Tile<T>

impl<T> Unpin for Tile<T> where
    T: Unpin

impl<T> !UnwindSafe for Tile<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> 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.