pub enum ExternError {
Syntax(Box<SyntaxError<ExternSignature>>),
Lex(Box<Error<LexErrorKind>>),
InvalidPragmaArguments,
NoSignature,
NoName,
PragmaIsNotExtern,
NoReturnOrParameters,
Name(Box<IdentifierValidationError>),
}
Expand description
An error that can occur when parsing an extern signature.
Variants§
Syntax(Box<SyntaxError<ExternSignature>>)
An error occurred while parsing the contents of the extern signature.
Lex(Box<Error<LexErrorKind>>)
An error occurred while lexing the extern signature.
InvalidPragmaArguments
Pragma arguments are invalid.
NoSignature
No signature found.
NoName
No extern name found.
PragmaIsNotExtern
Pragma is not EXTERN.
NoReturnOrParameters
The extern definition has a signature but it has neither a return nor parameters.
Name(Box<IdentifierValidationError>)
Either the name of the extern or one of its parameters is invalid.
Trait Implementations§
Source§impl Clone for ExternError
impl Clone for ExternError
Source§fn clone(&self) -> ExternError
fn clone(&self) -> ExternError
Returns a copy 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 ExternError
impl Debug for ExternError
Source§impl Display for ExternError
impl Display for ExternError
Source§impl Error for ExternError
impl Error for ExternError
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<Box<IdentifierValidationError>> for ExternError
impl From<Box<IdentifierValidationError>> for ExternError
Source§fn from(source: Box<IdentifierValidationError>) -> Self
fn from(source: Box<IdentifierValidationError>) -> Self
Converts to this type from the input type.
Source§impl From<ExternError> for CallResolutionError
impl From<ExternError> for CallResolutionError
Source§fn from(source: ExternError) -> Self
fn from(source: ExternError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for ExternError
impl PartialEq for ExternError
impl StructuralPartialEq for ExternError
Auto Trait Implementations§
impl Freeze for ExternError
impl !RefUnwindSafe for ExternError
impl Send for ExternError
impl Sync for ExternError
impl Unpin for ExternError
impl !UnwindSafe for ExternError
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.