#[non_exhaustive]pub enum LibError {
CLIValueError(&'static str, String),
CLITypeError(&'static str, String),
ArgValueError(usize, String),
ArgTypeError(usize, String),
ArgumentCountError(Range, usize, Option<String>),
UnknownOp(String),
InvalidData(String),
IOError(String),
LocaleError(String),
}
Expand description
LibError
represents one of all possible error cases possible to occur in this library
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
CLIValueError(&'static str, String)
A value error for a CLI argument, e.g. “–radix” receives a negative number; specified by (CLI argument name, error message)
CLITypeError(&'static str, String)
A value error for a CLI argument, e.g. “–radix” receives a floating point number; specified by (CLI argument name, error message)
ArgValueError(usize, String)
A value error for a positional argument, e.g. “repeat” receives a negative number as argument; specified by (zero-based argument ID, error message)
ArgTypeError(usize, String)
A value error for a positional argument, e.g. “repeat” receives a boolean as argument; specified by (zero-based argument ID, error message)
ArgumentCountError(Range, usize, Option<String>)
The number of arguments received does not match this function’s signature. Specified by (expected, actual) number of arguments and an optional error message.
UnknownOp(String)
The user-provided operation name is unknown; specified by the op name.
InvalidData(String)
Internal error, where generated data does not satisfy required format; specified by an error message.
IOError(String)
internal error related to I/O; specified by an error message.
LocaleError(String)
The locale is not properly set up. A common case is that the locale data file does not contain necessary data to run the requested operation; specified by an error message.
Trait Implementations§
Source§impl From<CollatorError> for LibError
impl From<CollatorError> for LibError
Source§fn from(err: CollatorError) -> Self
fn from(err: CollatorError) -> Self
Source§impl From<ParserError> for LibError
impl From<ParserError> for LibError
Source§fn from(err: ParserError) -> Self
fn from(err: ParserError) -> Self
Auto Trait Implementations§
impl Freeze for LibError
impl RefUnwindSafe for LibError
impl Send for LibError
impl Sync for LibError
impl Unpin for LibError
impl UnwindSafe for LibError
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Filterable for T
impl<T> Filterable for T
Source§fn filterable(
self,
filter_name: &'static str,
) -> RequestFilterDataProvider<T, fn(DataRequest<'_>) -> bool>
fn filterable( self, filter_name: &'static str, ) -> RequestFilterDataProvider<T, fn(DataRequest<'_>) -> bool>
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>
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>
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