Skip to main content

RandomX

Trait RandomX 

Source
pub trait RandomX {
    type Error;

    // Required method
    fn calculate_hash(&self, buf: &[u8]) -> Result<[u8; 32], Self::Error>;
}
Expand description

A trait to represent the RandomX VM.

Required Associated Types§

Required Methods§

Source

fn calculate_hash(&self, buf: &[u8]) -> Result<[u8; 32], Self::Error>

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§