pub trait Cacheable {
// Required methods
fn is_computed(&self) -> bool;
fn precompute(&mut self, parameters: &ConsensusParameters);
}
Expand description
Entity support metadata computation to cache results.
Required Methods§
sourcefn is_computed(&self) -> bool
fn is_computed(&self) -> bool
The cache is already computed.
Note: true
doesn’t mean that the cache is actual.
sourcefn precompute(&mut self, parameters: &ConsensusParameters)
fn precompute(&mut self, parameters: &ConsensusParameters)
Computes the cache for the entity.