pub struct RemainingAccounts<'a> { /* private fields */ }Expand description
Iterator over remaining (unstructured) accounts.
Implementations§
Source§impl<'a> RemainingAccounts<'a>
impl<'a> RemainingAccounts<'a>
Sourcepub fn new(accounts: &'a [AccountView]) -> Self
pub fn new(accounts: &'a [AccountView]) -> Self
Create from a slice of accounts.
Sourcepub fn next(&mut self) -> Result<&'a AccountView, ProgramError>
pub fn next(&mut self) -> Result<&'a AccountView, ProgramError>
Take the next account, or return NotEnoughAccountKeys.
Sourcepub fn next_signer(&mut self) -> Result<&'a AccountView, ProgramError>
pub fn next_signer(&mut self) -> Result<&'a AccountView, ProgramError>
Take the next account that is a signer.
Sourcepub fn next_writable(&mut self) -> Result<&'a AccountView, ProgramError>
pub fn next_writable(&mut self) -> Result<&'a AccountView, ProgramError>
Take the next account that is writable.
Sourcepub fn next_owned_by(
&mut self,
program: &Address,
) -> Result<&'a AccountView, ProgramError>
pub fn next_owned_by( &mut self, program: &Address, ) -> Result<&'a AccountView, ProgramError>
Take the next account owned by the given program.
Auto Trait Implementations§
impl<'a> Freeze for RemainingAccounts<'a>
impl<'a> RefUnwindSafe for RemainingAccounts<'a>
impl<'a> Send for RemainingAccounts<'a>
impl<'a> Sync for RemainingAccounts<'a>
impl<'a> Unpin for RemainingAccounts<'a>
impl<'a> UnsafeUnpin for RemainingAccounts<'a>
impl<'a> UnwindSafe for RemainingAccounts<'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