[][src]Type Definition evmc_sys::evmc_copy_code_fn

type evmc_copy_code_fn = Option<unsafe extern "C" fn(context: *mut evmc_host_context, address: *const evmc_address, code_offset: usize, buffer_data: *mut u8, buffer_size: usize) -> usize>;

Copy code callback function.

This callback function is used by an EVM to request a copy of the code of the given account to the memory buffer provided by the EVM. The Client MUST copy the requested code, starting with the given offset, to the provided memory buffer up to the size of the buffer or the size of the code, whichever is smaller.

@param context The pointer to the Host execution context. See ::evmc_host_context. @param address The address of the account. @param code_offset The offset of the code to copy. @param buffer_data The pointer to the memory buffer allocated by the EVM to store a copy of the requested code. @param buffer_size The size of the memory buffer. @return The number of bytes copied to the buffer by the Client.