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.
Implementations on Foreign Types
impl<T0, T1, T2> BorshSchema for (T0, T1, T2) where
T0: BorshSchema,
T1: BorshSchema,
T2: BorshSchema,
[src]
impl<T0, T1, T2> BorshSchema for (T0, T1, T2) where
T0: BorshSchema,
T1: BorshSchema,
T2: BorshSchema,
[src]impl<T0, T1, T2, T3> BorshSchema for (T0, T1, T2, T3) where
T0: BorshSchema,
T1: BorshSchema,
T2: BorshSchema,
T3: BorshSchema,
[src]
impl<T0, T1, T2, T3> BorshSchema for (T0, T1, T2, T3) where
T0: BorshSchema,
T1: BorshSchema,
T2: BorshSchema,
T3: BorshSchema,
[src]impl<T0, T1, T2, T3, T4> BorshSchema for (T0, T1, T2, T3, T4) where
T0: BorshSchema,
T1: BorshSchema,
T2: BorshSchema,
T3: BorshSchema,
T4: BorshSchema,
[src]
impl<T0, T1, T2, T3, T4> BorshSchema for (T0, T1, T2, T3, T4) where
T0: BorshSchema,
T1: BorshSchema,
T2: BorshSchema,
T3: BorshSchema,
T4: BorshSchema,
[src]impl<T0, T1, T2, T3, T4, T5> BorshSchema for (T0, T1, T2, T3, T4, T5) where
T0: BorshSchema,
T1: BorshSchema,
T2: BorshSchema,
T3: BorshSchema,
T4: BorshSchema,
T5: BorshSchema,
[src]
impl<T0, T1, T2, T3, T4, T5> BorshSchema for (T0, T1, T2, T3, T4, T5) where
T0: BorshSchema,
T1: BorshSchema,
T2: BorshSchema,
T3: BorshSchema,
T4: BorshSchema,
T5: BorshSchema,
[src]impl<T0, T1, T2, T3, T4, T5, T6> BorshSchema for (T0, T1, T2, T3, T4, T5, T6) where
T0: BorshSchema,
T1: BorshSchema,
T2: BorshSchema,
T3: BorshSchema,
T4: BorshSchema,
T5: BorshSchema,
T6: BorshSchema,
[src]
impl<T0, T1, T2, T3, T4, T5, T6> BorshSchema for (T0, T1, T2, T3, T4, T5, T6) where
T0: BorshSchema,
T1: BorshSchema,
T2: BorshSchema,
T3: BorshSchema,
T4: BorshSchema,
T5: BorshSchema,
T6: BorshSchema,
[src]impl<T0, T1, T2, T3, T4, T5, T6, T7> BorshSchema for (T0, T1, T2, T3, T4, T5, T6, T7) where
T0: BorshSchema,
T1: BorshSchema,
T2: BorshSchema,
T3: BorshSchema,
T4: BorshSchema,
T5: BorshSchema,
T6: BorshSchema,
T7: BorshSchema,
[src]
impl<T0, T1, T2, T3, T4, T5, T6, T7> BorshSchema for (T0, T1, T2, T3, T4, T5, T6, T7) where
T0: BorshSchema,
T1: BorshSchema,
T2: BorshSchema,
T3: BorshSchema,
T4: BorshSchema,
T5: BorshSchema,
T6: BorshSchema,
T7: BorshSchema,
[src]impl<T0, T1, T2, T3, T4, T5, T6, T7, T8> BorshSchema for (T0, T1, T2, T3, T4, T5, T6, T7, T8) where
T0: BorshSchema,
T1: BorshSchema,
T2: BorshSchema,
T3: BorshSchema,
T4: BorshSchema,
T5: BorshSchema,
T6: BorshSchema,
T7: BorshSchema,
T8: BorshSchema,
[src]
impl<T0, T1, T2, T3, T4, T5, T6, T7, T8> BorshSchema for (T0, T1, T2, T3, T4, T5, T6, T7, T8) where
T0: BorshSchema,
T1: BorshSchema,
T2: BorshSchema,
T3: BorshSchema,
T4: BorshSchema,
T5: BorshSchema,
T6: BorshSchema,
T7: BorshSchema,
T8: BorshSchema,
[src]impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9> BorshSchema for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9) where
T0: BorshSchema,
T1: BorshSchema,
T2: BorshSchema,
T3: BorshSchema,
T4: BorshSchema,
T5: BorshSchema,
T6: BorshSchema,
T7: BorshSchema,
T8: BorshSchema,
T9: BorshSchema,
[src]
impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9> BorshSchema for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9) where
T0: BorshSchema,
T1: BorshSchema,
T2: BorshSchema,
T3: BorshSchema,
T4: BorshSchema,
T5: BorshSchema,
T6: BorshSchema,
T7: BorshSchema,
T8: BorshSchema,
T9: BorshSchema,
[src]impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> BorshSchema for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10) where
T0: BorshSchema,
T1: BorshSchema,
T2: BorshSchema,
T3: BorshSchema,
T4: BorshSchema,
T5: BorshSchema,
T6: BorshSchema,
T7: BorshSchema,
T8: BorshSchema,
T9: BorshSchema,
T10: BorshSchema,
[src]
impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> BorshSchema for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10) where
T0: BorshSchema,
T1: BorshSchema,
T2: BorshSchema,
T3: BorshSchema,
T4: BorshSchema,
T5: BorshSchema,
T6: BorshSchema,
T7: BorshSchema,
T8: BorshSchema,
T9: BorshSchema,
T10: BorshSchema,
[src]impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> BorshSchema for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11) where
T0: BorshSchema,
T1: BorshSchema,
T2: BorshSchema,
T3: BorshSchema,
T4: BorshSchema,
T5: BorshSchema,
T6: BorshSchema,
T7: BorshSchema,
T8: BorshSchema,
T9: BorshSchema,
T10: BorshSchema,
T11: BorshSchema,
[src]
impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> BorshSchema for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11) where
T0: BorshSchema,
T1: BorshSchema,
T2: BorshSchema,
T3: BorshSchema,
T4: BorshSchema,
T5: BorshSchema,
T6: BorshSchema,
T7: BorshSchema,
T8: BorshSchema,
T9: BorshSchema,
T10: BorshSchema,
T11: BorshSchema,
[src]impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> BorshSchema for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12) where
T0: BorshSchema,
T1: BorshSchema,
T2: BorshSchema,
T3: BorshSchema,
T4: BorshSchema,
T5: BorshSchema,
T6: BorshSchema,
T7: BorshSchema,
T8: BorshSchema,
T9: BorshSchema,
T10: BorshSchema,
T11: BorshSchema,
T12: BorshSchema,
[src]
impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> BorshSchema for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12) where
T0: BorshSchema,
T1: BorshSchema,
T2: BorshSchema,
T3: BorshSchema,
T4: BorshSchema,
T5: BorshSchema,
T6: BorshSchema,
T7: BorshSchema,
T8: BorshSchema,
T9: BorshSchema,
T10: BorshSchema,
T11: BorshSchema,
T12: BorshSchema,
[src]impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> BorshSchema for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13) where
T0: BorshSchema,
T1: BorshSchema,
T2: BorshSchema,
T3: BorshSchema,
T4: BorshSchema,
T5: BorshSchema,
T6: BorshSchema,
T7: BorshSchema,
T8: BorshSchema,
T9: BorshSchema,
T10: BorshSchema,
T11: BorshSchema,
T12: BorshSchema,
T13: BorshSchema,
[src]
impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> BorshSchema for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13) where
T0: BorshSchema,
T1: BorshSchema,
T2: BorshSchema,
T3: BorshSchema,
T4: BorshSchema,
T5: BorshSchema,
T6: BorshSchema,
T7: BorshSchema,
T8: BorshSchema,
T9: BorshSchema,
T10: BorshSchema,
T11: BorshSchema,
T12: BorshSchema,
T13: BorshSchema,
[src]impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> BorshSchema for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14) where
T0: BorshSchema,
T1: BorshSchema,
T2: BorshSchema,
T3: BorshSchema,
T4: BorshSchema,
T5: BorshSchema,
T6: BorshSchema,
T7: BorshSchema,
T8: BorshSchema,
T9: BorshSchema,
T10: BorshSchema,
T11: BorshSchema,
T12: BorshSchema,
T13: BorshSchema,
T14: BorshSchema,
[src]
impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> BorshSchema for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14) where
T0: BorshSchema,
T1: BorshSchema,
T2: BorshSchema,
T3: BorshSchema,
T4: BorshSchema,
T5: BorshSchema,
T6: BorshSchema,
T7: BorshSchema,
T8: BorshSchema,
T9: BorshSchema,
T10: BorshSchema,
T11: BorshSchema,
T12: BorshSchema,
T13: BorshSchema,
T14: BorshSchema,
[src]impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> BorshSchema for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15) where
T0: BorshSchema,
T1: BorshSchema,
T2: BorshSchema,
T3: BorshSchema,
T4: BorshSchema,
T5: BorshSchema,
T6: BorshSchema,
T7: BorshSchema,
T8: BorshSchema,
T9: BorshSchema,
T10: BorshSchema,
T11: BorshSchema,
T12: BorshSchema,
T13: BorshSchema,
T14: BorshSchema,
T15: BorshSchema,
[src]
impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> BorshSchema for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15) where
T0: BorshSchema,
T1: BorshSchema,
T2: BorshSchema,
T3: BorshSchema,
T4: BorshSchema,
T5: BorshSchema,
T6: BorshSchema,
T7: BorshSchema,
T8: BorshSchema,
T9: BorshSchema,
T10: BorshSchema,
T11: BorshSchema,
T12: BorshSchema,
T13: BorshSchema,
T14: BorshSchema,
T15: BorshSchema,
[src]impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> BorshSchema for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16) where
T0: BorshSchema,
T1: BorshSchema,
T2: BorshSchema,
T3: BorshSchema,
T4: BorshSchema,
T5: BorshSchema,
T6: BorshSchema,
T7: BorshSchema,
T8: BorshSchema,
T9: BorshSchema,
T10: BorshSchema,
T11: BorshSchema,
T12: BorshSchema,
T13: BorshSchema,
T14: BorshSchema,
T15: BorshSchema,
T16: BorshSchema,
[src]
impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> BorshSchema for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16) where
T0: BorshSchema,
T1: BorshSchema,
T2: BorshSchema,
T3: BorshSchema,
T4: BorshSchema,
T5: BorshSchema,
T6: BorshSchema,
T7: BorshSchema,
T8: BorshSchema,
T9: BorshSchema,
T10: BorshSchema,
T11: BorshSchema,
T12: BorshSchema,
T13: BorshSchema,
T14: BorshSchema,
T15: BorshSchema,
T16: BorshSchema,
[src]impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17> BorshSchema for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17) where
T0: BorshSchema,
T1: BorshSchema,
T2: BorshSchema,
T3: BorshSchema,
T4: BorshSchema,
T5: BorshSchema,
T6: BorshSchema,
T7: BorshSchema,
T8: BorshSchema,
T9: BorshSchema,
T10: BorshSchema,
T11: BorshSchema,
T12: BorshSchema,
T13: BorshSchema,
T14: BorshSchema,
T15: BorshSchema,
T16: BorshSchema,
T17: BorshSchema,
[src]
impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17> BorshSchema for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17) where
T0: BorshSchema,
T1: BorshSchema,
T2: BorshSchema,
T3: BorshSchema,
T4: BorshSchema,
T5: BorshSchema,
T6: BorshSchema,
T7: BorshSchema,
T8: BorshSchema,
T9: BorshSchema,
T10: BorshSchema,
T11: BorshSchema,
T12: BorshSchema,
T13: BorshSchema,
T14: BorshSchema,
T15: BorshSchema,
T16: BorshSchema,
T17: BorshSchema,
[src]impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18> BorshSchema for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18) where
T0: BorshSchema,
T1: BorshSchema,
T2: BorshSchema,
T3: BorshSchema,
T4: BorshSchema,
T5: BorshSchema,
T6: BorshSchema,
T7: BorshSchema,
T8: BorshSchema,
T9: BorshSchema,
T10: BorshSchema,
T11: BorshSchema,
T12: BorshSchema,
T13: BorshSchema,
T14: BorshSchema,
T15: BorshSchema,
T16: BorshSchema,
T17: BorshSchema,
T18: BorshSchema,
[src]
impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18> BorshSchema for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18) where
T0: BorshSchema,
T1: BorshSchema,
T2: BorshSchema,
T3: BorshSchema,
T4: BorshSchema,
T5: BorshSchema,
T6: BorshSchema,
T7: BorshSchema,
T8: BorshSchema,
T9: BorshSchema,
T10: BorshSchema,
T11: BorshSchema,
T12: BorshSchema,
T13: BorshSchema,
T14: BorshSchema,
T15: BorshSchema,
T16: BorshSchema,
T17: BorshSchema,
T18: BorshSchema,
[src]impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19> BorshSchema for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19) where
T0: BorshSchema,
T1: BorshSchema,
T2: BorshSchema,
T3: BorshSchema,
T4: BorshSchema,
T5: BorshSchema,
T6: BorshSchema,
T7: BorshSchema,
T8: BorshSchema,
T9: BorshSchema,
T10: BorshSchema,
T11: BorshSchema,
T12: BorshSchema,
T13: BorshSchema,
T14: BorshSchema,
T15: BorshSchema,
T16: BorshSchema,
T17: BorshSchema,
T18: BorshSchema,
T19: BorshSchema,
[src]
impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19> BorshSchema for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19) where
T0: BorshSchema,
T1: BorshSchema,
T2: BorshSchema,
T3: BorshSchema,
T4: BorshSchema,
T5: BorshSchema,
T6: BorshSchema,
T7: BorshSchema,
T8: BorshSchema,
T9: BorshSchema,
T10: BorshSchema,
T11: BorshSchema,
T12: BorshSchema,
T13: BorshSchema,
T14: BorshSchema,
T15: BorshSchema,
T16: BorshSchema,
T17: BorshSchema,
T18: BorshSchema,
T19: BorshSchema,
[src]impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20> BorshSchema for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20) where
T0: BorshSchema,
T1: BorshSchema,
T2: BorshSchema,
T3: BorshSchema,
T4: BorshSchema,
T5: BorshSchema,
T6: BorshSchema,
T7: BorshSchema,
T8: BorshSchema,
T9: BorshSchema,
T10: BorshSchema,
T11: BorshSchema,
T12: BorshSchema,
T13: BorshSchema,
T14: BorshSchema,
T15: BorshSchema,
T16: BorshSchema,
T17: BorshSchema,
T18: BorshSchema,
T19: BorshSchema,
T20: BorshSchema,
[src]
impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20> BorshSchema for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20) where
T0: BorshSchema,
T1: BorshSchema,
T2: BorshSchema,
T3: BorshSchema,
T4: BorshSchema,
T5: BorshSchema,
T6: BorshSchema,
T7: BorshSchema,
T8: BorshSchema,
T9: BorshSchema,
T10: BorshSchema,
T11: BorshSchema,
T12: BorshSchema,
T13: BorshSchema,
T14: BorshSchema,
T15: BorshSchema,
T16: BorshSchema,
T17: BorshSchema,
T18: BorshSchema,
T19: BorshSchema,
T20: BorshSchema,
[src]Implementors
impl BorshSchema for BorshSchemaContainer where
Declaration: BorshSchema,
HashMap<Declaration, Definition>: BorshSchema,
[src]
impl BorshSchema for BorshSchemaContainer where
Declaration: BorshSchema,
HashMap<Declaration, Definition>: BorshSchema,
[src]impl BorshSchema for Hash where
[u8; 32]: BorshSchema,
impl BorshSchema for Hash where
[u8; 32]: BorshSchema,
impl BorshSchema for Hash where
[u8; 32]: BorshSchema,
impl BorshSchema for Hash where
[u8; 32]: BorshSchema,
impl BorshSchema for Pubkey where
[u8; 32]: BorshSchema,
impl BorshSchema for Pubkey where
[u8; 32]: BorshSchema,
impl BorshSchema for Secp256k1Pubkey where
[u8; 64]: BorshSchema,
impl BorshSchema for Secp256k1Pubkey where
[u8; 64]: BorshSchema,