pub enum ComputeBudgetInstruction {
RequestUnits {
units: u32,
additional_fee: u32,
},
RequestHeapFrame(u32),
}
Expand description
Compute Budget Instructions
Variants
RequestUnits
Request a specific maximum number of compute units the transaction is allowed to consume and an additional fee to pay.
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, including all calls to CPIs.
Implementations
sourceimpl ComputeBudgetInstruction
impl ComputeBudgetInstruction
sourcepub fn request_units(units: u32, additional_fee: u32) -> Instruction
pub fn request_units(units: u32, additional_fee: u32) -> Instruction
Create a ComputeBudgetInstruction::RequestUnits
Instruction
sourcepub fn request_heap_frame(bytes: u32) -> Instruction
pub fn request_heap_frame(bytes: u32) -> Instruction
Create a ComputeBudgetInstruction::RequestHeapFrame
Instruction
Trait Implementations
sourceimpl AbiEnumVisitor for ComputeBudgetInstruction
impl AbiEnumVisitor for ComputeBudgetInstruction
fn visit_for_abi(&self, digester: &mut AbiDigester) -> DigestResult
sourceimpl AbiExample for ComputeBudgetInstruction
impl AbiExample for ComputeBudgetInstruction
sourceimpl BorshDeserialize for ComputeBudgetInstruction where
u32: BorshDeserialize,
u32: BorshDeserialize,
u32: BorshDeserialize,
impl BorshDeserialize for ComputeBudgetInstruction where
u32: BorshDeserialize,
u32: BorshDeserialize,
u32: BorshDeserialize,
sourceimpl BorshSerialize for ComputeBudgetInstruction where
u32: BorshSerialize,
u32: BorshSerialize,
u32: BorshSerialize,
impl BorshSerialize for ComputeBudgetInstruction where
u32: BorshSerialize,
u32: BorshSerialize,
u32: BorshSerialize,
sourceimpl Clone for ComputeBudgetInstruction
impl Clone for ComputeBudgetInstruction
sourcefn clone(&self) -> ComputeBudgetInstruction
fn clone(&self) -> ComputeBudgetInstruction
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for ComputeBudgetInstruction
impl Debug for ComputeBudgetInstruction
sourceimpl<'de> Deserialize<'de> for ComputeBudgetInstruction
impl<'de> Deserialize<'de> for ComputeBudgetInstruction
sourcefn 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>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl PartialEq<ComputeBudgetInstruction> for ComputeBudgetInstruction
impl PartialEq<ComputeBudgetInstruction> for ComputeBudgetInstruction
sourcefn eq(&self, other: &ComputeBudgetInstruction) -> bool
fn eq(&self, other: &ComputeBudgetInstruction) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &ComputeBudgetInstruction) -> bool
fn ne(&self, other: &ComputeBudgetInstruction) -> bool
This method tests for !=
.
sourceimpl Serialize for ComputeBudgetInstruction
impl Serialize for ComputeBudgetInstruction
impl StructuralPartialEq for ComputeBudgetInstruction
Auto Trait Implementations
impl RefUnwindSafe for ComputeBudgetInstruction
impl Send for ComputeBudgetInstruction
impl Sync for ComputeBudgetInstruction
impl Unpin for ComputeBudgetInstruction
impl UnwindSafe for ComputeBudgetInstruction
Blanket Implementations
sourceimpl<T> AbiEnumVisitor for T where
T: Serialize + ?Sized,
impl<T> AbiEnumVisitor for T where
T: Serialize + ?Sized,
default fn visit_for_abi(
&self,
_digester: &mut AbiDigester
) -> Result<AbiDigester, DigestError>
sourceimpl<T> AbiEnumVisitor for T where
T: Serialize + AbiExample + ?Sized,
impl<T> AbiEnumVisitor for T where
T: Serialize + AbiExample + ?Sized,
default fn visit_for_abi(
&self,
digester: &mut AbiDigester
) -> Result<AbiDigester, DigestError>
sourceimpl<T> AbiExample for T
impl<T> AbiExample for T
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more