[−][src]Struct solana_sdk::account_info::AccountInfo
Account information
Fields
key: &'a Pubkey
Public key of the account
is_signer: bool
is_writable: bool
lamports: Rc<RefCell<&'a mut u64>>
Account members that are mutable by the program
data: Rc<RefCell<&'a mut [u8]>>
Account members that are mutable by the program
owner: &'a Pubkey
Program that owns this account
executable: bool
This account's data contains a loaded program (and is now read-only)
rent_epoch: Epoch
The epoch at which this account will next owe rent
Methods
impl<'a> AccountInfo<'a>
[src]
pub fn signer_key(&self) -> Option<&Pubkey>
[src]
pub fn unsigned_key(&self) -> &Pubkey
[src]
pub fn lamports(&self) -> u64
[src]
pub fn try_lamports(&self) -> Result<u64, ProgramError>
[src]
pub fn data_len(&self) -> usize
[src]
pub fn try_data_len(&self) -> Result<usize, ProgramError>
[src]
pub fn data_is_empty(&self) -> bool
[src]
pub fn try_data_is_empty(&self) -> Result<bool, ProgramError>
[src]
pub fn try_borrow_lamports(&self) -> Result<Ref<&mut u64>, ProgramError>
[src]
pub fn try_borrow_mut_lamports(
&self
) -> Result<RefMut<&'a mut u64>, ProgramError>
[src]
&self
) -> Result<RefMut<&'a mut u64>, ProgramError>
pub fn try_borrow_data(&self) -> Result<Ref<&mut [u8]>, ProgramError>
[src]
pub fn try_borrow_mut_data(&self) -> Result<RefMut<&'a mut [u8]>, ProgramError>
[src]
pub fn new(
key: &'a Pubkey,
is_signer: bool,
is_writable: bool,
lamports: &'a mut u64,
data: &'a mut [u8],
owner: &'a Pubkey,
executable: bool,
rent_epoch: Epoch
) -> Self
[src]
key: &'a Pubkey,
is_signer: bool,
is_writable: bool,
lamports: &'a mut u64,
data: &'a mut [u8],
owner: &'a Pubkey,
executable: bool,
rent_epoch: Epoch
) -> Self
pub fn deserialize_data<T: DeserializeOwned>(&self) -> Result<T, Error>
[src]
pub fn serialize_data<T: Serialize>(&mut self, state: &T) -> Result<(), Error>
[src]
Trait Implementations
impl<'a> Clone for AccountInfo<'a>
[src]
fn clone(&self) -> AccountInfo<'a>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<'a> Debug for AccountInfo<'a>
[src]
impl<'a> From<&'a mut (Pubkey, Account)> for AccountInfo<'a>
[src]
impl<'a> From<(&'a Pubkey, &'a mut Account)> for AccountInfo<'a>
[src]
impl<'a> From<(&'a Pubkey, bool, &'a mut Account)> for AccountInfo<'a>
[src]
Auto Trait Implementations
impl<'a> !RefUnwindSafe for AccountInfo<'a>
impl<'a> !Send for AccountInfo<'a>
impl<'a> !Sync for AccountInfo<'a>
impl<'a> Unpin for AccountInfo<'a>
impl<'a> !UnwindSafe for AccountInfo<'a>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,