pub trait OBISchema {
// Required methods
fn add_definitions_recursively(
definitions: &mut HashMap<Declaration, Definition>,
);
fn declaration() -> Declaration;
// Provided method
fn add_definition(
declaration: Declaration,
definition: Definition,
definitions: &mut HashMap<Declaration, Definition>,
) { ... }
}Expand description
The declaration and the definition of the type that can be used to decode/encode OBI without the Rust type that produced it.
Required Methods§
Sourcefn add_definitions_recursively(
definitions: &mut HashMap<Declaration, Definition>,
)
fn add_definitions_recursively( definitions: &mut HashMap<Declaration, Definition>, )
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.
Sourcefn declaration() -> Declaration
fn declaration() -> Declaration
Get the name of the type without brackets.
Provided Methods§
Sourcefn add_definition(
declaration: Declaration,
definition: Definition,
definitions: &mut HashMap<Declaration, Definition>,
)
fn add_definition( declaration: Declaration, definition: Definition, definitions: &mut HashMap<Declaration, Definition>, )
Helper method to add a single type definition to the map.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.