pub trait EthMappingsStore {
// Required methods
fn read_bin(&self, key: &EthHash) -> Result<Option<Vec<u8>>>;
fn write_bin(&self, key: &EthHash, value: &[u8]) -> Result<()>;
fn exists(&self, key: &EthHash) -> Result<bool>;
fn get_message_cids(&self) -> Result<Vec<(Cid, u64)>>;
fn delete(&self, keys: Vec<EthHash>) -> Result<()>;
}Expand description
Interface used to store and retrieve Ethereum mappings from the database.
To store IPLD blocks, use the BlockStore trait.
Required Methods§
Sourcefn read_bin(&self, key: &EthHash) -> Result<Option<Vec<u8>>>
fn read_bin(&self, key: &EthHash) -> Result<Option<Vec<u8>>>
Reads binary field from the EthMappings store. This should be used for
non-serializable data. For serializable data, use EthMappingsStoreExt::read_obj.
Sourcefn write_bin(&self, key: &EthHash, value: &[u8]) -> Result<()>
fn write_bin(&self, key: &EthHash, value: &[u8]) -> Result<()>
Writes binary field to the EthMappings store. This should be used for
non-serializable data. For serializable data, use EthMappingsStoreExt::write_obj.