pub enum TypeParseError {
UnsupportedVariation(String),
UnsupportedNumericExpression(String),
UnsupportedSyntax {
construct: &'static str,
type_string: String,
},
ExpectedType(String),
ExpectedInteger(String),
ExpectedBoolean(String),
ExpectedArgumentName(String),
InvalidArgumentCount {
function: String,
expected: usize,
actual: usize,
},
InvalidInteger(String),
Syntax {
column: usize,
message: String,
},
}Available on crate feature
parse only.Expand description
Syntax and expression-kind errors reported by the type parser.
Variants§
UnsupportedVariation(String)
Type variation syntax is not supported.
UnsupportedNumericExpression(String)
The expression uses a derivation not yet supported.
UnsupportedSyntax
The grammar accepts this construct, but the type model does not support it.
Fields
ExpectedType(String)
An integer expression appeared in a type position.
ExpectedInteger(String)
A non-integer expression appeared in an integer position.
ExpectedBoolean(String)
A non-boolean expression appeared in a condition.
ExpectedArgumentName(String)
A value lookup requires a bare function argument name.
InvalidArgumentCount
A numeric function received the wrong number of arguments.
Fields
InvalidInteger(String)
An integer literal exceeds the supported range.
Syntax
The input does not match the grammar.
Trait Implementations§
Source§impl Debug for TypeParseError
impl Debug for TypeParseError
Source§impl Display for TypeParseError
impl Display for TypeParseError
Source§impl Error for TypeParseError
impl Error for TypeParseError
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<TypeParseError> for ExtensionTypeError
impl From<TypeParseError> for ExtensionTypeError
Source§fn from(source: TypeParseError) -> Self
fn from(source: TypeParseError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for TypeParseError
impl PartialEq for TypeParseError
impl StructuralPartialEq for TypeParseError
Auto Trait Implementations§
impl Forget for TypeParseError
impl Freeze for TypeParseError
impl Move for TypeParseError
impl RefUnwindSafe for TypeParseError
impl Send for TypeParseError
impl Sync for TypeParseErrorwhere
RawVecInner: Sync,
impl Unpin for TypeParseError
impl UnsafeUnpin for TypeParseError
impl UnwindSafe for TypeParseError
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