Skip to main content

Validate

Trait Validate 

Source
pub trait Validate: Validate {
    type T: Deref<Target = Self>;

    // Required method
    fn validate(self, block_hash: BlockHash) -> BlockSourceResult<Self::T>;
}
Expand description

The Validate trait defines behavior for validating chain data.

This trait is sealed and not meant to be implemented outside of this crate.

Required Associated Types§

Source

type T: Deref<Target = Self>

The validated data wrapper which can be dereferenced to obtain the validated data.

Required Methods§

Source

fn validate(self, block_hash: BlockHash) -> BlockSourceResult<Self::T>

Validates the chain data against the given block hash and any criteria needed to ensure that it is internally consistent.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§