Enum config_struct::GenerationError [−][src]
pub enum GenerationError { UnknownInputFormat(String), InvalidFieldName(String), HeterogenousArray(String), MissingFilePath, DeserializationFailed(String), Options(OptionsError), }
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.
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.
Options(OptionsError)
Occurs when invalid options were provided.
Trait Implementations
impl Debug for GenerationError
[src]
impl Debug for GenerationError
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Fail for GenerationError
[src]
impl Fail for GenerationError
fn cause(&self) -> Option<&Fail>
[src]
fn cause(&self) -> Option<&Fail>
Returns a reference to the underlying cause of this failure, if it is an error that wraps other errors. Read more
fn backtrace(&self) -> Option<&Backtrace>
[src]
fn backtrace(&self) -> Option<&Backtrace>
Returns a reference to the Backtrace
carried by this failure, if it carries one. Read more
fn context<D>(self, context: D) -> Context<D> where
D: Display + Send + Sync + 'static,
[src]
fn context<D>(self, context: D) -> Context<D> where
D: Display + Send + Sync + 'static,
Provides context for this failure. Read more
fn compat(self) -> Compat<Self>
[src]
fn compat(self) -> Compat<Self>
Wraps this failure in a compatibility wrapper that implements std::error::Error
. Read more
fn causes(&self) -> Causes
[src]
fn causes(&self) -> Causes
Returns a iterator over the causes of this Fail
with itself as the first item and the root_cause
as the final item. Read more
fn root_cause(&self) -> &(Fail + 'static)
[src]
fn root_cause(&self) -> &(Fail + 'static)
Returns the "root cause" of this Fail
- the last value in the cause chain which does not return an underlying cause
. Read more
impl Display for GenerationError
[src]
impl Display for GenerationError
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl From<GenerationError> for Error
[src]
impl From<GenerationError> for Error
fn from(error: GenerationError) -> Self
[src]
fn from(error: GenerationError) -> Self
Performs the conversion.
impl From<OptionsError> for GenerationError
[src]
impl From<OptionsError> for GenerationError
fn from(error: OptionsError) -> Self
[src]
fn from(error: OptionsError) -> Self
Performs the conversion.
Auto Trait Implementations
impl Send for GenerationError
impl Send for GenerationError
impl Sync for GenerationError
impl Sync for GenerationError