pub struct UncheckedAccount<'a> { /* private fields */ }Expand description
An unchecked account. No validation is performed.
Use when the program must inspect the account manually before deciding what to do (e.g. conditional logic based on owner or data).
Implementations§
Source§impl<'a> UncheckedAccount<'a>
impl<'a> UncheckedAccount<'a>
Sourcepub fn new(account: &'a AccountView) -> Self
pub fn new(account: &'a AccountView) -> Self
Wrap an account without validation.
Sourcepub fn to_account_view(&self) -> &'a AccountView
pub fn to_account_view(&self) -> &'a AccountView
The underlying AccountView.
Sourcepub fn is_writable(&self) -> bool
pub fn is_writable(&self) -> bool
Whether the account is writable.
Trait Implementations§
Source§impl<'a> Clone for UncheckedAccount<'a>
impl<'a> Clone for UncheckedAccount<'a>
Source§fn clone(&self) -> UncheckedAccount<'a>
fn clone(&self) -> UncheckedAccount<'a>
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 moreimpl<'a> Copy for UncheckedAccount<'a>
Auto Trait Implementations§
impl<'a> Freeze for UncheckedAccount<'a>
impl<'a> RefUnwindSafe for UncheckedAccount<'a>
impl<'a> Send for UncheckedAccount<'a>
impl<'a> Sync for UncheckedAccount<'a>
impl<'a> Unpin for UncheckedAccount<'a>
impl<'a> UnsafeUnpin for UncheckedAccount<'a>
impl<'a> UnwindSafe for UncheckedAccount<'a>
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