Struct solana_sdk::account::AccountSharedData [−][src]
pub struct AccountSharedData { 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 This will become a new in-memory representation of the ‘Account’ struct data. The existing ‘Account’ structure cannot easily change due to downstream projects. This struct will shortly rely on something like the ReadableAccount trait for access to the fields.
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
Returns the “default value” for a type. Read more
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.
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl RefUnwindSafe for AccountSharedData
impl Send for AccountSharedData
impl Sync for AccountSharedData
impl Unpin for AccountSharedData
impl UnwindSafe for AccountSharedData
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