pub struct CompiledInvocationBuilder<'a> {
pub program_info: ProgramInfo<'a>,
pub invocation: &'a Invocation,
pub libfunc: &'a CoreConcreteLibfunc,
pub idx: StatementIdx,
pub refs: &'a [ReferenceValue],
pub environment: Environment,
}
Expand description
Helper for building compiled invocations.
Fields§
§program_info: ProgramInfo<'a>
§invocation: &'a Invocation
§libfunc: &'a CoreConcreteLibfunc
§idx: StatementIdx
§refs: &'a [ReferenceValue]
The arguments of the libfunc.
environment: Environment
Implementations§
source§impl CompiledInvocationBuilder<'_>
impl CompiledInvocationBuilder<'_>
sourcepub fn try_get_refs<const COUNT: usize>(
&self,
) -> Result<[&ReferenceExpression; COUNT], InvocationError>
pub fn try_get_refs<const COUNT: usize>( &self, ) -> Result<[&ReferenceExpression; COUNT], InvocationError>
Returns the reference expressions if the size is correct.
sourcepub fn try_get_single_cells<const COUNT: usize>(
&self,
) -> Result<[&CellExpression; COUNT], InvocationError>
pub fn try_get_single_cells<const COUNT: usize>( &self, ) -> Result<[&CellExpression; COUNT], InvocationError>
Returns the reference expressions, assuming all contains one cell if the size is correct.
Trait Implementations§
source§impl InvocationApChangeInfoProvider for CompiledInvocationBuilder<'_>
impl InvocationApChangeInfoProvider for CompiledInvocationBuilder<'_>
source§fn type_size(&self, ty: &ConcreteTypeId) -> usize
fn type_size(&self, ty: &ConcreteTypeId) -> usize
Provides the sizes of types.
source§fn token_usages(&self, token_type: CostTokenType) -> usize
fn token_usages(&self, token_type: CostTokenType) -> usize
Number of tokens provided by the libfunc invocation (currently only relevant for
withdraw_gas_all
).source§impl InvocationCostInfoProvider for CompiledInvocationBuilder<'_>
impl InvocationCostInfoProvider for CompiledInvocationBuilder<'_>
source§fn type_size(&self, ty: &ConcreteTypeId) -> usize
fn type_size(&self, ty: &ConcreteTypeId) -> usize
Provides the sizes of types.
source§fn ap_change_var_value(&self) -> usize
fn ap_change_var_value(&self) -> usize
Provides the ap change variable value of the current statement.
source§fn token_usages(&self, token_type: CostTokenType) -> usize
fn token_usages(&self, token_type: CostTokenType) -> usize
Number of tokens provided by the libfunc invocation (currently only relevant for
withdraw_gas_all
).source§fn circuit_info(&self, ty: &ConcreteTypeId) -> &CircuitInfo
fn circuit_info(&self, ty: &ConcreteTypeId) -> &CircuitInfo
Provides the info for the circuit.
Auto Trait Implementations§
impl<'a> Freeze for CompiledInvocationBuilder<'a>
impl<'a> !RefUnwindSafe for CompiledInvocationBuilder<'a>
impl<'a> !Send for CompiledInvocationBuilder<'a>
impl<'a> !Sync for CompiledInvocationBuilder<'a>
impl<'a> Unpin for CompiledInvocationBuilder<'a>
impl<'a> !UnwindSafe for CompiledInvocationBuilder<'a>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<InfoProvider> CostInfoProvider for InfoProviderwhere
InfoProvider: InvocationCostInfoProvider,
impl<InfoProvider> CostInfoProvider for InfoProviderwhere
InfoProvider: InvocationCostInfoProvider,
source§fn type_size(&self, ty: &ConcreteTypeId) -> usize
fn type_size(&self, ty: &ConcreteTypeId) -> usize
Provides the sizes of types.
source§fn circuit_info(&self, ty: &ConcreteTypeId) -> &CircuitInfo
fn circuit_info(&self, ty: &ConcreteTypeId) -> &CircuitInfo
Provides the info for the circuit.
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more