pub trait ChainDataSourceFactory:
Send
+ Sync
+ 'static {
type Source: ChainDataSource + 'static;
// Required method
fn create(&self, chain_id: u64) -> Result<Self::Source, SourceError>;
// Provided methods
fn supports_full_headers(&self, _chain_id: u64) -> bool { ... }
fn supports_full_headers_on_any_chain(&self) -> bool { ... }
}Expand description
Factory for independently configured per-chain data sources.
Required Associated Types§
Sourcetype Source: ChainDataSource + 'static
type Source: ChainDataSource + 'static
Source implementation produced for each managed session.
Required Methods§
Sourcefn create(&self, chain_id: u64) -> Result<Self::Source, SourceError>
fn create(&self, chain_id: u64) -> Result<Self::Source, SourceError>
Create a source for one EVM chain.
§Errors
Returns SourceError when the chain is unsupported or its
provider/client configuration cannot be constructed.
Provided Methods§
Sourcefn supports_full_headers(&self, _chain_id: u64) -> bool
fn supports_full_headers(&self, _chain_id: u64) -> bool
Whether this factory can reconstruct and hash-verify complete headers on a chain.
Sourcefn supports_full_headers_on_any_chain(&self) -> bool
fn supports_full_headers_on_any_chain(&self) -> bool
Whether any configured chain supports complete hash-verified headers.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".