Skip to main content

Extent

Enum Extent 

Source
pub enum Extent {
    Region,
    OnePiece,
    Unstated,
}
Expand description

What declares how big this campaign’s map is — asked once, by both tiers that need the answer.

A horizon that BUILDS terrain has to ring a stated extent, and whether one is stated is a fact about the documents: validation refuses DW0855 on it before a block is placed, and the compiler derives the rectangle from the same answer. Two implementations of one predicate is two verdicts waiting to disagree — the tiers already disagreed once about which arm of DW0855’s own message applied — so the predicate lives here and the rectangle is derived from the authority this names.

Variants§

§

Region

The site plan’s region: the whole map’s design of record, the brief’s number flowing down. A box outside it is DW0826, so nothing a part does can grow it.

§

OnePiece

The one piece’s own declared region: the campaign is one area bound to one prefab, so its whole map is that piece and the piece’s declared structure size is the map’s extent. This is what a site is — a building with its island, its moat and its banks inside one box — and the declaration is the prefab document’s, held to the .nbt by DW0888.

§

Unstated

Nothing states one. Two or more areas, or one area drawing from a pool, or no area at all: the only candidate left is the union of what happens to get placed, which DW0855 refuses because areas sit on the compiler’s fixed stride and a pool’s footprint is the solver’s answer.

Implementations§

Source§

impl Extent

Source

pub fn of(c: &Campaign) -> Self

Ask the campaign, once.

The site plan wins where both could apply, for Placement::of’s reason: a campaign carrying both is DW0839, and this describes the authority the rest of the compiler actually uses.

Source

pub fn is_stated(self) -> bool

Whether the campaign states an extent at all — the predicate DW0855 refuses on.

Trait Implementations§

Source§

impl Clone for Extent

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for Extent

Source§

impl Debug for Extent

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for Extent

Source§

impl PartialEq for Extent

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Extent

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.