pub trait IdMapper:
Send
+ Sync
+ Debug {
// Required methods
fn address(&self, native: &str) -> Address;
fn hash(&self, native: &str) -> B256;
fn native_hash(&self, hash: &B256) -> Option<String>;
}Expand description
How native ids become EVM addresses and hashes, and (where possible) back again.
Required Methods§
fn address(&self, native: &str) -> Address
fn hash(&self, native: &str) -> B256
Sourcefn native_hash(&self, hash: &B256) -> Option<String>
fn native_hash(&self, hash: &B256) -> Option<String>
Recover the native id from a hash produced by IdMapper::hash, if this mapper can.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".