Struct switchboard_aggregator::borsh::schema::BorshSchemaContainer [−][src]
pub struct BorshSchemaContainer {
pub declaration: String,
pub definitions: HashMap<String, Definition, RandomState>,
}
Expand description
All schema information needed to deserialize a single type.
Fields
declaration: String
Declaration of the type.
definitions: HashMap<String, Definition, RandomState>
All definitions needed to deserialize the given type.
Trait Implementations
impl BorshDeserialize for BorshSchemaContainer where
String: BorshDeserialize,
HashMap<String, Definition, RandomState>: BorshDeserialize,
impl BorshDeserialize for BorshSchemaContainer where
String: BorshDeserialize,
HashMap<String, Definition, RandomState>: BorshDeserialize,
Deserializes this instance from a given slice of bytes. Updates the buffer to point at the remaining bytes. Read more
impl BorshSchema for BorshSchemaContainer where
String: BorshSchema,
HashMap<String, Definition, RandomState>: BorshSchema,
impl BorshSchema for BorshSchemaContainer where
String: BorshSchema,
HashMap<String, Definition, RandomState>: BorshSchema,
Get the name of the type without brackets.
pub fn add_definitions_recursively(
definitions: &mut HashMap<String, Definition, RandomState>
)
pub fn add_definitions_recursively(
definitions: &mut HashMap<String, Definition, RandomState>
)
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: String,
definition: Definition,
definitions: &mut HashMap<String, Definition, RandomState>
)
fn add_definition(
declaration: String,
definition: Definition,
definitions: &mut HashMap<String, Definition, RandomState>
)
Helper method to add a single type definition to the map.
impl BorshSerialize for BorshSchemaContainer where
String: BorshSerialize,
HashMap<String, Definition, RandomState>: BorshSerialize,
impl BorshSerialize for BorshSchemaContainer where
String: BorshSerialize,
HashMap<String, Definition, RandomState>: BorshSerialize,
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.