pub trait Primitives: NodePrimitives {
type ChainSpec: Debug;
type HaltReason: Debug;
// Required methods
fn build_spec(
genesis: &Genesis,
) -> Result<Arc<Self::ChainSpec>, ClientError>;
fn validate_header(
header: &SealedHeader,
chain_spec: Arc<Self::ChainSpec>,
) -> Result<(), ConsensusError>;
fn transact<DB>(
input: &ContractInput,
db: DB,
header: &Header,
difficulty: U256,
chain_spec: Arc<Self::ChainSpec>,
) -> Result<ResultAndState<Self::HaltReason>, String>
where DB: Database;
}
Required Associated Types§
Required Methods§
fn build_spec(genesis: &Genesis) -> Result<Arc<Self::ChainSpec>, ClientError>
fn validate_header( header: &SealedHeader, chain_spec: Arc<Self::ChainSpec>, ) -> Result<(), ConsensusError>
fn transact<DB>(
input: &ContractInput,
db: DB,
header: &Header,
difficulty: U256,
chain_spec: Arc<Self::ChainSpec>,
) -> Result<ResultAndState<Self::HaltReason>, String>where
DB: Database,
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.