pub enum JavaGenError {
UnsupportedConstruct {
construct: String,
context: Option<String>,
},
InvalidName {
name: String,
reason: String,
},
InheritanceCycle {
type_name: String,
},
Internal(String),
}Expand description
Top-level error of the Java code generator.
Variants§
UnsupportedConstruct
The IDL construct is not supported in the current foundation
scope (C5.4-a/-b). construct is a short label
(e.g. "interface", "valuetype", "fixed", "any",
"map"); since C5.4-b it can also be a bitset/bitmask
constraint violation (e.g. "bitset width > 64").
Fields
InvalidName
Identifier collides with a reserved Java keyword.
Java has no @-escape syntax, so the identifier is
renamed with a _ suffix by the emitter; this error only
occurs if the sanitized name itself collides or is empty.
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 JavaGenError
impl Clone for JavaGenError
Source§fn clone(&self) -> JavaGenError
fn clone(&self) -> JavaGenError
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 JavaGenError
impl Debug for JavaGenError
Source§impl Display for JavaGenError
impl Display for JavaGenError
impl Eq for JavaGenError
Source§impl Error for JavaGenError
impl Error for JavaGenError
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 JavaGenError
impl PartialEq for JavaGenError
Source§fn eq(&self, other: &JavaGenError) -> bool
fn eq(&self, other: &JavaGenError) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for JavaGenError
Auto Trait Implementations§
impl Freeze for JavaGenError
impl RefUnwindSafe for JavaGenError
impl Send for JavaGenError
impl Sync for JavaGenError
impl Unpin for JavaGenError
impl UnsafeUnpin for JavaGenError
impl UnwindSafe for JavaGenError
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