Struct solana_sdk::keyed_account::KeyedAccount
source · [−]#[repr(C)]pub struct KeyedAccount<'a> {
pub account: &'a RefCell<AccountSharedData>,
/* private fields */
}
Please use BorrowedAccount instead of KeyedAccount
Fields
account: &'a RefCell<AccountSharedData>
Please use BorrowedAccount instead of KeyedAccount
Implementations
sourceimpl<'a> KeyedAccount<'a>
impl<'a> KeyedAccount<'a>
pub fn signer_key(&self) -> Option<&Pubkey>
Please use BorrowedAccount instead of KeyedAccount
pub fn unsigned_key(&self) -> &Pubkey
Please use BorrowedAccount instead of KeyedAccount
pub fn is_writable(&self) -> bool
Please use BorrowedAccount instead of KeyedAccount
pub fn lamports(&self) -> Result<u64, InstructionError>
Please use BorrowedAccount instead of KeyedAccount
pub fn data_len(&self) -> Result<usize, InstructionError>
Please use BorrowedAccount instead of KeyedAccount
pub fn data_is_empty(&self) -> Result<bool, InstructionError>
Please use BorrowedAccount instead of KeyedAccount
pub fn owner(&self) -> Result<Pubkey, InstructionError>
Please use BorrowedAccount instead of KeyedAccount
pub fn executable(&self) -> Result<bool, InstructionError>
Please use BorrowedAccount instead of KeyedAccount
pub fn rent_epoch(&self) -> Result<Epoch, InstructionError>
Please use BorrowedAccount instead of KeyedAccount
pub fn try_account_ref(
&'a self
) -> Result<Ref<'_, AccountSharedData>, InstructionError>
Please use BorrowedAccount instead of KeyedAccount
pub fn try_account_ref_mut(
&'a self
) -> Result<RefMut<'_, AccountSharedData>, InstructionError>
Please use BorrowedAccount instead of KeyedAccount
pub fn new(
key: &'a Pubkey,
is_signer: bool,
account: &'a RefCell<AccountSharedData>
) -> Self
Please use BorrowedAccount instead of KeyedAccount
pub fn new_readonly(
key: &'a Pubkey,
is_signer: bool,
account: &'a RefCell<AccountSharedData>
) -> Self
Please use BorrowedAccount instead of KeyedAccount
Trait Implementations
sourceimpl<'a> Clone for KeyedAccount<'a>
impl<'a> Clone for KeyedAccount<'a>
sourcefn clone(&self) -> KeyedAccount<'a>
fn clone(&self) -> KeyedAccount<'a>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl<'a> Debug for KeyedAccount<'a>
impl<'a> Debug for KeyedAccount<'a>
sourcefn from(
(key, account): &'a (&'a Pubkey, &'a RefCell<AccountSharedData>)
) -> Self
fn from(
(key, account): &'a (&'a Pubkey, &'a RefCell<AccountSharedData>)
) -> Self
Converts to this type from the input type.
sourcefn from((key, account): (&'a Pubkey, &'a RefCell<AccountSharedData>)) -> Self
fn from((key, account): (&'a Pubkey, &'a RefCell<AccountSharedData>)) -> Self
Converts to this type from the input type.
sourceimpl<'a> PartialEq<KeyedAccount<'a>> for KeyedAccount<'a>
impl<'a> PartialEq<KeyedAccount<'a>> for KeyedAccount<'a>
sourceimpl<'a, T> State<T> for KeyedAccount<'a> where
T: Serialize + DeserializeOwned,
impl<'a, T> State<T> for KeyedAccount<'a> where
T: Serialize + DeserializeOwned,
fn state(&self) -> Result<T, InstructionError>
fn set_state(&self, state: &T) -> Result<(), InstructionError>
Auto Trait Implementations
impl<'a> !RefUnwindSafe for KeyedAccount<'a>
impl<'a> !Send for KeyedAccount<'a>
impl<'a> !Sync for KeyedAccount<'a>
impl<'a> Unpin for KeyedAccount<'a>
impl<'a> !UnwindSafe for KeyedAccount<'a>
Blanket Implementations
sourceimpl<T> AbiExample for T
impl<T> AbiExample for T
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more