#[repr(C)]pub struct KeyedAccount<'a> {
pub account: &'a RefCell<AccountSharedData>,
/* private fields */
}
👎Deprecated since 1.11.0: Please use BorrowedAccount instead of KeyedAccount
Fields§
§account: &'a RefCell<AccountSharedData>
👎Deprecated since 1.11.0: Please use BorrowedAccount instead of KeyedAccount
Implementations§
Source§impl<'a> KeyedAccount<'a>
impl<'a> KeyedAccount<'a>
pub fn signer_key(&self) -> Option<&Pubkey>
👎Deprecated since 1.11.0: Please use BorrowedAccount instead of KeyedAccount
pub fn unsigned_key(&self) -> &Pubkey
👎Deprecated since 1.11.0: Please use BorrowedAccount instead of KeyedAccount
pub fn is_writable(&self) -> bool
👎Deprecated since 1.11.0: Please use BorrowedAccount instead of KeyedAccount
pub fn lamports(&self) -> Result<u64, InstructionError>
👎Deprecated since 1.11.0: Please use BorrowedAccount instead of KeyedAccount
pub fn data_len(&self) -> Result<usize, InstructionError>
👎Deprecated since 1.11.0: Please use BorrowedAccount instead of KeyedAccount
pub fn data_is_empty(&self) -> Result<bool, InstructionError>
👎Deprecated since 1.11.0: Please use BorrowedAccount instead of KeyedAccount
pub fn owner(&self) -> Result<Pubkey, InstructionError>
👎Deprecated since 1.11.0: Please use BorrowedAccount instead of KeyedAccount
pub fn executable(&self) -> Result<bool, InstructionError>
👎Deprecated since 1.11.0: Please use BorrowedAccount instead of KeyedAccount
pub fn rent_epoch(&self) -> Result<Epoch, InstructionError>
👎Deprecated since 1.11.0: Please use BorrowedAccount instead of KeyedAccount
pub fn try_account_ref( &'a self, ) -> Result<Ref<'_, AccountSharedData>, InstructionError>
👎Deprecated since 1.11.0: Please use BorrowedAccount instead of KeyedAccount
pub fn try_account_ref_mut( &'a self, ) -> Result<RefMut<'_, AccountSharedData>, InstructionError>
👎Deprecated since 1.11.0: Please use BorrowedAccount instead of KeyedAccount
pub fn new( key: &'a Pubkey, is_signer: bool, account: &'a RefCell<AccountSharedData>, ) -> Self
👎Deprecated since 1.11.0: Please use BorrowedAccount instead of KeyedAccount
pub fn new_readonly( key: &'a Pubkey, is_signer: bool, account: &'a RefCell<AccountSharedData>, ) -> Self
👎Deprecated since 1.11.0: Please use BorrowedAccount instead of KeyedAccount
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 moreSource§impl<'a> Debug for KeyedAccount<'a>
impl<'a> Debug for KeyedAccount<'a>
Source§impl<'a> PartialEq for KeyedAccount<'a>
impl<'a> PartialEq for KeyedAccount<'a>
Source§impl<'a, T> State<T> for KeyedAccount<'a>where
T: Serialize + DeserializeOwned,
impl<'a, T> State<T> for KeyedAccount<'a>where
T: Serialize + DeserializeOwned,
Auto Trait Implementations§
impl<'a> Freeze for KeyedAccount<'a>
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§
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more