referrerpolicy=no-referrer-when-downgrade
staging_xcm_executor::traits

Trait WeightBounds

Source
pub trait WeightBounds<RuntimeCall> {
    // Required methods
    fn weight(message: &mut Xcm<RuntimeCall>) -> Result<Weight, ()>;
    fn instr_weight(
        instruction: &mut Instruction<RuntimeCall>,
    ) -> Result<Weight, ()>;
}
Expand description

Determine the weight of an XCM message.

Required Methods§

Source

fn weight(message: &mut Xcm<RuntimeCall>) -> Result<Weight, ()>

Return the maximum amount of weight that an attempted execution of this message could consume.

Source

fn instr_weight( instruction: &mut Instruction<RuntimeCall>, ) -> Result<Weight, ()>

Return the maximum amount of weight that an attempted execution of this instruction could consume.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

impl<T: Get<Weight>, C: Decode + GetDispatchInfo, M: Get<u32>> WeightBounds<C> for FixedWeightBounds<T, C, M>

impl<W, C, M> WeightBounds<C> for WeightInfoBounds<W, C, M>
where W: XcmWeightInfo<C>, C: Decode + GetDispatchInfo, M: Get<u32>, Instruction<C>: GetWeight<W>,