pub enum ExpressionError {
ParseError {
message: String,
source: String,
},
InvalidExpression {
message: String,
source: String,
},
}Expand description
Common Expression Error.
Variants§
Implementations§
Source§impl ExpressionError
impl ExpressionError
Sourcepub fn parse_error(
message: impl Into<String>,
source: impl Into<String>,
) -> Self
pub fn parse_error( message: impl Into<String>, source: impl Into<String>, ) -> Self
Constructs a new ExpressionError::ParseError.
This function is a utility for creating instances where a parsing error needs to be represented, encapsulating a descriptive error message and the source of the error.
§Parameters
message: A value that can be converted into aString, representing a human-readable description of the parsing error.source: A value that can be converted into aString, typically identifying the origin or input that caused the parsing error.
Sourcepub fn invalid_expression(
message: impl Into<String>,
source: impl Into<String>,
) -> Self
pub fn invalid_expression( message: impl Into<String>, source: impl Into<String>, ) -> Self
Creates a new ExpressionError::InvalidExpression.
§Parameters
message: A detailed message describing the nature of the invalid expression. Accepts any type that can be converted into aString.source: The source or context in which the invalid expression occurred. Accepts any type that can be converted into aString.
Trait Implementations§
Source§impl Clone for ExpressionError
impl Clone for ExpressionError
Source§fn clone(&self) -> ExpressionError
fn clone(&self) -> ExpressionError
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ExpressionError
impl Debug for ExpressionError
Source§impl Display for ExpressionError
impl Display for ExpressionError
Source§impl Error for ExpressionError
impl Error for ExpressionError
1.30.0§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§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl PartialEq for ExpressionError
impl PartialEq for ExpressionError
impl Eq for ExpressionError
impl StructuralPartialEq for ExpressionError
Auto Trait Implementations§
impl Freeze for ExpressionError
impl RefUnwindSafe for ExpressionError
impl Send for ExpressionError
impl Sync for ExpressionError
impl Unpin for ExpressionError
impl UnwindSafe for ExpressionError
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.