pub struct Lighting {
pub profile: LightingProfile,
pub measured_min_light: Option<i64>,
pub measured: Option<String>,
pub rationale: Option<String>,
pub method: Option<String>,
}Expand description
A prefab’s declared lighting metadata block (measured once at library
admission). Field names match prefabs/<name>.json.
measured_min_light / measured are Option in the type but not
optional in the data: a measured profile without them, or an unmeasured
profile with them, is refused at deserialisation (see the hand-written
Deserialize below). The optionality expresses which profile is being
declared, never a licence to omit a measurement that was claimed.
Fields§
§profile: LightingProfileThe declared profile.
measured_min_light: Option<i64>The measured minimum floor light level. Present iff the profile is a measurement.
measured: Option<String>The date the level was measured (YYYY-MM-DD). Present iff the profile
is a measurement.
rationale: Option<String>Why dim/dark was chosen (required for dim/dark by review).
method: Option<String>How the minimum was measured (provenance breadcrumb; optional).
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Lighting
impl<'de> Deserialize<'de> for Lighting
Source§fn deserialize<D: Deserializer<'de>>(de: D) -> Result<Lighting, D::Error>
fn deserialize<D: Deserializer<'de>>(de: D) -> Result<Lighting, D::Error>
Source§impl JsonSchema for Lighting
impl JsonSchema for Lighting
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