pub struct ParamDesc {
pub address: Address,
pub writable: bool,
}Fields§
§address: Address§writable: boolTrait Implementations§
Source§impl BorshDeserialize for ParamDesc
impl BorshDeserialize for ParamDesc
Source§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.
Source§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.
Source§fn is_u8() -> bool
fn is_u8() -> bool
Whether Self is u8.
NOTE:
Vec<u8> is the most common use-case for serialization and deserialization, it’s
worth handling it as a special case to improve performance.
It’s a workaround for specific Vec<u8> implementation versus generic Vec<T>
implementation. See https://github.com/rust-lang/rfcs/pull/1210 for details.Source§impl BorshSchema for ParamDesc
impl BorshSchema for ParamDesc
Source§fn declaration() -> Declaration
fn declaration() -> Declaration
Get the name of the type without brackets.
Source§fn add_definitions_recursively(
definitions: &mut HashMap<Declaration, Definition>,
)
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 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
Source§impl BorshSerialize for ParamDesc
impl BorshSerialize for ParamDesc
fn serialize<W: Write>(&self, writer: &mut W) -> Result<(), Error>
Source§fn try_to_vec(&self) -> Result<Vec<u8>, Error>
fn try_to_vec(&self) -> Result<Vec<u8>, Error>
Serialize this instance into a vector of bytes.
Source§fn is_u8() -> bool
fn is_u8() -> bool
Whether Self is u8.
NOTE:
Vec<u8> is the most common use-case for serialization and deserialization, it’s
worth handling it as a special case to improve performance.
It’s a workaround for specific Vec<u8> implementation versus generic Vec<T>
implementation. See https://github.com/rust-lang/rfcs/pull/1210 for details.impl Eq for ParamDesc
impl StructuralPartialEq for ParamDesc
Auto Trait Implementations§
impl Freeze for ParamDesc
impl RefUnwindSafe for ParamDesc
impl Send for ParamDesc
impl Sync for ParamDesc
impl Unpin for ParamDesc
impl UnwindSafe for ParamDesc
Blanket Implementations§
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