Trait staging_xcm_executor::traits::ShouldExecute
source · pub trait ShouldExecute {
// Required method
fn should_execute<RuntimeCall>(
origin: &MultiLocation,
instructions: &mut [Instruction<RuntimeCall>],
max_weight: Weight,
properties: &mut Properties
) -> Result<(), ProcessMessageError>;
}Expand description
Trait to determine whether the execution engine should actually execute a given XCM.
Can be amalgamated into a tuple to have multiple trials. If any of the tuple elements returns
Ok(), the execution stops. Else, Err(_) is returned if all elements reject the message.
Required Methods§
sourcefn should_execute<RuntimeCall>(
origin: &MultiLocation,
instructions: &mut [Instruction<RuntimeCall>],
max_weight: Weight,
properties: &mut Properties
) -> Result<(), ProcessMessageError>
fn should_execute<RuntimeCall>( origin: &MultiLocation, instructions: &mut [Instruction<RuntimeCall>], max_weight: Weight, properties: &mut Properties ) -> Result<(), ProcessMessageError>
Returns true if the given message may be executed.
origin: The origin (sender) of the message.instructions: The message itself.max_weight: The (possibly over-) estimation of the weight of execution of the message.properties: Various pre-established properties of the message which may be mutated by this API.