pub struct DialogueContent {
pub dialogues: Vec<NpcDialogue>,
}Expand description
Stage 6 payload: one dialogue tree per stage-2 NPC (spec-0001 v0.2).
Fields§
§dialogues: Vec<NpcDialogue>One tree per NPC (1:1 with stage 2, both directions).
Implementations§
Source§impl DialogueContent
impl DialogueContent
Sourcepub fn tree_for(&self, npc: &str) -> Option<&NpcDialogue>
pub fn tree_for(&self, npc: &str) -> Option<&NpcDialogue>
The dialogue tree for an NPC id, if present.
Trait Implementations§
Source§impl Clone for DialogueContent
impl Clone for DialogueContent
Source§impl Debug for DialogueContent
impl Debug for DialogueContent
Source§impl<'de> Deserialize<'de> for DialogueContent
impl<'de> Deserialize<'de> for DialogueContent
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl JsonSchema for DialogueContent
impl JsonSchema for DialogueContent
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for DialogueContent
impl PartialEq for DialogueContent
Source§impl Serialize for DialogueContent
impl Serialize for DialogueContent
impl StructuralPartialEq for DialogueContent
Auto Trait Implementations§
impl Freeze for DialogueContent
impl RefUnwindSafe for DialogueContent
impl Send for DialogueContent
impl Sync for DialogueContent
impl Unpin for DialogueContent
impl UnsafeUnpin for DialogueContent
impl UnwindSafe for DialogueContent
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more