#[non_exhaustive]pub enum CodeGenWarning {
#[non_exhaustive] IdiomaticAliasesSuppressed {
enum_name: String,
conflicts: Vec<AliasConflict>,
invalid: Vec<String>,
},
#[non_exhaustive] OwnedViewAccessorSuppressed {
wrapper_name: String,
field_name: String,
},
}Expand description
A non-fatal diagnostic produced during code generation.
Returned by generate_with_diagnostics. Render the human-readable form via
the Display impl (e.g. cargo:warning={warning}), or
match on the variant for programmatic handling. The enum and its variants are
#[non_exhaustive] so new diagnostic kinds and fields can be added without a
breaking change.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
#[non_exhaustive]IdiomaticAliasesSuppressed
Idiomatic CamelCase aliases were suppressed for an enum because two or
more proto values collide after conversion, or a value would convert to
an invalid identifier. The enum’s SHOUTY_SNAKE_CASE variants are
unaffected.
Fields
This variant is marked as non-exhaustive
conflicts: Vec<AliasConflict>Each collision, by target identifier. Empty if the only problem was invalid identifiers.
#[non_exhaustive]OwnedViewAccessorSuppressed
A field or oneof accessor on a generated FooOwnedView wrapper was
suppressed because the proto name collides with one of the wrapper’s
reserved method names (decode, view, bytes, …). The field stays
fully accessible through view() on the wrapper (or
OwnedView::reborrow).
Fields
This variant is marked as non-exhaustive
Trait Implementations§
Source§impl Clone for CodeGenWarning
impl Clone for CodeGenWarning
Source§fn clone(&self) -> CodeGenWarning
fn clone(&self) -> CodeGenWarning
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CodeGenWarning
impl Debug for CodeGenWarning
Source§impl Display for CodeGenWarning
impl Display for CodeGenWarning
Source§impl PartialEq for CodeGenWarning
impl PartialEq for CodeGenWarning
Source§fn eq(&self, other: &CodeGenWarning) -> bool
fn eq(&self, other: &CodeGenWarning) -> bool
self and other values to be equal, and is used by ==.