Enum miden_processor::AdviceSource
source · pub enum AdviceSource {
Value(Felt),
Map {
key: Word,
},
}
Expand description
Placeholder for advice provider tape mutation.
Variants§
Value(Felt)
Writes a single value to the head of the advice tape.
Map
Fetch a keyed tape from the values map, reversing and appending it to the advice tape.
Note: this operation shouldn’t consume the map element so it can be called multiple times for the same key.
Example
Given an advice tape [a,b,c]
, and a map x |-> [d,e,f]
, a call write_tape_from_map(x)
will result in [a,b,c,f,e,d]
for the advice tape, and will preserve x |-> [d,e,f]
.
Errors
Returns an error if the key was not found in the key-value map.
Trait Implementations§
source§impl Clone for AdviceSource
impl Clone for AdviceSource
source§fn clone(&self) -> AdviceSource
fn clone(&self) -> AdviceSource
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for AdviceSource
impl Debug for AdviceSource
source§impl PartialEq<AdviceSource> for AdviceSource
impl PartialEq<AdviceSource> for AdviceSource
source§fn eq(&self, other: &AdviceSource) -> bool
fn eq(&self, other: &AdviceSource) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.