#[non_exhaustive]pub enum CodeGenError {
MissingField(&'static str),
InvalidTypePath(String),
InvalidSyntax(String),
FileNotFound(String),
Other(String),
ReservedFieldName {
message_name: String,
field_name: String,
},
ModuleNameConflict {
scope: String,
name_a: String,
name_b: String,
module_name: String,
},
NestedTypeOneofConflict {
scope: String,
nested_name: String,
oneof_name: String,
rust_name: String,
},
ViewNameConflict {
scope: String,
owned_msg: String,
view_msg: String,
},
}Expand description
Code generation error.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
MissingField(&'static str)
A required field was absent in a descriptor.
The &'static str names the missing field for diagnostics.
InvalidTypePath(String)
A resolved type path string could not be parsed as a Rust type.
InvalidSyntax(String)
The accumulated TokenStream failed to parse as valid Rust syntax.
FileNotFound(String)
A requested file was not present in the descriptor set.
Other(String)
Unexpected descriptor state (e.g. a map entry or oneof that cannot be resolved to a known descriptor field).
ReservedFieldName
A proto field name uses the __buffa_ reserved prefix, which would
conflict with buffa’s internal generated fields.
ModuleNameConflict
Two sibling messages produce the same Rust module name after
snake_case conversion (e.g., HTTPRequest and HttpRequest both
become pub mod http_request).
NestedTypeOneofConflict
A nested message/enum name collides with a oneof enum name inside the same message module.
ViewNameConflict
A message named FooView collides with the generated view type for
message Foo.
Trait Implementations§
Source§impl Clone for CodeGenError
impl Clone for CodeGenError
Source§fn clone(&self) -> CodeGenError
fn clone(&self) -> CodeGenError
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CodeGenError
impl Debug for CodeGenError
Source§impl Display for CodeGenError
impl Display for CodeGenError
Source§impl Error for CodeGenError
impl Error for CodeGenError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()