Struct clockwork_sdk::state::AccountMetaData
source · Expand description
Account metadata needed to execute an instruction on Solana.
Fields§
§pubkey: PubkeyAn account’s public key
is_signer: boolTrue if an Instruction requires a Transaction signature matching pubkey.
is_writable: boolTrue if the pubkey can be loaded as a read-write account.
Implementations§
source§impl AccountMetaData
impl AccountMetaData
sourcepub fn new(pubkey: Pubkey, is_signer: bool) -> AccountMetaData
pub fn new(pubkey: Pubkey, is_signer: bool) -> AccountMetaData
Construct metadata for a writable account.
sourcepub fn new_readonly(pubkey: Pubkey, is_signer: bool) -> AccountMetaData
pub fn new_readonly(pubkey: Pubkey, is_signer: bool) -> AccountMetaData
Construct metadata for a read-only account.
Trait Implementations§
source§impl BorshDeserialize for AccountMetaDatawhere
Pubkey: BorshDeserialize,
bool: BorshDeserialize,
impl BorshDeserialize for AccountMetaDatawhere
Pubkey: BorshDeserialize,
bool: BorshDeserialize,
source§fn deserialize(buf: &mut &[u8]) -> Result<AccountMetaData, Error>
fn deserialize(buf: &mut &[u8]) -> Result<AccountMetaData, Error>
Deserializes this instance from a given slice of bytes.
Updates the buffer to point at the remaining bytes. Read more
§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§impl BorshSchema for AccountMetaDatawhere
Pubkey: BorshSchema,
bool: BorshSchema,
impl BorshSchema for AccountMetaDatawhere
Pubkey: BorshSchema,
bool: BorshSchema,
source§fn declaration() -> String
fn declaration() -> String
Get the name of the type without brackets.
source§fn add_definitions_recursively(
definitions: &mut HashMap<String, Definition, RandomState>
)
fn add_definitions_recursively(
definitions: &mut HashMap<String, Definition, RandomState>
)
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. Read more
§fn add_definition(
declaration: String,
definition: Definition,
definitions: &mut HashMap<String, Definition, RandomState>
)
fn add_definition(
declaration: String,
definition: Definition,
definitions: &mut HashMap<String, Definition, RandomState>
)
Helper method to add a single type definition to the map.
fn schema_container() -> BorshSchemaContainer
source§impl BorshSerialize for AccountMetaDatawhere
Pubkey: BorshSerialize,
bool: BorshSerialize,
impl BorshSerialize for AccountMetaDatawhere
Pubkey: BorshSerialize,
bool: BorshSerialize,
source§impl Clone for AccountMetaData
impl Clone for AccountMetaData
source§fn clone(&self) -> AccountMetaData
fn clone(&self) -> AccountMetaData
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