pub struct AccountMut<'a, T: Pod + FixedLayout> { /* private fields */ }Expand description
A typed, owner-validated account (mutable).
Proves: owner == program_id, writable, disc match, layout_id match, size match.
Implementations§
Source§impl<'a, T: Pod + FixedLayout> AccountMut<'a, T>
impl<'a, T: Pod + FixedLayout> AccountMut<'a, T>
Sourcepub fn view(&self) -> &'a AccountView
pub fn view(&self) -> &'a AccountView
The underlying AccountView.
Trait Implementations§
Source§impl<'a, T: Pod + FixedLayout + HopperLayout> FromAccount<'a> for AccountMut<'a, T>
impl<'a, T: Pod + FixedLayout + HopperLayout> FromAccount<'a> for AccountMut<'a, T>
Source§fn from_account(
account: &'a AccountView,
program_id: &Address,
) -> Result<Self, ProgramError>
fn from_account( account: &'a AccountView, program_id: &Address, ) -> Result<Self, ProgramError>
Construct this type from an account, performing all required validation.
Source§impl<'a, T: Pod + FixedLayout> HasView<'a> for AccountMut<'a, T>
impl<'a, T: Pod + FixedLayout> HasView<'a> for AccountMut<'a, T>
fn view(&self) -> &'a AccountView
Auto Trait Implementations§
impl<'a, T> Freeze for AccountMut<'a, T>
impl<'a, T> RefUnwindSafe for AccountMut<'a, T>where
T: RefUnwindSafe,
impl<'a, T> !Send for AccountMut<'a, T>
impl<'a, T> !Sync for AccountMut<'a, T>
impl<'a, T> Unpin for AccountMut<'a, T>where
T: Unpin,
impl<'a, T> UnsafeUnpin for AccountMut<'a, T>
impl<'a, T> !UnwindSafe for AccountMut<'a, T>
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