pub enum BuildError {
Show 15 variants
SpecifiedKeyNotUnique(Vec<String>),
NotExistSpecifiedKey(String, Vec<String>),
AlreadyExistKey(String),
InvalidType(GeneratorType),
InvalidValue(String),
NotExistValueOf(String),
FailParseValue(String, String, String),
RangeEmpty(ValueBound<DataValue>),
EmptySelectableChildren,
EmptySelectValues,
EmptySelectable,
NotExistDefaultCase,
AllWeightsZero,
FileError(Error, PathBuf),
FailBuildDistribution(String, String),
}Expand description
Error for generator builder
Variants§
SpecifiedKeyNotUnique(Vec<String>)
NotExistSpecifiedKey(String, Vec<String>)
Specified key does not exist in generated values
§Arguments
- 0: Specified
key - 1: Keys of generated values
AlreadyExistKey(String)
InvalidType(GeneratorType)
InvalidValue(String)
NotExistValueOf(String)
FailParseValue(String, String, String)
Fail parse specified value in the Schema.
§Arguments
- 0: Parse target value
- 1: Parse target type
- 2: Parse error message
RangeEmpty(ValueBound<DataValue>)
EmptySelectableChildren
Specified children in the Schema does not exist or does not have child.
EmptySelectValues
Specified values in the Schema does not exist or does not have value.
EmptySelectable
Specified randomize values at the keys: children, chars, values, filepath is empty.
NotExistDefaultCase
Specified default case at the key case in the Schema at a child generator does not exist
AllWeightsZero
Specified some of values at the key weight in the Schema at a child generator does not exist
FileError(Error, PathBuf)
FailBuildDistribution(String, String)
Error for fail build distribution with the specified parameters at the key parameters in the Schema
§Arguments
- 0: Name of the distribution
- 1: Error information
Trait Implementations§
Source§impl Debug for BuildError
impl Debug for BuildError
Source§impl Display for BuildError
impl Display for BuildError
Source§impl Error for BuildError
impl Error for BuildError
1.30.0 · 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<BuildError> for SchemaError
impl From<BuildError> for SchemaError
Source§fn from(e: BuildError) -> Self
fn from(e: BuildError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for BuildError
impl !RefUnwindSafe for BuildError
impl Send for BuildError
impl Sync for BuildError
impl Unpin for BuildError
impl !UnwindSafe for BuildError
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> 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 moreSource§impl<E> IntoSbrdError for Ewhere
E: 'static + Error,
impl<E> IntoSbrdError for Ewhere
E: 'static + Error,
Source§fn into_sbrd_gen_error(self, kind: SchemaErrorKind) -> SchemaError
fn into_sbrd_gen_error(self, kind: SchemaErrorKind) -> SchemaError
Converter function to
SchemaError from other error