Enum borsh::schema::Fields [−][src]
The collection representing the fields of a struct.
Variants
NamedFields(Vec<(FieldName, Declaration)>)
The struct with named fields.
UnnamedFields(Vec<Declaration>)
The struct with unnamed fields, structurally identical to a tuple.
The struct with no fields.
Trait Implementations
impl BorshDeserialize for Fields where
Vec<(FieldName, Declaration)>: BorshDeserialize,
Vec<Declaration>: BorshDeserialize,
[src]
Vec<(FieldName, Declaration)>: BorshDeserialize,
Vec<Declaration>: 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 Fields
[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 Fields where
Vec<(FieldName, Declaration)>: BorshSerialize,
Vec<Declaration>: BorshSerialize,
[src]
Vec<(FieldName, Declaration)>: BorshSerialize,
Vec<Declaration>: 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 Fields
[src]
impl PartialEq<Fields> for Fields
[src]
impl StructuralPartialEq for Fields
[src]
Auto Trait Implementations
impl RefUnwindSafe for Fields
impl Send for Fields
impl Sync for Fields
impl Unpin for Fields
impl UnwindSafe for Fields
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>,