Struct clockwork_sdk::state::SerializableAccount
pub struct SerializableAccount {
pub pubkey: Pubkey,
pub is_signer: bool,
pub is_writable: bool,
}
Expand description
Account metadata needed to execute an instruction on Solana.
Fields§
§pubkey: Pubkey
An account’s public key
is_signer: bool
True if an Instruction requires a Transaction signature matching pubkey
.
is_writable: bool
True if the pubkey
can be loaded as a read-write account.
Implementations§
§impl SerializableAccount
impl SerializableAccount
pub fn mutable(pubkey: Pubkey, signer: bool) -> SerializableAccount
pub fn mutable(pubkey: Pubkey, signer: bool) -> SerializableAccount
Construct metadata for a writable account.
pub fn readonly(pubkey: Pubkey, signer: bool) -> SerializableAccount
pub fn readonly(pubkey: Pubkey, signer: bool) -> SerializableAccount
Construct metadata for a read-only account.
Trait Implementations§
§impl BorshDeserialize for SerializableAccountwhere
Pubkey: BorshDeserialize,
bool: BorshDeserialize,
impl BorshDeserialize for SerializableAccountwhere Pubkey: BorshDeserialize, bool: BorshDeserialize,
§fn deserialize(buf: &mut &[u8]) -> Result<SerializableAccount, Error>
fn deserialize(buf: &mut &[u8]) -> Result<SerializableAccount, 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.
§impl BorshSchema for SerializableAccountwhere
Pubkey: BorshSchema,
bool: BorshSchema,
impl BorshSchema for SerializableAccountwhere Pubkey: BorshSchema, bool: BorshSchema,
§fn declaration() -> String
fn declaration() -> String
Get the name of the type without brackets.
§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.
§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
§impl BorshSerialize for SerializableAccountwhere
Pubkey: BorshSerialize,
bool: BorshSerialize,
impl BorshSerialize for SerializableAccountwhere Pubkey: BorshSerialize, bool: BorshSerialize,
§impl Clone for SerializableAccount
impl Clone for SerializableAccount
§fn clone(&self) -> SerializableAccount
fn clone(&self) -> SerializableAccount
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 SerializableAccount
impl Debug for SerializableAccount
§impl<'de> Deserialize<'de> for SerializableAccount
impl<'de> Deserialize<'de> for SerializableAccount
§fn deserialize<__D>(
__deserializer: __D
) -> Result<SerializableAccount, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>( __deserializer: __D ) -> Result<SerializableAccount, <__D as Deserializer<'de>>::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
§impl Hash for SerializableAccount
impl Hash for SerializableAccount
§impl PartialEq<SerializableAccount> for SerializableAccount
impl PartialEq<SerializableAccount> for SerializableAccount
§fn eq(&self, other: &SerializableAccount) -> bool
fn eq(&self, other: &SerializableAccount) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.§impl Serialize for SerializableAccount
impl Serialize for SerializableAccount
§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where __S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for SerializableAccount
Auto Trait Implementations§
impl RefUnwindSafe for SerializableAccount
impl Send for SerializableAccount
impl Sync for SerializableAccount
impl Unpin for SerializableAccount
impl UnwindSafe for SerializableAccount
Blanket Implementations§
§impl<T> AbiEnumVisitor for Twhere
T: Serialize + AbiExample + ?Sized,
impl<T> AbiEnumVisitor for Twhere T: Serialize + AbiExample + ?Sized,
default fn visit_for_abi( &self, digester: &mut AbiDigester ) -> Result<AbiDigester, DigestError>
§impl<T> AbiEnumVisitor for Twhere
T: Serialize + ?Sized,
impl<T> AbiEnumVisitor for Twhere T: Serialize + ?Sized,
default fn visit_for_abi( &self, _digester: &mut AbiDigester ) -> Result<AbiDigester, DigestError>
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