Trait finite_wasm::gas::Config
source · pub trait Config<'b> {
type GasVisitor<'s>: VisitOperatorWithOffset<'b, Output = Result<(), Error>>
where Self: 's;
// Required methods
fn make_visitor<'s>(
&'s mut self,
state: &'s mut FunctionState
) -> Self::GasVisitor<'s>;
fn save_outcomes(
&self,
state: &mut FunctionState,
destination: &mut AnalysisOutcome
);
}Expand description
The configuration for the gas analysis.
Note that this trait is not intended to be implemented directly. Implement
finite_wasm::wasmparser::VisitOperator with type Output = u64, where each of the visit_* methods return a gas cost for the specific instrution being
visited. Implementers of such trait will also implement gas::Config by definition.