pub fn call_with_custom_signature<
		E: Externalities<Blake2Hasher>,
		F: FnOnce(&mut FnMut(&[u8]) -> Result<u32>) -> Result<Vec<RuntimeValue>>,
		FR: FnOnce(Option<RuntimeValue>, &MemoryRef) -> Result<Option<R>>,
		R,
	>(
		&self,
		ext: &mut E,
		heap_pages: usize,
		code: &[u8],
		method: &str,
		create_parameters: F,
		filter_result: FR,
	) -> Result<R> {
		let module = wasmi::Module::from_buffer(code)?;
		let module = self.prepare_module(ext, heap_pages, &module)?;
		self.call_in_wasm_module_with_custom_signature(ext, &module, method, create_parameters, filter_result)
	}
/// Call a given method with a custom signature in the given code.
///
/// This should be used for tests only.
Call a given method with a custom signature in the given code.
This should be used for tests only.
Call a given method with a custom signature in the given code . This should be used for tests only .
pub fn call_with_custom_signature<
		E: Externalities<Blake2Hasher>,
		F: FnOnce(&mut FnMut(&[u8]) -> Result<u32>) -> Result<Vec<RuntimeValue>>,
		FR: FnOnce(Option<RuntimeValue>, &MemoryRef) -> Result<Option<R>>,
		R,
	>(
		&self,
		ext: &mut E,
		heap_pages: usize,
		code: &[u8],
		method: &str,
		create_parameters: F,
		filter_result: FR,
	) -> Result<R> {
		let module = wasmi::Module::from_buffer(code)?;
		let module = self.prepare_module(ext, heap_pages, &module)?;
		self.call_in_wasm_module_with_custom_signature(ext, &module, method, create_parameters, filter_result)
	}
pub fn call_with_custom_signature < E : Externalities < Blake2Hasher > , F : FnOnce ( & mut FnMut ( & [ u8 ] ) -> Result < u32 > ) -> Result < Vec < RuntimeValue > > , FR : FnOnce ( Option < RuntimeValue > , & MemoryRef ) -> Result < Option < R > > , R , > ( & self , ext : & mut E , heap_pages : usize , code : & [ u8 ] , method : & str , create_parameters : F , filter_result : FR , ) -> Result < R > { let module = wasmi :: Module :: from_buffer ( code ) ? ; let module = self . prepare_module ( ext , heap_pages , & module ) ? ; self . call_in_wasm_module_with_custom_signature ( ext , & module , method , create_parameters , filter_result ) }
Call a given method with a custom signature in the given code.
Call a given method with a custom signature in the given code .
&self
ext
&mut E
heap_pages
usize
code
&[u8]
method
&str
create_parameters
F
filter_result
FR
&self
ext
&mut E
heap_pages
usize
code
&[u8]
method
&str
create_parameters
F
filter_result
FR