pub enum TranslationErrorKind {
NameMismatch {
remote: Schema,
local: Schema,
remote_rust: String,
local_rust: String,
},
KindMismatch {
remote: Schema,
local: Schema,
remote_rust: String,
local_rust: String,
},
MissingRequiredField {
field: FieldSchema,
remote_struct: Schema,
},
FieldTypeMismatch {
field_name: String,
remote_field_type: Schema,
local_field_type: Schema,
source: Box<TranslationError>,
},
IncompatibleVariantPayload {
remote_variant: VariantSchema,
local_variant: VariantSchema,
},
SchemaNotFound {
type_id: SchemaHash,
side: SchemaSide,
},
TupleLengthMismatch {
remote: Schema,
local: Schema,
remote_rust: String,
local_rust: String,
remote_len: usize,
local_len: usize,
},
UnresolvedVar {
name: String,
side: SchemaSide,
},
}Variants§
NameMismatch
The root type names don’t match.
KindMismatch
The structural kinds don’t match (e.g. remote is enum, local is struct).
MissingRequiredField
A required local field has no corresponding remote field and no default.
Fields
§
field: FieldSchemaThe local field that’s missing from the remote schema.
FieldTypeMismatch
A field exists in both types but the nested types are incompatible.
Fields
§
source: Box<TranslationError>The nested error that explains what exactly is incompatible.
IncompatibleVariantPayload
Enum variant payloads are incompatible (e.g. unit vs struct).
SchemaNotFound
A type ID referenced by the remote schema was not found in the registry.
TupleLengthMismatch
Tuple lengths don’t match.
Fields
UnresolvedVar
A type variable (Var) appeared where a concrete type was expected. This means Var substitution didn’t happen — a bug in the extraction or plan building pipeline.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TranslationErrorKind
impl RefUnwindSafe for TranslationErrorKind
impl Send for TranslationErrorKind
impl Sync for TranslationErrorKind
impl Unpin for TranslationErrorKind
impl UnsafeUnpin for TranslationErrorKind
impl UnwindSafe for TranslationErrorKind
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