pub enum Priority {
Min,
Low,
Medium,
High,
VeryHigh,
}
Expand description
The percentile of recent prioritization fees to use as the compute unit price for a transaction.
Variants§
Min
0th percentile
Low
25th percentile
Medium
50th percentile
High
75th percentile
VeryHigh
95th percentile
Implementations§
Source§impl Priority
impl Priority
Sourcepub fn percentile(&self) -> f32
pub fn percentile(&self) -> f32
Converts the priority enumeration to a percentile value between 0 and 1.
Sourcepub async fn get_priority_fee_estimate(
&self,
client: &RpcClient,
mutable_accounts: &[Pubkey],
) -> DataAnchorClientResult<MicroLamports>
pub async fn get_priority_fee_estimate( &self, client: &RpcClient, mutable_accounts: &[Pubkey], ) -> DataAnchorClientResult<MicroLamports>
Calculates a recommended compute unit price for a transaction based on recent prioritization fees.
Sourcepub async fn calculate_compute_unit_price(
&self,
client: &RpcClient,
mutable_accounts: &[Pubkey],
) -> DataAnchorClientResult<MicroLamports>
pub async fn calculate_compute_unit_price( &self, client: &RpcClient, mutable_accounts: &[Pubkey], ) -> DataAnchorClientResult<MicroLamports>
Calculates a recommended compute unit price for a transaction based on recent prioritization fees.
§Arguments
client
: The RPC client to use for looking up recent prioritization fees.mutable_accounts
: The addresses of the accounts that are mutable in the transaction (and thus need exclusive locks).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Priority
impl<'de> Deserialize<'de> for Priority
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<Priority> for FeeStrategy
impl From<Priority> for FeeStrategy
Source§impl JsonSchema for Priority
impl JsonSchema for Priority
Source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref
keyword. Read moreimpl Copy for Priority
impl Eq for Priority
impl StructuralPartialEq for Priority
Auto Trait Implementations§
impl Freeze for Priority
impl RefUnwindSafe for Priority
impl Send for Priority
impl Sync for Priority
impl Unpin for Priority
impl UnwindSafe for Priority
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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