pub enum GeneratorError {
TemplateRender {
template_path: String,
source: Error,
},
TemplateNotFound {
template_path: String,
source: Error,
},
ApiClientGeneration {
client_name: String,
source: Box<dyn Error + Send + Sync>,
},
ModelGeneration {
model_name: String,
source: Box<dyn Error + Send + Sync>,
},
TypeMapping {
source: Box<dyn Error + Send + Sync>,
},
Io {
source: Error,
},
ConfigParse {
source: Error,
},
Generic {
message: String,
},
}Expand description
Error type for Go code generation
Variants§
TemplateRender
Template rendering error
TemplateNotFound
Template not found error
ApiClientGeneration
API client generation error
ModelGeneration
Model generation error
TypeMapping
Type mapping error
Io
File I/O error
ConfigParse
Config parsing error
Generic
Generic error for cases that don’t fit other categories
Trait Implementations§
Source§impl Debug for GeneratorError
impl Debug for GeneratorError
Source§impl Display for GeneratorError
impl Display for GeneratorError
Source§impl Error for GeneratorError
impl Error for GeneratorError
Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§fn cause(&self) -> Option<&dyn Error>
fn cause(&self) -> Option<&dyn Error>
👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
Source§impl ErrorCompat for GeneratorError
impl ErrorCompat for GeneratorError
Source§fn iter_chain(&self) -> ChainCompat<'_, '_>where
Self: AsErrorSource,
fn iter_chain(&self) -> ChainCompat<'_, '_>where
Self: AsErrorSource,
Returns an iterator for traversing the chain of errors,
starting with the current error
and continuing with recursive calls to
Error::source. Read moreSource§impl From<Error> for GeneratorError
impl From<Error> for GeneratorError
Source§impl From<Error> for GeneratorError
impl From<Error> for GeneratorError
Source§impl<__T0> IntoError<GeneratorError> for ApiClientGenerationSnafu<__T0>
impl<__T0> IntoError<GeneratorError> for ApiClientGenerationSnafu<__T0>
Source§impl IntoError<GeneratorError> for ConfigParseSnafu
impl IntoError<GeneratorError> for ConfigParseSnafu
Source§fn into_error(self, error: Self::Source) -> GeneratorError
fn into_error(self, error: Self::Source) -> GeneratorError
Combine the information to produce the error
Source§impl<__T0> IntoError<GeneratorError> for GenericSnafu<__T0>
impl<__T0> IntoError<GeneratorError> for GenericSnafu<__T0>
Source§fn into_error(self, error: Self::Source) -> GeneratorError
fn into_error(self, error: Self::Source) -> GeneratorError
Combine the information to produce the error
Source§impl IntoError<GeneratorError> for IoSnafu
impl IntoError<GeneratorError> for IoSnafu
Source§fn into_error(self, error: Self::Source) -> GeneratorError
fn into_error(self, error: Self::Source) -> GeneratorError
Combine the information to produce the error
Source§impl<__T0> IntoError<GeneratorError> for ModelGenerationSnafu<__T0>
impl<__T0> IntoError<GeneratorError> for ModelGenerationSnafu<__T0>
Source§impl<__T0> IntoError<GeneratorError> for TemplateNotFoundSnafu<__T0>
impl<__T0> IntoError<GeneratorError> for TemplateNotFoundSnafu<__T0>
Source§fn into_error(self, error: Self::Source) -> GeneratorError
fn into_error(self, error: Self::Source) -> GeneratorError
Combine the information to produce the error
Source§impl<__T0> IntoError<GeneratorError> for TemplateRenderSnafu<__T0>
impl<__T0> IntoError<GeneratorError> for TemplateRenderSnafu<__T0>
Source§fn into_error(self, error: Self::Source) -> GeneratorError
fn into_error(self, error: Self::Source) -> GeneratorError
Combine the information to produce the error
Source§impl IntoError<GeneratorError> for TypeMappingSnafu
impl IntoError<GeneratorError> for TypeMappingSnafu
Auto Trait Implementations§
impl Freeze for GeneratorError
impl !RefUnwindSafe for GeneratorError
impl Send for GeneratorError
impl Sync for GeneratorError
impl Unpin for GeneratorError
impl !UnwindSafe for GeneratorError
Blanket Implementations§
Source§impl<T> AsErrorSource for Twhere
T: Error + 'static,
impl<T> AsErrorSource for Twhere
T: Error + 'static,
Source§fn as_error_source(&self) -> &(dyn Error + 'static)
fn as_error_source(&self) -> &(dyn Error + 'static)
For maximum effectiveness, this needs to be called as a method
to benefit from Rust’s automatic dereferencing of method
receivers.
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