pub trait BenchmarksExt {
// Required methods
fn benchmarks_blake3_hash_chunk(
&self,
contract: Address,
chunk: &[u8; 1024],
) -> Result<[u8; 32], ContractError>;
fn benchmarks_ed25519_verify(
&self,
contract: Address,
public_key: &Ed25519PublicKey,
signature: &Ed25519Signature,
message: &[u8; 32],
) -> Result<Bool, ContractError>;
}Expand description
Extension trait that provides helper methods for calling Benchmarks’s methods on Env for convenience purposes
Required Methods§
Sourcefn benchmarks_blake3_hash_chunk(
&self,
contract: Address,
chunk: &[u8; 1024],
) -> Result<[u8; 32], ContractError>
fn benchmarks_blake3_hash_chunk( &self, contract: Address, chunk: &[u8; 1024], ) -> Result<[u8; 32], ContractError>
Hash a single chunk worth of bytes
Sourcefn benchmarks_ed25519_verify(
&self,
contract: Address,
public_key: &Ed25519PublicKey,
signature: &Ed25519Signature,
message: &[u8; 32],
) -> Result<Bool, ContractError>
fn benchmarks_ed25519_verify( &self, contract: Address, public_key: &Ed25519PublicKey, signature: &Ed25519Signature, message: &[u8; 32], ) -> Result<Bool, ContractError>
Verify a single Ed25519 signature
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.