pub struct RemainingGroup<'a> { /* private fields */ }Expand description
Sequential typed parser for one logical remaining-account group.
Implementations§
Source§impl<'a> RemainingGroup<'a>
impl<'a> RemainingGroup<'a>
Sourcepub fn remaining_len(&self) -> usize
pub fn remaining_len(&self) -> usize
Number of unconsumed group slots.
Sourcepub fn next_account(&mut self) -> Result<&'a AccountView<'a>, ProgramError>
pub fn next_account(&mut self) -> Result<&'a AccountView<'a>, ProgramError>
Consume and return the next account in this group.
Sourcepub fn next_signer(&mut self) -> Result<Signer<'a>, ProgramError>
pub fn next_signer(&mut self) -> Result<Signer<'a>, ProgramError>
Consume and validate the next group account as a signer.
Sourcepub fn next_external<T: ExternalZeroCopy>(
&mut self,
) -> Result<ExternalAccount<'a, T>, ProgramError>
pub fn next_external<T: ExternalZeroCopy>( &mut self, ) -> Result<ExternalAccount<'a, T>, ProgramError>
Consume and validate the next group account as a known external layout.
Sourcepub fn parse_external<T: ExternalZeroCopy, const N: usize>(
&mut self,
) -> Result<RemainingExternalAccounts<'a, T, N>, ProgramError>
pub fn parse_external<T: ExternalZeroCopy, const N: usize>( &mut self, ) -> Result<RemainingExternalAccounts<'a, T, N>, ProgramError>
Parse the entire group as at most N known external accounts.
Sourcepub fn assert_empty(&self) -> ProgramResult
pub fn assert_empty(&self) -> ProgramResult
Require the group parser to have consumed every slot.
Auto Trait Implementations§
impl<'a> !Send for RemainingGroup<'a>
impl<'a> !Sync for RemainingGroup<'a>
impl<'a> Freeze for RemainingGroup<'a>
impl<'a> RefUnwindSafe for RemainingGroup<'a>
impl<'a> Unpin for RemainingGroup<'a>
impl<'a> UnsafeUnpin for RemainingGroup<'a>
impl<'a> UnwindSafe for RemainingGroup<'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