cairo_lang_sierra_gas::objects

Trait CostInfoProvider

source
pub trait CostInfoProvider {
    // Required methods
    fn type_size(&self, ty: &ConcreteTypeId) -> usize;
    fn circuit_info(&self, ty: &ConcreteTypeId) -> &CircuitInfo;
}
Expand description

Trait for providing extra information required for calculating costs for a specific libfunc invocation.

Required Methods§

source

fn type_size(&self, ty: &ConcreteTypeId) -> usize

Provides the sizes of types.

source

fn circuit_info(&self, ty: &ConcreteTypeId) -> &CircuitInfo

Provides the info for the circuit.

Implementors§

source§

impl<InfoProvider: InvocationCostInfoProvider> CostInfoProvider for InfoProvider