pub struct TransactionConfigMask(pub u32);Available on non-
target_os=solana only.Expand description
Bitmask indicating which configuration values are present in a V1 transaction.
Each bit (or bit pair) corresponds to a specific configuration field. The config values array contains entries only for fields whose bits are set.
Tuple Fields§
§0: u32Implementations§
Source§impl TransactionConfigMask
impl TransactionConfigMask
Sourcepub const PRIORITY_FEE: u32 = 0b11
pub const PRIORITY_FEE: u32 = 0b11
Mask for priority fee config.
Bits 0-1 (requires both bits set, 8 bytes as u64 LE).
Sourcepub const COMPUTE_UNIT_LIMIT: u32 = 0b100
pub const COMPUTE_UNIT_LIMIT: u32 = 0b100
Mask for compute unit limit
Bit 2 (4 bytes as u32 LE).
Sourcepub const LOADED_ACCOUNTS_DATA_SIZE: u32 = 0b1000
pub const LOADED_ACCOUNTS_DATA_SIZE: u32 = 0b1000
Mask for loaded accounts data size limit
Bit 3 (4 bytes as u32 LE).
Sourcepub const KNOWN_BITS: u32
pub const KNOWN_BITS: u32
Mask of all known/supported bits (bits 0-4).
pub const fn new(mask: u32) -> Self
Sourcepub const fn has_unknown_bits(&self) -> bool
pub const fn has_unknown_bits(&self) -> bool
Returns `true`` if any unknown bits are set.
An unknown bit is any bit that is not defined in KNOWN_BITS.
pub const fn has_priority_fee(&self) -> bool
Sourcepub const fn has_invalid_priority_fee_bits(&self) -> bool
pub const fn has_invalid_priority_fee_bits(&self) -> bool
Returns true if only one of the two priority fee bits is set (invalid).
pub const fn has_compute_unit_limit(&self) -> bool
pub const fn has_loaded_accounts_data_size(&self) -> bool
pub const fn has_heap_size(&self) -> bool
Sourcepub const fn size_of_config(&self) -> usize
pub const fn size_of_config(&self) -> usize
Total size in bytes required to store the config values.
Trait Implementations§
Source§impl AbiExample for TransactionConfigMask
impl AbiExample for TransactionConfigMask
Source§impl Clone for TransactionConfigMask
impl Clone for TransactionConfigMask
Source§fn clone(&self) -> TransactionConfigMask
fn clone(&self) -> TransactionConfigMask
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 TransactionConfigMask
impl Debug for TransactionConfigMask
Source§impl Default for TransactionConfigMask
impl Default for TransactionConfigMask
Source§fn default() -> TransactionConfigMask
fn default() -> TransactionConfigMask
Returns the “default value” for a type. 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 TransactionConfigMask
impl PartialEq for TransactionConfigMask
Source§fn eq(&self, other: &TransactionConfigMask) -> bool
fn eq(&self, other: &TransactionConfigMask) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for TransactionConfigMask
impl Eq for TransactionConfigMask
impl StructuralPartialEq for TransactionConfigMask
Auto Trait Implementations§
impl Freeze for TransactionConfigMask
impl RefUnwindSafe for TransactionConfigMask
impl Send for TransactionConfigMask
impl Sync for TransactionConfigMask
impl Unpin for TransactionConfigMask
impl UnsafeUnpin for TransactionConfigMask
impl UnwindSafe for TransactionConfigMask
Blanket Implementations§
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