Struct switchboard_solana::prelude::borsh::schema::BorshSchemaContainer
pub struct BorshSchemaContainer {
pub declaration: String,
pub definitions: HashMap<String, Definition>,
}
Expand description
All schema information needed to deserialize a single type.
Fields§
§declaration: String
Declaration of the type.
definitions: HashMap<String, Definition>
All definitions needed to deserialize the given type.
Trait Implementations§
§impl BorshDeserialize for BorshSchemaContainer
impl BorshDeserialize for BorshSchemaContainer
fn deserialize_reader<R>(reader: &mut R) -> Result<BorshSchemaContainer, Error>where
R: Read,
§fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
Deserializes this instance from a given slice of bytes.
Updates the buffer to point at the remaining bytes.
§fn try_from_slice(v: &[u8]) -> Result<Self, Error>
fn try_from_slice(v: &[u8]) -> Result<Self, Error>
Deserialize this instance from a slice of bytes.
fn try_from_reader<R>(reader: &mut R) -> Result<Self, Error>where
R: Read,
§impl BorshSerialize for BorshSchemaContainer
impl BorshSerialize for BorshSchemaContainer
§impl BorshSchema for BorshSchemaContainer
impl BorshSchema for BorshSchemaContainer
§fn declaration() -> String
fn declaration() -> String
Get the name of the type without brackets.
§fn add_definitions_recursively(definitions: &mut HashMap<String, Definition>)
fn add_definitions_recursively(definitions: &mut HashMap<String, 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.
§fn add_definition(
declaration: String,
definition: Definition,
definitions: &mut HashMap<String, Definition>
)
fn add_definition( declaration: String, definition: Definition, definitions: &mut HashMap<String, Definition> )
Helper method to add a single type definition to the map.
fn schema_container() -> BorshSchemaContainer
§impl Clone for BorshSchemaContainer
impl Clone for BorshSchemaContainer
§fn clone(&self) -> BorshSchemaContainer
fn clone(&self) -> BorshSchemaContainer
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read more§impl Debug for BorshSchemaContainer
impl Debug for BorshSchemaContainer
§impl PartialEq for BorshSchemaContainer
impl PartialEq for BorshSchemaContainer
§fn eq(&self, other: &BorshSchemaContainer) -> bool
fn eq(&self, other: &BorshSchemaContainer) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for BorshSchemaContainer
impl StructuralPartialEq for BorshSchemaContainer
Auto Trait Implementations§
impl RefUnwindSafe for BorshSchemaContainer
impl Send for BorshSchemaContainer
impl Sync for BorshSchemaContainer
impl Unpin for BorshSchemaContainer
impl UnwindSafe for BorshSchemaContainer
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.