pub enum UtilError {
Formatted(Formatted),
Backtraced(Backtraced),
}
Expand description
InputError enum that represents all the errors for the utils
crate.
Variants§
Formatted(Formatted)
Backtraced(Backtraced)
Implementations§
Source§impl UtilError
impl UtilError
pub fn util_file_io_error( msg: impl Display, err: impl ErrorArg, span: Span, ) -> Self
pub fn toml_serizalization_error(error: impl ErrorArg, span: Span) -> Self
pub fn json_serialization_error(error: impl ErrorArg, span: Span) -> Self
pub fn snarkvm_parsing_error(name: impl Display, span: Span) -> Self
pub fn circular_dependency_error(span: Span) -> Self
pub fn network_error( url: impl Display, status: impl Display, span: Span, ) -> Self
pub fn duplicate_dependency_name_error( dependency: impl Display, span: Span, ) -> Self
pub fn reqwest_error(error: impl Display) -> Self
pub fn failed_to_open_file(error: impl Display) -> Self
pub fn failed_to_read_file(error: impl Display) -> Self
pub fn failed_to_deserialize_file(error: impl Display) -> Self
pub fn failed_to_retrieve_dependencies(error: impl Display, span: Span) -> Self
pub fn missing_network_error(dependency: impl Display, span: Span) -> Self
pub fn missing_path_error(dependency: impl Display, span: Span) -> Self
pub fn program_name_mismatch_error( program_json_name: impl Display, dep_name: impl Display, path: impl Display, span: Span, ) -> Self
pub fn snarkvm_error_building_program_id(span: Span) -> Self
pub fn failed_to_retrieve_from_endpoint( error: impl ErrorArg, span: Span, ) -> Self
pub fn build_file_does_not_exist(path: impl Display, span: Span) -> Self
pub fn invalid_input_id_len( input: impl Display, expected_type: impl Display, ) -> Self
pub fn invalid_input_id( input: impl Display, expected_type: impl Display, expected_preface: impl Display, ) -> Self
pub fn invalid_numerical_input(input: impl Display) -> Self
pub fn invalid_range() -> Self
pub fn invalid_height_or_hash(input: impl Display) -> Self
pub fn invalid_field(field: impl Display) -> Self
pub fn invalid_bound(bound: impl Display) -> Self
pub fn endpoint_moved_error(endpoint: impl Display) -> Self
pub fn num_exit_codes() -> i32
Trait Implementations§
Source§impl Error for UtilError
impl Error for UtilError
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 UtilError
impl From<Backtraced> for UtilError
Source§fn from(source: Backtraced) -> Self
fn from(source: Backtraced) -> Self
Converts to this type from the input type.
Source§impl LeoMessageCode for UtilError
impl LeoMessageCode for UtilError
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 UtilError
impl RefUnwindSafe for UtilError
impl Send for UtilError
impl Sync for UtilError
impl Unpin for UtilError
impl UnwindSafe for UtilError
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