pub struct Reference {
pub name: String,
pub shows: String,
pub time: WorldTime,
pub weather: WorldWeather,
}Expand description
One approved reference image, and the sky it was drawn under.
Fields§
§name: StringThe image’s path stem relative to design/, under concept/ (one
scene) or reference/ (a view of the whole map) — e.g.
concept/shore-far. The extension is deliberately absent: the name
resolves against the directory, and a stem two files answer to is a
candidate rather than a match, which DW0890 refuses.
shows: StringOne sentence saying what the picture shows. Agent-facing: it is the creator’s own note to the next reader of the record, is never put on a player’s screen, and is not l10n-inventoried.
time: WorldTimeThe time of day the picture was drawn under — the creator’s reading of the approved image, and the only creative judgement on this surface.
weather: WorldWeatherThe weather the picture was drawn under.
Implementations§
Source§impl Reference
impl Reference
Sourcepub fn is_valid_name(&self) -> bool
pub fn is_valid_name(&self) -> bool
True if Reference::name is concept/<kebab> or reference/<kebab>.
The same shape every id in this DSL takes, for the same reason: a name that resolves to a path needs one spelling, or the record and the directory can disagree about which file a row is about while both look right.
Sourcepub fn name_form() -> String
pub fn name_form() -> String
The form a Reference::name has to take, for the refusal that rejected
one.
Sourcepub fn directory(&self) -> Option<&'static str>
pub fn directory(&self) -> Option<&'static str>
Which of REFERENCE_DIRS this row’s name is under, when it is
well-formed.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Reference
impl<'de> Deserialize<'de> for Reference
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 Reference
impl JsonSchema for Reference
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