pub enum DataError {
Show 18 variants
AttrUnsupported(&'static str),
AttrNotFound,
IndexUnsupported(&'static str),
StrKeyUnsupported(&'static str),
IntKeyUnsupported(&'static str),
IndexNotFound,
OutputUnsupported(&'static str),
OutputError(&'static str),
UnknownValidator(String),
RegexValidationError(String, String),
BoolUnsupported(&'static str),
NumberUnsupported(&'static str),
ComparisonUnsupported(&'static str),
IterationUnsupported(&'static str),
PairIterationUnsupported(&'static str),
VariableNotFound(String),
Incomparable(&'static str, &'static str),
Custom(Box<dyn Error>),
// some variants omitted
}Expand description
This error is used to describe invalid variable usage in template
Variants§
AttrUnsupported(&'static str)
Unsupported get attribute operation
AttrNotFound
No suche attribute on this object
IndexUnsupported(&'static str)
Unsupported subscription operation
StrKeyUnsupported(&'static str)
Unsupported using this object as a key in dictionary subscription
IntKeyUnsupported(&'static str)
Unsupported using this object as a key in array subscription
IndexNotFound
No such index on this object
OutputUnsupported(&'static str)
The object can’t be output
OutputError(&'static str)
The object can’t be output
UnknownValidator(String)
Named validator is not known
RegexValidationError(String, String)
Output did not match regex
BoolUnsupported(&'static str)
The object can’t be boolean
NumberUnsupported(&'static str)
The object can’t be a number
ComparisonUnsupported(&'static str)
The object can’t be compared to
IterationUnsupported(&'static str)
The object can’t be iterated over
PairIterationUnsupported(&'static str)
The object can’t be iterated over by pairs
VariableNotFound(String)
Variable or attribute not found
Incomparable(&'static str, &'static str)
Incomparable types
Custom(Box<dyn Error>)
Custom error
Trait Implementations§
Source§impl Error for DataError
impl Error for DataError
Source§fn cause(&self) -> Option<&dyn Error>
fn cause(&self) -> Option<&dyn Error>
👎Deprecated since 1.33.0:
replaced by Error::source, which can support downcasting
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 !RefUnwindSafe for DataError
impl !Send for DataError
impl !Sync for DataError
impl !UnwindSafe for DataError
impl Freeze for DataError
impl Unpin for DataError
impl UnsafeUnpin for DataError
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