pub enum Error {
Show 15 variants
VariableNotMutable,
TooManyArguments,
UsizeTooLarge,
PublicFunctionRequiresName,
StructFunctionRequiresName,
InvalidLabel,
PubOnlyInModules,
ExpectedBlock,
NameAlreadyBound,
UnknownSigil,
OrPatternBindingsMismatch,
ElseOnIrrefutablePattern,
LetElseMustDiverge,
Syntax(ParseError),
SigilSyntax(ParseError),
}Expand description
A compilation error.
Variants§
VariableNotMutable
A variable cannot be assigned to if it is not mutable.
TooManyArguments
Too many arguments were provided to a function call. The maximum number of arguments to a function is 255.
UsizeTooLarge
A usize was too large to convert into a smaller integer type. In
general, this should not ever be returned given that other limits will
likely be reached before this could be.
PublicFunctionRequiresName
A public function requires a name.
StructFunctionRequiresName
A function in a structure requires a name.
InvalidLabel
A label is not valid.
PubOnlyInModules
Public declarations can only exist within a module’s scope.
ExpectedBlock
Expected a block/
NameAlreadyBound
This name is already bound in the current pattern match.
UnknownSigil
This sigil is not known to the compiler.
OrPatternBindingsMismatch
All pattern options must contain the same name bindings.
ElseOnIrrefutablePattern
Else was provided on an irrefutable pattern.
LetElseMustDiverge
The else expression in a let..else expression must diverge.
Syntax(ParseError)
A syntax error occurred.
SigilSyntax(ParseError)
A syntax error occurred while parsing an expanded macro.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Error
impl<'de> Deserialize<'de> for Error
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
source§impl Error for Error
impl Error for Error
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
impl StructuralPartialEq for Error
Auto Trait Implementations§
impl Freeze for Error
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnwindSafe for Error
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
§impl<A> Cast for A
impl<A> Cast for A
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit)