pub enum CsGenError {
UnsupportedConstruct {
construct: String,
context: Option<String>,
},
InvalidName {
name: String,
reason: String,
},
InheritanceCycle {
type_name: String,
},
Internal(String),
}Expand description
Top-level error of the C# code generator.
Variants§
UnsupportedConstruct
The IDL construct is not supported in the current foundation
scope (C5.3-a). construct is a short label (e.g.
"interface", "valuetype", "fixed", "any", "map",
"bitset", "bitmask").
Fields
InvalidName
Identifier collides with a reserved C# keyword.
Unlike C++, C# does not reject but escapes with an
@ prefix (spec behavior, §6 IDL4-CS mapping).
This error only occurs if the name itself would still be
invalid after escaping (empty string, double @, …).
InheritanceCycle
Inheritance cycle in the struct graph (self-reference or indirect loop). Detected before emission.
Internal(String)
The generated output is internally inconsistent (should not happen — bug indicator).
Trait Implementations§
Source§impl Clone for CsGenError
impl Clone for CsGenError
Source§fn clone(&self) -> CsGenError
fn clone(&self) -> CsGenError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CsGenError
impl Debug for CsGenError
Source§impl Display for CsGenError
impl Display for CsGenError
impl Eq for CsGenError
Source§impl Error for CsGenError
impl Error for CsGenError
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()
Source§impl PartialEq for CsGenError
impl PartialEq for CsGenError
Source§fn eq(&self, other: &CsGenError) -> bool
fn eq(&self, other: &CsGenError) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for CsGenError
Auto Trait Implementations§
impl Freeze for CsGenError
impl RefUnwindSafe for CsGenError
impl Send for CsGenError
impl Sync for CsGenError
impl Unpin for CsGenError
impl UnsafeUnpin for CsGenError
impl UnwindSafe for CsGenError
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