Trait borsh::schema::BorshSchema [−][src]
pub trait BorshSchema { fn add_definitions_recursively(
definitions: &mut HashMap<Declaration, Definition>
); fn declaration() -> Declaration; fn add_definition(
declaration: Declaration,
definition: Definition,
definitions: &mut HashMap<Declaration, Definition>
) { ... } fn schema_container() -> BorshSchemaContainer { ... } }
Expand description
The declaration and the definition of the type that can be used to (de)serialize Borsh without the Rust type that produced it.
Required methods
fn add_definitions_recursively(
definitions: &mut HashMap<Declaration, Definition>
)
[src]
fn add_definitions_recursively(
definitions: &mut HashMap<Declaration, Definition>
)
[src]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.
fn declaration() -> Declaration
[src]
fn declaration() -> Declaration
[src]Get the name of the type without brackets.
Provided methods
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.