pub struct TransactionConfig {
pub priority_fee: Option<u64>,
pub compute_unit_limit: Option<u32>,
pub loaded_accounts_data_size_limit: Option<u32>,
pub heap_size: Option<u32>,
}Expand description
Compute budget configuration for V1 transactions.
Fields§
§priority_fee: Option<u64>Priority fee in lamports.
compute_unit_limit: Option<u32>Maximum compute units. None means use 0.
loaded_accounts_data_size_limit: Option<u32>Maximum bytes of account data that may be loaded. None means use 0.
heap_size: Option<u32>Heap size in bytes. Must be multiple of 1024. None = 32KB.
Implementations§
Source§impl TransactionConfig
impl TransactionConfig
pub const fn empty() -> Self
Available on non-
target_os=solana only.pub const fn with_priority_fee(self, fee: u64) -> Self
Available on non-
target_os=solana only.pub const fn with_compute_unit_limit(self, limit: u32) -> Self
Available on non-
target_os=solana only.pub const fn with_loaded_accounts_data_size_limit(self, limit: u32) -> Self
Available on non-
target_os=solana only.Sourcepub const fn with_heap_size(self, size: u32) -> Self
Available on non-target_os=solana only.
pub const fn with_heap_size(self, size: u32) -> Self
target_os=solana only.Heap size must be a multiple of 1024. Validated during deserialization.
Trait Implementations§
Source§impl AbiExample for TransactionConfig
Available on non-target_os=solana only.
impl AbiExample for TransactionConfig
Available on non-
target_os=solana only.Source§impl Clone for TransactionConfig
Available on non-target_os=solana only.
impl Clone for TransactionConfig
Available on non-
target_os=solana only.Source§fn clone(&self) -> TransactionConfig
fn clone(&self) -> TransactionConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TransactionConfig
Available on non-target_os=solana only.
impl Debug for TransactionConfig
Available on non-
target_os=solana only.Source§impl Default for TransactionConfig
Available on non-target_os=solana only.
impl Default for TransactionConfig
Available on non-
target_os=solana only.Source§fn default() -> TransactionConfig
fn default() -> TransactionConfig
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for TransactionConfig
Available on non-target_os=solana only.
impl<'de> Deserialize<'de> for TransactionConfig
Available on non-
target_os=solana only.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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<&TransactionConfig> for TransactionConfigMask
Available on non-target_os=solana only.
impl From<&TransactionConfig> for TransactionConfigMask
Available on non-
target_os=solana only.Source§fn from(config: &TransactionConfig) -> Self
fn from(config: &TransactionConfig) -> Self
Converts to this type from the input type.
Source§impl From<TransactionConfig> for TransactionConfigMask
Available on non-target_os=solana only.
impl From<TransactionConfig> for TransactionConfigMask
Available on non-
target_os=solana only.Source§fn from(config: TransactionConfig) -> Self
fn from(config: TransactionConfig) -> Self
Converts to this type from the input type.
Source§impl PartialEq for TransactionConfig
Available on non-target_os=solana only.
impl PartialEq for TransactionConfig
Available on non-
target_os=solana only.Source§impl Serialize for TransactionConfig
Available on non-target_os=solana only.
impl Serialize for TransactionConfig
Available on non-
target_os=solana only.impl Copy for TransactionConfig
Available on non-
target_os=solana only.impl Eq for TransactionConfig
Available on non-
target_os=solana only.impl StructuralPartialEq for TransactionConfig
Available on non-
target_os=solana only.Auto Trait Implementations§
impl Freeze for TransactionConfig
impl RefUnwindSafe for TransactionConfig
impl Send for TransactionConfig
impl Sync for TransactionConfig
impl Unpin for TransactionConfig
impl UnsafeUnpin for TransactionConfig
impl UnwindSafe for TransactionConfig
Blanket Implementations§
Source§impl<T> AbiEnumVisitor for T
impl<T> AbiEnumVisitor for T
default fn visit_for_abi( &self, _digester: &mut AbiDigester, ) -> Result<AbiDigester, DigestError>
Source§impl<T> AbiEnumVisitor for Twhere
T: Serialize + AbiExample,
impl<T> AbiEnumVisitor for Twhere
T: Serialize + AbiExample,
default fn visit_for_abi( &self, digester: &mut AbiDigester, ) -> Result<AbiDigester, DigestError>
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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