Skip to main content

CodegenError

Enum CodegenError 

Source
pub enum CodegenError {
Show 19 variants OptionalFieldUnsupported { container: String, field: String, }, DefaultValueUnsupported { container: String, field: String, }, EnumFieldUnsupported { container: String, field: String, ty: String, }, EnumRepresentationUnsupported { enum_name: String, repr: String, }, EnumVariantValueRequired { enum_name: String, variant: String, }, EnumVariantValueOutOfRange { enum_name: String, variant: String, value: i64, repr: String, }, UnboundedStringUnsupported { container: String, field: String, }, LegacyMessageUnsupported { packet: String, }, MissingMid { packet: String, }, MessageIdUnsupported { item: String, }, MessageIdValueUnsupported { packet: String, }, MissingCommandCode { packet: String, }, CommandCodeUnsupported { item: String, }, CommandCodeValueUnsupported { packet: String, }, DuplicateMid { mid: String, first_packet: String, second_packet: String, }, DuplicateCommandCode { mid: String, cc: String, first_packet: String, second_packet: String, }, MidRangeMismatch { packet: String, mid: String, expected: &'static str, }, DynamicArrayUnsupported { container: String, field: String, ty: String, }, BoundedArrayUnsupported { container: String, field: String, ty: String, },
}
Expand description

Error returned when a parsed Synapse file cannot be emitted safely.

Variants§

§

OptionalFieldUnsupported

Optional fields parse today, but cFS ABI codegen has no representation for them yet.

Fields

§container: String
§field: String
§

DefaultValueUnsupported

Field defaults parse today, but cFS ABI codegen does not generate initializers yet.

Fields

§container: String
§field: String
§

EnumFieldUnsupported

Unrepresented enum fields parse today, but cFS ABI codegen needs an explicit representation.

Fields

§container: String
§field: String
§

EnumRepresentationUnsupported

Represented enums must use integer ABI types.

Fields

§enum_name: String
§repr: String
§

EnumVariantValueRequired

Represented enums require explicit values for every variant.

Fields

§enum_name: String
§variant: String
§

EnumVariantValueOutOfRange

Represented enum variant values must fit the selected ABI type.

Fields

§enum_name: String
§variant: String
§value: i64
§repr: String
§

UnboundedStringUnsupported

Unbounded strings would generate pointer fields, which are not cFS packet/table ABI data.

Fields

§container: String
§field: String
§

LegacyMessageUnsupported

The legacy message keyword is parsed for migration, but cFS codegen requires intent.

Fields

§packet: String
§

MissingMid

cFS Software Bus command and telemetry packets require explicit message IDs.

Fields

§packet: String
§

MessageIdUnsupported

Message IDs are only meaningful for cFS command and telemetry packets.

Fields

§item: String
§

MessageIdValueUnsupported

Message IDs must resolve to non-negative integers for cFS codegen.

Fields

§packet: String
§

MissingCommandCode

cFS command packets require an explicit command code.

Fields

§packet: String
§

CommandCodeUnsupported

Command codes are only meaningful for cFS command packets.

Fields

§item: String
§

CommandCodeValueUnsupported

Command codes must be literal non-negative integers for cFS codegen today.

Fields

§packet: String
§

DuplicateMid

Literal MIDs must be unique within one generated file.

Fields

§first_packet: String
§second_packet: String
§

DuplicateCommandCode

Literal command MID/CC pairs must be unique within one generated file.

Fields

§first_packet: String
§second_packet: String
§

MidRangeMismatch

Literal command/telemetry MIDs must match the expected cFS command bit pattern.

Fields

§packet: String
§expected: &'static str
§

DynamicArrayUnsupported

Dynamic arrays parse today, but cFS ABI codegen has no ownership/length model yet.

Fields

§container: String
§field: String
§

BoundedArrayUnsupported

Non-string bounded arrays parse today, but cFS ABI codegen has no inline representation yet.

Fields

§container: String
§field: String

Trait Implementations§

Source§

impl Clone for CodegenError

Source§

fn clone(&self) -> CodegenError

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for CodegenError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for CodegenError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for CodegenError

1.30.0 · Source§

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

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl PartialEq for CodegenError

Source§

fn eq(&self, other: &CodegenError) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Eq for CodegenError

Source§

impl StructuralPartialEq for CodegenError

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.