Enum borsh::schema::Definition [−][src]
The type that we use to represent the definition of the Borsh type.
Variants
A fixed-size array with the length known at the compile time and the same-type elements.
Fields of Array
length: u32elements: DeclarationA sequence of elements of length known at the run time and the same-type elements.
Fields of Sequence
elements: DeclarationA fixed-size tuple with the length known at the compile time and the elements of different types.
Fields of Tuple
elements: Vec<Declaration>A tagged union, a.k.a enum. Tagged-unions have variants with associated structures.
Fields of Enum
variants: Vec<(VariantName, Declaration)>A structure, structurally similar to a tuple.
Fields of Struct
fields: FieldsTrait Implementations
impl BorshDeserialize for Definition where
u32: BorshDeserialize,
Declaration: BorshDeserialize,
Declaration: BorshDeserialize,
Vec<Declaration>: BorshDeserialize,
Vec<(VariantName, Declaration)>: BorshDeserialize,
Fields: BorshDeserialize, [src]
u32: BorshDeserialize,
Declaration: BorshDeserialize,
Declaration: BorshDeserialize,
Vec<Declaration>: BorshDeserialize,
Vec<(VariantName, Declaration)>: BorshDeserialize,
Fields: BorshDeserialize,
fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>[src]
fn try_from_slice(v: &[u8]) -> Result<Self>[src]
fn is_u8() -> bool[src]
impl BorshSchema for Definition[src]
fn declaration() -> Declaration[src]
fn add_definitions_recursively(
definitions: &mut HashMap<Declaration, Definition>
)[src]
definitions: &mut HashMap<Declaration, Definition>
)
fn add_definition(
declaration: Declaration,
definition: Definition,
definitions: &mut HashMap<Declaration, Definition>
)[src]
declaration: Declaration,
definition: Definition,
definitions: &mut HashMap<Declaration, Definition>
)
fn schema_container() -> BorshSchemaContainer[src]
impl BorshSerialize for Definition where
u32: BorshSerialize,
Declaration: BorshSerialize,
Declaration: BorshSerialize,
Vec<Declaration>: BorshSerialize,
Vec<(VariantName, Declaration)>: BorshSerialize,
Fields: BorshSerialize, [src]
u32: BorshSerialize,
Declaration: BorshSerialize,
Declaration: BorshSerialize,
Vec<Declaration>: BorshSerialize,
Vec<(VariantName, Declaration)>: BorshSerialize,
Fields: BorshSerialize,
fn serialize<W: Write>(&self, writer: &mut W) -> Result<(), Error>[src]
fn try_to_vec(&self) -> Result<Vec<u8>>[src]
fn is_u8() -> bool[src]
impl Debug for Definition[src]
impl PartialEq<Definition> for Definition[src]
fn eq(&self, other: &Definition) -> bool[src]
fn ne(&self, other: &Definition) -> bool[src]
impl StructuralPartialEq for Definition[src]
Auto Trait Implementations
impl RefUnwindSafe for Definition
impl Send for Definition
impl Sync for Definition
impl Unpin for Definition
impl UnwindSafe for Definition
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut Tⓘ[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,