pub trait ConsensusState:
Send
+ Sync
+ Convertible<Any> {
// Required methods
fn root(&self) -> &CommitmentRoot;
fn timestamp(&self) -> Result<Timestamp, ClientError>;
}
Expand description
Defines methods that all ConsensusState
s should provide.
One can think of a “consensus state” as a pruned header, to be stored on chain. In other words, a consensus state only contains the header’s information needed by IBC message handlers.
Required Methods§
Sourcefn root(&self) -> &CommitmentRoot
fn root(&self) -> &CommitmentRoot
Commitment root of the consensus state, which is used for key-value pair verification.
Sourcefn timestamp(&self) -> Result<Timestamp, ClientError>
fn timestamp(&self) -> Result<Timestamp, ClientError>
The timestamp of the consensus state
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.