Struct solana_sdk::keyed_account::KeyedAccount
source · #[repr(C)]pub struct KeyedAccount<'a> {
pub account: &'a RefCell<AccountSharedData>,
/* private fields */
}
Fields§
§account: &'a RefCell<AccountSharedData>
Implementations§
source§impl<'a> KeyedAccount<'a>
impl<'a> KeyedAccount<'a>
pub fn signer_key(&self) -> Option<&Pubkey>
pub fn unsigned_key(&self) -> &Pubkey
pub fn is_writable(&self) -> bool
pub fn lamports(&self) -> Result<u64, InstructionError>
pub fn data_len(&self) -> Result<usize, InstructionError>
pub fn data_is_empty(&self) -> Result<bool, InstructionError>
pub fn owner(&self) -> Result<Pubkey, InstructionError>
pub fn executable(&self) -> Result<bool, InstructionError>
pub fn rent_epoch(&self) -> Result<Epoch, InstructionError>
pub fn try_account_ref(
&'a self
) -> Result<Ref<'_, AccountSharedData>, InstructionError>
pub fn try_account_ref_mut(
&'a self
) -> Result<RefMut<'_, AccountSharedData>, InstructionError>
pub fn new(
key: &'a Pubkey,
is_signer: bool,
account: &'a RefCell<AccountSharedData>
) -> Self
pub fn new_readonly(
key: &'a Pubkey,
is_signer: bool,
account: &'a RefCell<AccountSharedData>
) -> Self
Trait Implementations§
source§impl<'a> Clone for KeyedAccount<'a>
impl<'a> Clone for KeyedAccount<'a>
source§fn clone(&self) -> KeyedAccount<'a>
fn clone(&self) -> KeyedAccount<'a>
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