Enum ComputeBudgetInstruction
pub enum ComputeBudgetInstruction {
Unused,
RequestHeapFrame(u32),
SetComputeUnitLimit(u32),
SetComputeUnitPrice(u64),
SetLoadedAccountsDataSizeLimit(u32),
}Expand description
Compute Budget Instructions
Variants§
Unused
RequestHeapFrame(u32)
Request a specific transaction-wide program heap region size in bytes. The value requested must be a multiple of 1024. This new heap region size applies to each program executed in the transaction, including all calls to CPIs.
SetComputeUnitLimit(u32)
Set a specific compute unit limit that the transaction is allowed to consume.
SetComputeUnitPrice(u64)
Set a compute unit price in “micro-lamports” to pay a higher transaction fee for higher transaction prioritization.
SetLoadedAccountsDataSizeLimit(u32)
Set a specific transaction-wide account data size limit, in bytes, is allowed to load.
Implementations§
§impl ComputeBudgetInstruction
impl ComputeBudgetInstruction
pub fn request_heap_frame(bytes: u32) -> Instruction
pub fn request_heap_frame(bytes: u32) -> Instruction
Create a ComputeBudgetInstruction::RequestHeapFrame Instruction
pub fn set_compute_unit_limit(units: u32) -> Instruction
pub fn set_compute_unit_limit(units: u32) -> Instruction
Create a ComputeBudgetInstruction::SetComputeUnitLimit Instruction
pub fn set_compute_unit_price(micro_lamports: u64) -> Instruction
pub fn set_compute_unit_price(micro_lamports: u64) -> Instruction
Create a ComputeBudgetInstruction::SetComputeUnitPrice Instruction
pub fn set_loaded_accounts_data_size_limit(bytes: u32) -> Instruction
pub fn set_loaded_accounts_data_size_limit(bytes: u32) -> Instruction
Create a ComputeBudgetInstruction::SetLoadedAccountsDataSizeLimit Instruction
Trait Implementations§
§impl Clone for ComputeBudgetInstruction
impl Clone for ComputeBudgetInstruction
§fn clone(&self) -> ComputeBudgetInstruction
fn clone(&self) -> ComputeBudgetInstruction
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl Debug for ComputeBudgetInstruction
impl Debug for ComputeBudgetInstruction
§impl PartialEq for ComputeBudgetInstruction
impl PartialEq for ComputeBudgetInstruction
impl Eq for ComputeBudgetInstruction
impl StructuralPartialEq for ComputeBudgetInstruction
Auto Trait Implementations§
impl Freeze for ComputeBudgetInstruction
impl RefUnwindSafe for ComputeBudgetInstruction
impl Send for ComputeBudgetInstruction
impl Sync for ComputeBudgetInstruction
impl Unpin for ComputeBudgetInstruction
impl UnwindSafe for ComputeBudgetInstruction
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
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>
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