pub struct GeneratedBy {
pub generator: String,
pub program: String,
pub program_hash: String,
pub seed: u64,
pub region: [i32; 3],
pub params: BTreeMap<String, i64>,
pub roles: BTreeMap<String, String>,
}Expand description
Everything needed to reproduce the .nbt byte for byte (ADR-0006).
Every input that reaches the bytes, and nothing that does not. A record missing one of them is worse than no record: it names a set of inputs, and a re-expansion from that set produces a different artifact while the document claims byte reproducibility. The set is the source program, the overrides applied to it, the region and the seed.
Fields§
§generator: StringThe back end that produced the bytes.
program: StringThe source program’s name.
program_hash: Stringsha256:<64 hex> over the canonical JSON of the program as expanded
— the source document with Self::params and Self::roles already
applied. It is therefore the checksum of the reproduction rather than a
second statement of it: apply the overrides to the named document and
this is the hash you must get.
seed: u64The expansion seed.
region: [i32; 3]The region the program was expanded over, [x, y, z]. An independent
input: the same program at the same seed over a different box is a
different building.
params: BTreeMap<String, i64>Integer parameters overridden on the way in (delvec grammar expand --param), by name. Empty — and absent from the document — where the
program was expanded as written.
roles: BTreeMap<String, String>Palette roles rebound on the way in (--role), by name, each the block
state as the caller wrote it. The axis frame is not recorded because it
is not an input: a rebind inherits the frame of the binding it replaces,
which the named source document already carries.
Trait Implementations§
Source§impl Clone for GeneratedBy
impl Clone for GeneratedBy
Source§impl Debug for GeneratedBy
impl Debug for GeneratedBy
Source§impl<'de> Deserialize<'de> for GeneratedBy
impl<'de> Deserialize<'de> for GeneratedBy
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 GeneratedBy
impl JsonSchema for GeneratedBy
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