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§
source§impl ComputeBudgetInstruction
impl ComputeBudgetInstruction
sourcepub fn request_heap_frame(bytes: u32) -> Instruction
pub fn request_heap_frame(bytes: u32) -> Instruction
Create a ComputeBudgetInstruction::RequestHeapFrame
Instruction
sourcepub fn set_compute_unit_limit(units: u32) -> Instruction
pub fn set_compute_unit_limit(units: u32) -> Instruction
Create a ComputeBudgetInstruction::SetComputeUnitLimit
Instruction
sourcepub fn set_compute_unit_price(micro_lamports: u64) -> Instruction
pub fn set_compute_unit_price(micro_lamports: u64) -> Instruction
Create a ComputeBudgetInstruction::SetComputeUnitPrice
Instruction
sourcepub 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§
source§impl AbiEnumVisitor for ComputeBudgetInstruction
impl AbiEnumVisitor for ComputeBudgetInstruction
fn visit_for_abi(&self, digester: &mut AbiDigester) -> DigestResult
source§impl BorshDeserialize for ComputeBudgetInstruction
impl BorshDeserialize for ComputeBudgetInstruction
fn deserialize_reader<__R: Read>(reader: &mut __R) -> Result<Self, Error>
source§fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
source§fn try_from_slice(v: &[u8]) -> Result<Self, Error>
fn try_from_slice(v: &[u8]) -> Result<Self, Error>
fn try_from_reader<R>(reader: &mut R) -> Result<Self, Error>where
R: Read,
source§impl Clone for ComputeBudgetInstruction
impl Clone for ComputeBudgetInstruction
source§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 moresource§impl Debug for ComputeBudgetInstruction
impl Debug for ComputeBudgetInstruction
source§impl<'de> Deserialize<'de> for ComputeBudgetInstruction
impl<'de> Deserialize<'de> for ComputeBudgetInstruction
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
source§impl EnumExt for ComputeBudgetInstruction
impl EnumExt for ComputeBudgetInstruction
source§impl PartialEq for ComputeBudgetInstruction
impl PartialEq for ComputeBudgetInstruction
source§fn eq(&self, other: &ComputeBudgetInstruction) -> bool
fn eq(&self, other: &ComputeBudgetInstruction) -> bool
self
and other
values to be equal, and is used
by ==
.