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<'a> InvocationApChangeInfoProvider for CompiledInvocationBuilder<'a>
impl<'a> InvocationApChangeInfoProvider for CompiledInvocationBuilder<'a>
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<'a> InvocationCostInfoProvider for CompiledInvocationBuilder<'a>
impl<'a> InvocationCostInfoProvider for CompiledInvocationBuilder<'a>
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