pub struct Account<'a, T: Pod + FixedLayout> { /* private fields */ }Expand description
A typed, owner-validated account (immutable).
Proves: owner == program_id, disc match, version match, layout_id match, size match.
Implementations§
Source§impl<'a, T: Pod + FixedLayout> Account<'a, T>
impl<'a, T: Pod + FixedLayout> Account<'a, T>
Trait Implementations§
Source§impl<'a, T: Pod + FixedLayout + HopperLayout> FromAccount<'a> for Account<'a, T>
impl<'a, T: Pod + FixedLayout + HopperLayout> FromAccount<'a> for Account<'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 Account<'a, T>
impl<'a, T: Pod + FixedLayout> HasView<'a> for Account<'a, T>
fn view(&self) -> &'a AccountView
Auto Trait Implementations§
impl<'a, T> Freeze for Account<'a, T>
impl<'a, T> RefUnwindSafe for Account<'a, T>where
T: RefUnwindSafe,
impl<'a, T> !Send for Account<'a, T>
impl<'a, T> !Sync for Account<'a, T>
impl<'a, T> Unpin for Account<'a, T>where
T: Unpin,
impl<'a, T> UnsafeUnpin for Account<'a, T>
impl<'a, T> UnwindSafe for Account<'a, T>where
T: UnwindSafe,
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