Trait sp_core::traits::CodeExecutor  
source · pub trait CodeExecutor: Sized + Send + Sync + ReadRuntimeVersion + Clone + 'static {
    type Error: Display + Debug + Send + Sync + 'static;
    // Required method
    fn call(
        &self,
        ext: &mut dyn Externalities,
        runtime_code: &RuntimeCode<'_>,
        method: &str,
        data: &[u8],
        use_native: bool,
        context: CallContext
    ) -> (Result<Vec<u8>, Self::Error>, bool);
}Expand description
Code execution engine.
Required Associated Types§
Required Methods§
sourcefn call(
    &self,
    ext: &mut dyn Externalities,
    runtime_code: &RuntimeCode<'_>,
    method: &str,
    data: &[u8],
    use_native: bool,
    context: CallContext
) -> (Result<Vec<u8>, Self::Error>, bool)
 
fn call( &self, ext: &mut dyn Externalities, runtime_code: &RuntimeCode<'_>, method: &str, data: &[u8], use_native: bool, context: CallContext ) -> (Result<Vec<u8>, Self::Error>, bool)
Call a given method in the runtime.
Returns a tuple of the result (either the output data or an execution error) together with a
bool, which is true if native execution was used.