Struct solana_sdk::account::Account [−][src]
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
impl Account
[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 Account for Account
[src]
Return the information required to construct an AccountInfo
. Used by the
AccountInfo
conversion implementations.
impl Clone for Account
[src]
impl Debug for Account
[src]
impl Default for Account
[src]
impl<'de> Deserialize<'de> for Account
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Eq for Account
[src]
impl PartialEq<Account> for Account
[src]
impl Serialize for Account
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl<T> StateMut<T> for Account where
T: Serialize + DeserializeOwned,
[src]
T: Serialize + DeserializeOwned,
fn state(&self) -> Result<T, InstructionError>
[src]
fn set_state(&mut self, state: &T) -> Result<(), InstructionError>
[src]
impl StructuralEq for Account
[src]
impl StructuralPartialEq for Account
[src]
Auto Trait Implementations
impl RefUnwindSafe for Account
impl Send for Account
impl Sync for Account
impl Unpin for Account
impl UnwindSafe for Account
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,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> MaybeDebug for T where
T: Debug,
[src]
T: Debug,
impl<T> Same<T> for T
[src]
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.
pub fn to_owned(&self) -> T
[src]
pub 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.
pub 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.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Typeable for T where
T: Any,
T: Any,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
[src]
V: MultiLane<T>,