pub struct DialogueNode {
pub id: DialogueId,
pub text: String,
pub options: Vec<DialogueOption>,
}Expand description
One dialogue node: text plus branching options.
Fields§
§id: DialogueIdNode id (unique within this NPC’s dialogue).
text: StringThe line the NPC speaks.
options: Vec<DialogueOption>Branching options; empty closes the dialog.
Trait Implementations§
Source§impl Clone for DialogueNode
impl Clone for DialogueNode
Source§impl Debug for DialogueNode
impl Debug for DialogueNode
Source§impl<'de> Deserialize<'de> for DialogueNode
impl<'de> Deserialize<'de> for DialogueNode
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 DialogueNode
impl JsonSchema for DialogueNode
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 DialogueNode
impl PartialEq for DialogueNode
Source§impl Serialize for DialogueNode
impl Serialize for DialogueNode
impl StructuralPartialEq for DialogueNode
Auto Trait Implementations§
impl Freeze for DialogueNode
impl RefUnwindSafe for DialogueNode
impl Send for DialogueNode
impl Sync for DialogueNode
impl Unpin for DialogueNode
impl UnsafeUnpin for DialogueNode
impl UnwindSafe for DialogueNode
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