pub trait DenyExecution {
// Required method
fn deny_execution<RuntimeCall>(
origin: &Location,
instructions: &mut [Instruction<RuntimeCall>],
max_weight: Weight,
properties: &mut Properties,
) -> Result<(), ProcessMessageError>;
}
Expand description
Trait to determine whether the execution engine should not execute a given XCM.
Can be amalgamated into a tuple to have multiple traits. If any of the tuple elements returns
Err(ProcessMessageError)
, the execution stops. Else, Ok(())
is returned if all elements
accept the message.
Required Methods§
Sourcefn deny_execution<RuntimeCall>(
origin: &Location,
instructions: &mut [Instruction<RuntimeCall>],
max_weight: Weight,
properties: &mut Properties,
) -> Result<(), ProcessMessageError>
fn deny_execution<RuntimeCall>( origin: &Location, instructions: &mut [Instruction<RuntimeCall>], max_weight: Weight, properties: &mut Properties, ) -> Result<(), ProcessMessageError>
Returns Ok(())
if there is no reason to deny execution,
while Err(ProcessMessageError)
indicates there is a reason to deny execution.
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.
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.