[][src]Enum frame_support::weights::SimpleDispatchInfo

pub enum SimpleDispatchInfo {
    FixedNormal(Weight),
    MaxNormal,
    InsecureFreeNormal,
    FixedOperational(Weight),
    MaxOperational,
}

Default type used with the #[weight = x] attribute in a substrate chain.

A user may pass in any other type that implements the correct traits. If not, the Default implementation of SimpleDispatchInfo is used.

For each generalized group (Normal and Operation):

  • A Fixed variant means weight fee is charged normally and the weight is the number specified in the inner value of the variant.
  • A Free variant is equal to ::Fixed(0). Note that this does not guarantee inclusion.
  • A Max variant is equal to ::Fixed(Weight::max_value()).

As for the generalized groups themselves:

  • Normal variants will be assigned a priority proportional to their weight. They can only consume a portion (defined in the system module) of the maximum block resource limits.
  • Operational variants will be assigned the maximum priority. They can potentially consume the entire block resource limit.

Variants

FixedNormal(Weight)

A normal dispatch with fixed weight.

MaxNormal

A normal dispatch with the maximum weight.

InsecureFreeNormal

A normal dispatch with no weight. Base and bytes fees still need to be paid.

FixedOperational(Weight)

An operational dispatch with fixed weight.

MaxOperational

An operational dispatch with the maximum weight.

Methods

impl SimpleDispatchInfo[src]

pub fn zero() -> Self[src]

An additive zero variant of SimpleDispatchInfo.

Trait Implementations

impl<T> ClassifyDispatch<T> for SimpleDispatchInfo[src]

impl Clone for SimpleDispatchInfo[src]

impl Copy for SimpleDispatchInfo[src]

impl Default for SimpleDispatchInfo[src]

impl From<SimpleDispatchInfo> for DispatchClass[src]

impl<T> PaysFee<T> for SimpleDispatchInfo[src]

impl<T> WeighData<T> for SimpleDispatchInfo[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> CheckedConversion for T[src]

impl<T> Clear for T where
    T: InitializableFromZeroed + ?Sized

impl<T> From<T> for T[src]

impl<T> InitializableFromZeroed for T where
    T: Default

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, Outer> IsWrappedBy<Outer> for T where
    Outer: AsRef<T> + AsMut<T> + From<T>,
    T: From<Outer>, 
[src]

fn from_ref(outer: &Outer) -> &T[src]

Get a reference to the inner from the outer.

fn from_mut(outer: &mut Outer) -> &mut T[src]

Get a mutable reference to the inner from the outer.

impl<T> MaybeRefUnwindSafe for T where
    T: RefUnwindSafe

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> SaturatedConversion for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<S, T> UncheckedInto<T> for S where
    T: UncheckedFrom<S>, 
[src]

impl<T, S> UniqueSaturatedInto<T> for S where
    S: TryInto<T>,
    T: Bounded
[src]

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,