#[non_exhaustive]pub enum DialogueError {
Parse {
file: String,
line: usize,
message: String,
},
UnknownNode(String),
DuplicateNode(String),
Validation(String),
Runtime(String),
Type(String),
UndefinedVariable(String),
Function {
name: String,
message: String,
},
}Expand description
All errors that can be produced by compilation or runtime execution.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Parse
A parse-time error, optionally localised to a source span.
Fields
UnknownNode(String)
A reference to an unknown node.
DuplicateNode(String)
A duplicate node title was found across merged sources.
Validation(String)
A validation failure detected after all sources are merged.
Runtime(String)
A runtime execution error.
Type(String)
A type mismatch in an expression.
UndefinedVariable(String)
An unknown variable was referenced.
Function
A function call failed.
Trait Implementations§
Source§impl Clone for DialogueError
impl Clone for DialogueError
Source§fn clone(&self) -> DialogueError
fn clone(&self) -> DialogueError
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DialogueError
impl Debug for DialogueError
Source§impl Display for DialogueError
impl Display for DialogueError
Source§impl Error for DialogueError
impl Error for DialogueError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for DialogueError
impl RefUnwindSafe for DialogueError
impl Send for DialogueError
impl Sync for DialogueError
impl Unpin for DialogueError
impl UnsafeUnpin for DialogueError
impl UnwindSafe for DialogueError
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