pub enum NameValidationError {
Formatted(Formatted),
Backtraced(Backtraced),
}Variants§
Formatted(Formatted)
Backtraced(Backtraced)
Implementations§
Source§impl NameValidationError
impl NameValidationError
pub fn illegal_name( item_name: impl Display, item_type: impl Display, keyword: impl Display, span: Span, ) -> Self
pub fn illegal_name_content( item_name: impl Display, item_type: impl Display, keyword: impl Display, span: Span, ) -> Self
pub fn num_exit_codes() -> i32
pub fn with_labels(self, labels: Vec<Label>) -> Self
Trait Implementations§
Source§impl Clone for NameValidationError
impl Clone for NameValidationError
Source§fn clone(&self) -> NameValidationError
fn clone(&self) -> NameValidationError
Returns a duplicate 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 NameValidationError
impl Debug for NameValidationError
Source§impl Display for NameValidationError
impl Display for NameValidationError
Source§impl Error for NameValidationError
impl Error for NameValidationError
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<Backtraced> for NameValidationError
impl From<Backtraced> for NameValidationError
Source§fn from(source: Backtraced) -> Self
fn from(source: Backtraced) -> Self
Converts to this type from the input type.
Source§impl From<Formatted> for NameValidationError
impl From<Formatted> for NameValidationError
Source§impl From<NameValidationError> for LeoError
impl From<NameValidationError> for LeoError
Source§fn from(source: NameValidationError) -> Self
fn from(source: NameValidationError) -> Self
Converts to this type from the input type.
Source§impl LeoMessageCode for NameValidationError
Implements the trait for LeoError Codes.
impl LeoMessageCode for NameValidationError
Implements the trait for LeoError Codes.
Source§fn error_code(&self) -> String
fn error_code(&self) -> String
Returns the prefixed error identifier.
Source§fn warning_code(&self) -> String
fn warning_code(&self) -> String
Returns the prefixed warning identifier.
Source§fn message_type() -> String
fn message_type() -> String
Returns the message’s code type for the program.
Source§fn code_identifier() -> i8
fn code_identifier() -> i8
The LeoErrorCode which has a default code identifier of 037
(Leo upsidedown and backwards). This is to make the exit codes
unique to Leo itself.
Auto Trait Implementations§
impl Freeze for NameValidationError
impl RefUnwindSafe for NameValidationError
impl Send for NameValidationError
impl Sync for NameValidationError
impl Unpin for NameValidationError
impl UnwindSafe for NameValidationError
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<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more