pub trait RuntimeIndexer {
type RuntimeConfig: Config;
type ChainKey: IndexKey + Serialize + for<'a> Deserialize<'a> + Clone + Eq + PartialEq + Hash + Send;
// Required methods
fn get_name() -> &'static str;
fn get_genesis_hash() -> <Self::RuntimeConfig as Config>::Hash;
fn get_versions() -> &'static [u32];
fn get_default_url() -> &'static str;
fn process_event(
indexer: &Indexer<Self>,
block_number: u32,
event_index: u16,
event: EventDetails<Self::RuntimeConfig>,
) -> Result<u32, IndexError>;
}Expand description
Indexer for a specific chain
Required Associated Types§
type RuntimeConfig: Config
type ChainKey: IndexKey + Serialize + for<'a> Deserialize<'a> + Clone + Eq + PartialEq + Hash + Send
Required Methods§
fn get_name() -> &'static str
fn get_genesis_hash() -> <Self::RuntimeConfig as Config>::Hash
fn get_versions() -> &'static [u32]
fn get_default_url() -> &'static str
fn process_event( indexer: &Indexer<Self>, block_number: u32, event_index: u16, event: EventDetails<Self::RuntimeConfig>, ) -> Result<u32, IndexError>
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.