pub trait BorshSchema {
// Required methods
fn add_definitions_recursively(
definitions: &mut BTreeMap<Declaration, Definition>,
);
fn declaration() -> Declaration;
}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§
Sourcefn add_definitions_recursively(
definitions: &mut BTreeMap<Declaration, Definition>,
)
fn add_definitions_recursively( definitions: &mut BTreeMap<Declaration, Definition>, )
Recursively, using DFS, add type definitions required for this type. Type definition partially explains how to serialize/deserialize a type.
Sourcefn declaration() -> Declaration
fn declaration() -> Declaration
Get the name of the type without brackets.
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.