Enum borsh::schema::Fields [−][src]
pub enum Fields { NamedFields(Vec<(FieldName, Declaration)>), UnnamedFields(Vec<Declaration>), Empty, }
Expand description
The collection representing the fields of a struct.
Variants
NamedFields(Vec<(FieldName, Declaration)>)
The struct with named fields.
UnnamedFields(Vec<Declaration>)
The struct with unnamed fields, structurally identical to a tuple.
The struct with no fields.
Trait Implementations
impl BorshDeserialize for Fields where
Vec<(FieldName, Declaration)>: BorshDeserialize,
Vec<Declaration>: BorshDeserialize,
[src]
impl BorshDeserialize for Fields where
Vec<(FieldName, Declaration)>: BorshDeserialize,
Vec<Declaration>: BorshDeserialize,
[src]Get the name of the type without brackets.
Recursively, using DFS, add type definitions required for this type. For primitive types this is an empty map. Type definition explains how to serialize/deserialize a type. Read more
fn add_definition(
declaration: Declaration,
definition: Definition,
definitions: &mut HashMap<Declaration, Definition>
)
[src]
fn add_definition(
declaration: Declaration,
definition: Definition,
definitions: &mut HashMap<Declaration, Definition>
)
[src]Helper method to add a single type definition to the map.