fuel_tx

Trait Cacheable

Source
pub trait Cacheable {
    // Required methods
    fn is_computed(&self) -> bool;
    fn precompute(&mut self, chain_id: &ChainId) -> Result<(), ValidityError>;
}
Expand description

Entity support metadata computation to cache results.

Required Methods§

Source

fn is_computed(&self) -> bool

The cache is already computed.

§Note: true doesn’t mean that the cache is actual.
Source

fn precompute(&mut self, chain_id: &ChainId) -> Result<(), ValidityError>

Computes the cache for the entity.

Implementors§