pub struct BlockArea {
    blocks: HashMap<(i64, i64), Box<Block>>,
    origin_map: HashMap<(i64, i64), (i64, i64)>,
    size: (usize, usize),
    auto_shrink: bool,
    header: String,
}

Fields

blocks: HashMap<(i64, i64), Box<Block>>origin_map: HashMap<(i64, i64), (i64, i64)>size: (usize, usize)auto_shrink: boolheader: String

Implementations

Collects the sinks in this area. It returns a list of Block positions inside the area. For unconnected outputs, which are also evaluated and returned as possible last value of an BlockArea, the output row is also given.

The result is sorted so, that the bottom right most element is the first one in the result list.

Calculates only the size of the area in the +x/+y quadrant. The negative areas are not counted in.

Serializes this BlockArea to a JSON Value. Usually called by BlockFunSnapshot::serialize.

Deserializes a from a JSON Value. Usually called by BlockFunSnapshot::deserialize.

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.