pub struct OwnedAccount { /* private fields */ }Expand description
Heap-backed account, used after promotion from borrowed or direct construction.
Implementations§
Source§impl OwnedAccount
impl OwnedAccount
Sourcepub unsafe fn serialize(&self, buf: &mut [StorageUnit], pubkey: &Pubkey)
pub unsafe fn serialize(&self, buf: &mut [StorageUnit], pubkey: &Pubkey)
Writes the account into a buffer sized by units.
§Safety
buf must be exactly units() storage units long.
pubkey is written into the image prefix so borrowed iteration can
recover the full account key without consulting the index.
Sourcepub fn is(&self, mode: AccountMode) -> bool
pub fn is(&self, mode: AccountMode) -> bool
Tests the exact account mode without grouping modes by mutability.
Sourcepub fn mode(&self) -> AccountMode
pub fn mode(&self) -> AccountMode
Returns the account’s exact lifecycle mode.
Sourcepub fn flags(&self) -> StateFlags
pub fn flags(&self) -> StateFlags
Returns the account modifier flags.
Trait Implementations§
Source§impl Clone for OwnedAccount
impl Clone for OwnedAccount
Source§fn clone(&self) -> OwnedAccount
fn clone(&self) -> OwnedAccount
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Default for OwnedAccount
impl Default for OwnedAccount
Source§fn default() -> OwnedAccount
fn default() -> OwnedAccount
Returns the “default value” for a type. Read more
impl Eq for OwnedAccount
Source§impl From<&BorrowedAccount> for OwnedAccount
impl From<&BorrowedAccount> for OwnedAccount
Source§fn from(value: &BorrowedAccount) -> Self
fn from(value: &BorrowedAccount) -> Self
Converts to this type from the input type.
Source§impl From<Account> for OwnedAccount
impl From<Account> for OwnedAccount
Source§impl From<AccountBuilder> for OwnedAccount
impl From<AccountBuilder> for OwnedAccount
Source§fn from(value: AccountBuilder) -> Self
fn from(value: AccountBuilder) -> Self
Converts to this type from the input type.
Source§fn from(value: OwnedAccount) -> Self
fn from(value: OwnedAccount) -> Self
Converts to this type from the input type.
Source§impl PartialEq for OwnedAccount
impl PartialEq for OwnedAccount
impl StructuralPartialEq for OwnedAccount
Auto Trait Implementations§
impl Freeze for OwnedAccount
impl RefUnwindSafe for OwnedAccount
impl Send for OwnedAccount
impl Sync for OwnedAccount
impl Unpin for OwnedAccount
impl UnsafeUnpin for OwnedAccount
impl UnwindSafe for OwnedAccount
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