pub enum GenerationError {
UnknownInputFormat(String),
InvalidFieldName(String),
InvalidVariantName(String),
HeterogenousArray(String),
MissingFilePath,
DeserializationFailed(String),
StructOptions(OptionsError),
}
Expand description
An error occurring during code generation.
Variants§
UnknownInputFormat(String)
Occurs when the config format can’t be determined from the filename extension of the input file.
InvalidFieldName(String)
Occurs when encountering a field in the config which is not a valid name for a struct field.
InvalidVariantName(String)
Occurs when encountering a field in the config which is not a valid name for an enum variant.
HeterogenousArray(String)
Occurs when an array in the config file contains multiple different types of data, which cannot be represented in a Rust struct.
MissingFilePath
Occurs when generating from source and not a file, if attempting to also generate dynamic loading functions.
Because no input filepath was given, it’s impossible to generate a function which loads from that file.
DeserializationFailed(String)
Occurs when the config file could not be correctly parsed.
StructOptions(OptionsError)
Occurs when invalid options were provided.
Trait Implementations§
Source§impl Debug for GenerationError
impl Debug for GenerationError
Source§impl Display for GenerationError
impl Display for GenerationError
Source§impl Fail for GenerationError
impl Fail for GenerationError
Source§fn cause(&self) -> Option<&dyn Fail>
fn cause(&self) -> Option<&dyn Fail>
Source§fn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
Backtrace
carried by this failure, if it
carries one. Read more