#[non_exhaustive]pub enum GenerateError {
Config(String),
UnknownSelector {
selector: String,
candidates: Vec<String>,
},
InvalidAttribute {
at: String,
attr: String,
reason: String,
},
ReservedAttribute {
at: String,
key: String,
reason: String,
},
Fidelity(String),
Template(String),
InvalidOutput {
path: String,
reason: String,
},
TemplateOutput {
path: String,
reason: String,
},
Unsupported(String),
NothingToGenerate(Vec<Diagnostic>),
Toolchain(String),
}Expand description
Generation itself did not complete. Distinct from a diagnostic: a diagnostic is an answerable fact about the description, with partial output; this is about the configuration, the templates or the toolchain, and no output is meaningful.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Config(String)
UnknownSelector
InvalidAttribute
ReservedAttribute
Fidelity(String)
Template(String)
InvalidOutput
TemplateOutput
The user’s templates rendered path into something that does not
parse; render shows what they wrote.
Unsupported(String)
NothingToGenerate(Vec<Diagnostic>)
Nothing in the description can be generated at all, such as under an unknown dialect; the diagnostics say why.
Toolchain(String)
A tool the target needs is missing or failed: generating Go needs
gofmt, which is also its syntax check.
Trait Implementations§
Source§impl Debug for GenerateError
impl Debug for GenerateError
Source§impl Display for GenerateError
impl Display for GenerateError
Source§impl Error for GenerateError
impl Error for GenerateError
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()
Auto Trait Implementations§
impl Forget for GenerateError
impl Freeze for GenerateError
impl Move for GenerateError
impl RefUnwindSafe for GenerateError
impl Send for GenerateError
impl Sync for GenerateError
impl Unpin for GenerateError
impl UnsafeUnpin for GenerateError
impl UnwindSafe for GenerateError
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
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
Fallible version of
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
Converts the given value to a
CompactString. Read more