pub struct ContractWay {
pub opens: String,
pub region: String,
pub boxes: Vec<Region>,
pub role: Option<String>,
pub block: String,
}Expand description
A contingent edge’s way: the region that decides whether the edge is crossable, and which direction opening it moves in.
The dual of ContractBar, and the reason bar is not extended in place:
an existing piece’s metadata says bar and keeps saying bar. The
checker normalises the two into one prover; the document keeps both
spellings, so nothing already written moves a byte.
Fields§
§opens: Stringlaid — the region is empty as built and opening fills it with
block; or cleared — the region stands in
block as built and opening voids it.
region: StringThe region’s name, which is what content addresses.
boxes: Vec<Region>The cells it covers.
role: Option<String>The palette role the way is made of, in the author’s own vocabulary.
Provenance for a reader, and never a second authority: what an opening
writes is block, because a role name means
nothing outside the program that bound it. Recorded because a reviewer
reading this document otherwise has no way back to the declaration —
minecraft:oak_planks says what the cells become and "tread" says
what the author called it.
Optional for the reason License::generated_by is: a role is a
program’s vocabulary, so an expansion always has one and a hand-built
or ingested piece — which names its blocks directly — has none at all.
Writing an invented role there would be a fact about nothing.
ContractBar carries no such field, and deliberately: adding one
would move the exported bytes of every piece that already declares a
bar, which spec-0042 §2.3 forbids. The checker reads neither.
block: StringThe block state the way is made of: what a laid way is filled with,
and what a cleared way stands in.
Trait Implementations§
Source§impl Clone for ContractWay
impl Clone for ContractWay
Source§fn clone(&self) -> ContractWay
fn clone(&self) -> ContractWay
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ContractWay
impl Debug for ContractWay
Source§impl<'de> Deserialize<'de> for ContractWay
impl<'de> Deserialize<'de> for ContractWay
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for ContractWay
impl JsonSchema for ContractWay
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read more