Struct solana_sdk::account::Account [−][src]
#[repr(C)]pub struct Account { pub lamports: u64, pub data: Vec<u8>, pub owner: Pubkey, pub executable: bool, pub rent_epoch: Epoch, }
Expand description
An Account with data that is stored on chain
Fields
lamports: u64
lamports in the account
data: Vec<u8>
data held in this account
owner: Pubkey
the program that owns this account. If executable, the program that loads 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
Implementations
pub fn new_ref_data<T: Serialize>(
lamports: u64,
state: &T,
owner: &Pubkey
) -> Result<RefCell<Self>, Error>
pub fn new_data_with_space<T: Serialize>(
lamports: u64,
state: &T,
space: usize,
owner: &Pubkey
) -> Result<Self, Error>
Trait Implementations
Return the information required to construct an AccountInfo
. Used by the
AccountInfo
conversion implementations.
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Performs the conversion.
Auto Trait Implementations
impl RefUnwindSafe for Account
impl UnwindSafe for Account
Blanket Implementations
pub default fn visit_for_abi(
&self,
digester: &mut AbiDigester
) -> Result<AbiDigester, DigestError>
pub default fn visit_for_abi(
&self,
_digester: &mut AbiDigester
) -> Result<AbiDigester, DigestError>
Mutably borrows from an owned value. Read more
type Output = T
type Output = T
Should always be Self
pub fn vzip(self) -> V