OBISchema

Trait OBISchema 

Source
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§

Source

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.

Source

fn declaration() -> Declaration

Get the name of the type without brackets.

Provided Methods§

Source

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.

Implementations on Foreign Types§

Source§

impl OBISchema for bool

Source§

impl OBISchema for char

Source§

impl OBISchema for i8

Source§

impl OBISchema for i16

Source§

impl OBISchema for i32

Source§

impl OBISchema for i64

Source§

impl OBISchema for i128

Source§

impl OBISchema for u8

Source§

impl OBISchema for u16

Source§

impl OBISchema for u32

Source§

impl OBISchema for u64

Source§

impl OBISchema for u128

Source§

impl OBISchema for String

Source§

impl<T> OBISchema for Vec<T>
where T: OBISchema,

Implementors§