pub struct AccountLocks { /* private fields */ }
Implementations§
Source§impl AccountLocks
impl AccountLocks
Sourcepub fn try_lock_accounts<'a>(
&mut self,
keys: impl Iterator<Item = (&'a Pubkey, bool)> + Clone,
) -> Result<(), TransactionError>
pub fn try_lock_accounts<'a>( &mut self, keys: impl Iterator<Item = (&'a Pubkey, bool)> + Clone, ) -> Result<(), TransactionError>
Lock the account keys in keys
for a transaction.
The bool in the tuple indicates if the account is writable.
Returns an error if any of the accounts are already locked in a way
that conflicts with the requested lock.
Sourcepub fn unlock_accounts<'a>(
&mut self,
keys: impl Iterator<Item = (&'a Pubkey, bool)>,
)
pub fn unlock_accounts<'a>( &mut self, keys: impl Iterator<Item = (&'a Pubkey, bool)>, )
Unlock the account keys in keys
after a transaction.
The bool in the tuple indicates if the account is writable.
In debug-mode this function will panic if an attempt is made to unlock
an account that wasn’t locked in the way requested.
Trait Implementations§
Source§impl Debug for AccountLocks
impl Debug for AccountLocks
Source§impl Default for AccountLocks
impl Default for AccountLocks
Source§fn default() -> AccountLocks
fn default() -> AccountLocks
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for AccountLocks
impl RefUnwindSafe for AccountLocks
impl Send for AccountLocks
impl Sync for AccountLocks
impl Unpin for AccountLocks
impl UnwindSafe for AccountLocks
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more