pub enum CodecDef {
Enum {
name: String,
variants: Vec<String>,
},
Struct {
name: String,
kind: StructKind,
fields: Vec<FieldPlan>,
},
Operation {
operation_type: OperationType,
field_name: String,
fields: Vec<FieldPlan>,
},
}Expand description
A top-level codec, emitted as an encode_* / decode_* pair.
Variants§
Enum
An enum: encoded as the zero-based variant ordinal (u32 LE).
Fields
Struct
A struct (input object, output object, or interface): its fields in order.
Fields
§
kind: StructKindWhich SDL declaration it came from.
Operation
An operation’s variables. The struct is named differently per language
(TypeScript <field>Vars, Rust <Operation><Field>Request), so the plan
carries the raw operation identity and lets each backend name it.
Trait Implementations§
impl Eq for CodecDef
impl StructuralPartialEq for CodecDef
Auto Trait Implementations§
impl Freeze for CodecDef
impl RefUnwindSafe for CodecDef
impl Send for CodecDef
impl Sync for CodecDef
impl Unpin for CodecDef
impl UnsafeUnpin for CodecDef
impl UnwindSafe for CodecDef
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.