pub enum CastEntry {
Absent(CastAbsence),
Placement(CastPlacement),
Branches(Vec<CastPlacement>),
}Expand description
One NPC’s entry in a quest’s cast ledger.
Three authored shapes, tried in order (untagged): the bare keyword "dead" /
"offstage", a single flat CastPlacement, or a list of placements —
per-branch casts, each gated by the flags that select its branch (spec-0020
proof 4: where the effect history is branch-dependent, a single flat
declaration cannot hold on every reachable branch, and DW0462 says so).
Variants§
Absent(CastAbsence)
The bare keyword form: "npc/antiphos": "dead". Shorthand for a
placement whose at is that keyword and which carries no doing or
dialogue — a character who is not in the world has no business and
answers no right-click.
Placement(CastPlacement)
A single placement that must hold on every reachable branch.
Branches(Vec<CastPlacement>)
Per-branch placements (spec-0020 proof 4). Each carries the
requires_flags/forbids_flags that select its branch.
Implementations§
Source§impl CastEntry
impl CastEntry
Sourcepub fn placements(&self) -> Vec<&CastPlacement>
pub fn placements(&self) -> Vec<&CastPlacement>
Every placement this entry declares, in declared order. The bare-keyword form yields none — there is no scene to check.
Sourcepub fn placements_mut(&mut self) -> Vec<&mut CastPlacement>
pub fn placements_mut(&mut self) -> Vec<&mut CastPlacement>
Every placement this entry declares, mutably (the l10n traversal).
Sourcepub fn absence(&self) -> Option<CastAbsence>
pub fn absence(&self) -> Option<CastAbsence>
The bare-keyword absence this entry declares, if it is that form.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for CastEntry
impl<'de> Deserialize<'de> for CastEntry
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 CastEntry
impl JsonSchema for CastEntry
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