Type Definition ssvm_evmc_sys::evmc_copy_code_fn [−][src]
pub type evmc_copy_code_fn = Option<unsafe extern "C" fn(context: *mut evmc_context, address: *const evmc_address, code_offset: usize, buffer_data: *mut u8, buffer_size: usize) -> usize>;
Expand description
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 Client execution context. @see ::evmc_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.