pub enum JsonnetError {
Show 15 variants
ParseError {
line: usize,
column: usize,
message: String,
},
RuntimeError {
message: String,
},
TypeError {
message: String,
},
UndefinedVariable {
name: String,
},
UndefinedField {
field: String,
},
IndexOutOfBounds {
index: i64,
},
DivisionByZero,
InvalidFunctionCall {
message: String,
},
ImportError {
path: String,
},
IoError {
message: String,
},
AssertionFailed {
message: String,
},
StackOverflow,
MaxRecursionExceeded,
InvalidUtf8,
RegexError {
message: String,
},
}
Expand description
Jsonnet evaluation errors
Variants§
ParseError
RuntimeError
TypeError
UndefinedVariable
UndefinedField
IndexOutOfBounds
DivisionByZero
InvalidFunctionCall
ImportError
IoError
AssertionFailed
StackOverflow
MaxRecursionExceeded
InvalidUtf8
RegexError
Implementations§
Source§impl JsonnetError
impl JsonnetError
Sourcepub fn parse_error(
line: usize,
column: usize,
message: impl Into<String>,
) -> Self
pub fn parse_error( line: usize, column: usize, message: impl Into<String>, ) -> Self
Create a parse error
Sourcepub fn runtime_error(message: impl Into<String>) -> Self
pub fn runtime_error(message: impl Into<String>) -> Self
Create a runtime error
Sourcepub fn type_error(message: impl Into<String>) -> Self
pub fn type_error(message: impl Into<String>) -> Self
Create a type error
Sourcepub fn undefined_variable(name: impl Into<String>) -> Self
pub fn undefined_variable(name: impl Into<String>) -> Self
Create an undefined variable error
Sourcepub fn undefined_field(field: impl Into<String>) -> Self
pub fn undefined_field(field: impl Into<String>) -> Self
Create an undefined field error
Sourcepub fn index_out_of_bounds(index: i64) -> Self
pub fn index_out_of_bounds(index: i64) -> Self
Create an index out of bounds error
Sourcepub fn invalid_function_call(message: impl Into<String>) -> Self
pub fn invalid_function_call(message: impl Into<String>) -> Self
Create an invalid function call error
Sourcepub fn import_error(path: impl Into<String>) -> Self
pub fn import_error(path: impl Into<String>) -> Self
Create an import error
Sourcepub fn assertion_failed(message: impl Into<String>) -> Self
pub fn assertion_failed(message: impl Into<String>) -> Self
Create an assertion failed error
Trait Implementations§
Source§impl Clone for JsonnetError
impl Clone for JsonnetError
Source§fn clone(&self) -> JsonnetError
fn clone(&self) -> JsonnetError
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 JsonnetError
impl Debug for JsonnetError
Source§impl Display for JsonnetError
impl Display for JsonnetError
Source§impl Error for JsonnetError
impl Error for JsonnetError
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()
Source§impl From<Error> for JsonnetError
impl From<Error> for JsonnetError
Source§impl From<Error> for JsonnetError
impl From<Error> for JsonnetError
Source§impl From<Error> for JsonnetError
impl From<Error> for JsonnetError
Source§impl PartialEq for JsonnetError
impl PartialEq for JsonnetError
impl StructuralPartialEq for JsonnetError
Auto Trait Implementations§
impl Freeze for JsonnetError
impl RefUnwindSafe for JsonnetError
impl Send for JsonnetError
impl Sync for JsonnetError
impl Unpin for JsonnetError
impl UnwindSafe for JsonnetError
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