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>,
}Available on non-
target_os=solana only.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
pub const fn with_priority_fee(self, fee: u64) -> Self
pub const fn with_compute_unit_limit(self, limit: u32) -> Self
pub const fn with_loaded_accounts_data_size_limit(self, limit: u32) -> Self
Sourcepub const fn with_heap_size(self, size: u32) -> Self
pub const fn with_heap_size(self, size: u32) -> Self
Heap size must be a multiple of 1024. Validated during deserialization.
Trait Implementations§
Source§impl AbiExample for TransactionConfig
impl AbiExample for TransactionConfig
Source§impl Clone for TransactionConfig
impl Clone for TransactionConfig
Source§fn clone(&self) -> TransactionConfig
fn clone(&self) -> TransactionConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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
impl Debug for TransactionConfig
Source§impl Default for TransactionConfig
impl Default for TransactionConfig
Source§fn default() -> TransactionConfig
fn default() -> TransactionConfig
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for TransactionConfig
impl<'de> Deserialize<'de> for TransactionConfig
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
impl From<&TransactionConfig> for TransactionConfigMask
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
impl From<TransactionConfig> for TransactionConfigMask
Source§fn from(config: TransactionConfig) -> Self
fn from(config: TransactionConfig) -> Self
Converts to this type from the input type.
Source§impl PartialEq for TransactionConfig
impl PartialEq for TransactionConfig
Source§fn eq(&self, other: &TransactionConfig) -> bool
fn eq(&self, other: &TransactionConfig) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for TransactionConfig
impl Serialize for TransactionConfig
impl Copy for TransactionConfig
impl Eq for TransactionConfig
impl StructuralPartialEq for TransactionConfig
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