#[repr(C)]pub struct Account {
pub mint: Pubkey,
pub owner: Pubkey,
pub state: AccountState,
/* private fields */
}
Expand description
Internal representation of a token account data.
Fields§
§mint: Pubkey
The mint associated with this account
owner: Pubkey
The owner of this account.
state: AccountState
The account’s state.
Implementations§
Source§impl Account
impl Account
pub fn set_amount(&mut self, amount: u64)
pub fn amount(&self) -> u64
pub fn clear_delegate(&mut self)
pub fn set_delegate(&mut self, delegate: &Pubkey)
pub fn delegate(&self) -> Option<&Pubkey>
pub fn set_native(&mut self, value: bool)
pub fn is_native(&self) -> bool
pub fn set_native_amount(&mut self, amount: u64)
pub fn native_amount(&self) -> Option<u64>
pub fn set_delegated_amount(&mut self, amount: u64)
pub fn delegated_amount(&self) -> u64
pub fn is_frozen(&self) -> bool
pub fn is_owned_by_system_program_or_incinerator(&self) -> bool
Trait Implementations§
Source§impl Initializable for Account
impl Initializable for Account
Source§fn is_initialized(&self) -> bool
fn is_initialized(&self) -> bool
Return
true
if the object is initialized.Auto Trait Implementations§
impl Freeze for Account
impl RefUnwindSafe for Account
impl Send for Account
impl Sync for Account
impl Unpin for Account
impl UnwindSafe for Account
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