Struct solana_sdk::account::AccountSharedData [−][src]
pub struct AccountSharedData { /* fields omitted */ }
Expand description
An Account with data that is stored on chain This will be the in-memory representation of the ‘Account’ struct data. The existing ‘Account’ structure cannot easily change due to downstream projects.
Implementations
impl AccountSharedData
[src]
impl AccountSharedData
[src]pub fn set_data_from_slice(&mut self, data: &[u8])
[src]
pub fn set_data(&mut self, data: Vec<u8>)
[src]
pub fn new(lamports: u64, space: usize, owner: &Pubkey) -> Self
[src]
pub fn new_ref(lamports: u64, space: usize, owner: &Pubkey) -> Rc<RefCell<Self>>
[src]
pub fn new_data<T: Serialize>(
lamports: u64,
state: &T,
owner: &Pubkey
) -> Result<Self, Error>
[src]
lamports: u64,
state: &T,
owner: &Pubkey
) -> Result<Self, Error>
pub fn new_ref_data<T: Serialize>(
lamports: u64,
state: &T,
owner: &Pubkey
) -> Result<RefCell<Self>, Error>
[src]
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>
[src]
lamports: u64,
state: &T,
space: usize,
owner: &Pubkey
) -> Result<Self, Error>
pub fn new_ref_data_with_space<T: Serialize>(
lamports: u64,
state: &T,
space: usize,
owner: &Pubkey
) -> Result<RefCell<Self>, Error>
[src]
lamports: u64,
state: &T,
space: usize,
owner: &Pubkey
) -> Result<RefCell<Self>, Error>
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 AbiExample for AccountSharedData
[src]
impl AbiExample for AccountSharedData
[src]impl Clone for AccountSharedData
[src]
impl Clone for AccountSharedData
[src]fn clone(&self) -> AccountSharedData
[src]
fn clone(&self) -> AccountSharedData
[src]Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]Performs copy-assignment from source
. Read more
impl Debug for AccountSharedData
[src]
impl Debug for AccountSharedData
[src]impl Default for AccountSharedData
[src]
impl Default for AccountSharedData
[src]fn default() -> AccountSharedData
[src]
fn default() -> AccountSharedData
[src]Returns the “default value” for a type. Read more
impl From<Account> for AccountSharedData
[src]
impl From<Account> for AccountSharedData
[src]impl From<AccountSharedData> for Account
[src]
impl From<AccountSharedData> for Account
[src]fn from(other: AccountSharedData) -> Self
[src]
fn from(other: AccountSharedData) -> Self
[src]Performs the conversion.
impl PartialEq<AccountSharedData> for AccountSharedData
[src]
impl PartialEq<AccountSharedData> for AccountSharedData
[src]fn eq(&self, other: &AccountSharedData) -> bool
[src]
fn eq(&self, other: &AccountSharedData) -> bool
[src]This method tests for self
and other
values to be equal, and is used
by ==
. Read more
fn ne(&self, other: &AccountSharedData) -> bool
[src]
fn ne(&self, other: &AccountSharedData) -> bool
[src]This method tests for !=
.
impl ReadableAccount for AccountSharedData
[src]
impl ReadableAccount for AccountSharedData
[src]impl<T> StateMut<T> for AccountSharedData where
T: Serialize + DeserializeOwned,
[src]
impl<T> StateMut<T> for AccountSharedData where
T: Serialize + DeserializeOwned,
[src]fn state(&self) -> Result<T, InstructionError>
[src]
fn set_state(&mut self, state: &T) -> Result<(), InstructionError>
[src]
impl WritableAccount for AccountSharedData
[src]
impl WritableAccount for AccountSharedData
[src]fn set_lamports(&mut self, lamports: u64)
[src]
fn data_as_mut_slice(&mut self) -> &mut [u8]ⓘ
[src]
fn set_owner(&mut self, owner: Pubkey)
[src]
fn copy_into_owner_from_slice(&mut self, source: &[u8])
[src]
fn set_executable(&mut self, executable: bool)
[src]
fn set_rent_epoch(&mut self, epoch: Epoch)
[src]
fn create(
lamports: u64,
data: Vec<u8>,
owner: Pubkey,
executable: bool,
rent_epoch: Epoch
) -> Self
[src]
lamports: u64,
data: Vec<u8>,
owner: Pubkey,
executable: bool,
rent_epoch: Epoch
) -> Self
fn checked_add_lamports(&mut self, lamports: u64) -> Result<(), LamportsError>
[src]
fn checked_sub_lamports(&mut self, lamports: u64) -> Result<(), LamportsError>
[src]
impl Eq for AccountSharedData
[src]
impl StructuralEq for AccountSharedData
[src]
impl StructuralPartialEq for AccountSharedData
[src]
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
impl<T> AbiExample for T
[src]
impl<T> AbiExample for T
[src]impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,