pub struct NonDeterminism {
pub individual_tokens: Vec<BFieldElement>,
pub digests: Vec<Digest>,
pub ram: HashMap<BFieldElement, BFieldElement>,
}
Expand description
All sources of non-determinism for a program. This includes elements that
can be read using instruction divine
, digests that can be read using
instruction merkle_step
, and an initial state of random-access memory.
Fields§
§individual_tokens: Vec<BFieldElement>
§digests: Vec<Digest>
§ram: HashMap<BFieldElement, BFieldElement>
Implementations§
Source§impl NonDeterminism
impl NonDeterminism
pub fn new<V: Into<Vec<BFieldElement>>>(individual_tokens: V) -> Self
pub fn with_digests<V: Into<Vec<Digest>>>(self, digests: V) -> Self
pub fn with_ram<H: Into<HashMap<BFieldElement, BFieldElement>>>( self, ram: H, ) -> Self
Trait Implementations§
Source§impl<'arbitrary> Arbitrary<'arbitrary> for NonDeterminism
impl<'arbitrary> Arbitrary<'arbitrary> for NonDeterminism
Source§fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<Self>
fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<Self>
Generate an arbitrary value of
Self
from the given unstructured data. Read moreSource§fn arbitrary_take_rest(u: Unstructured<'arbitrary>) -> Result<Self>
fn arbitrary_take_rest(u: Unstructured<'arbitrary>) -> Result<Self>
Generate an arbitrary value of
Self
from the entirety of the given
unstructured data. Read moreSource§impl Clone for NonDeterminism
impl Clone for NonDeterminism
Source§fn clone(&self) -> NonDeterminism
fn clone(&self) -> NonDeterminism
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 NonDeterminism
impl Debug for NonDeterminism
Source§impl Default for NonDeterminism
impl Default for NonDeterminism
Source§fn default() -> NonDeterminism
fn default() -> NonDeterminism
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for NonDeterminism
impl<'de> Deserialize<'de> for NonDeterminism
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<&[BFieldElement]> for NonDeterminism
impl From<&[BFieldElement]> for NonDeterminism
Source§fn from(tokens: &[BFieldElement]) -> Self
fn from(tokens: &[BFieldElement]) -> Self
Converts to this type from the input type.
Source§impl From<&Vec<BFieldElement>> for NonDeterminism
impl From<&Vec<BFieldElement>> for NonDeterminism
Source§fn from(tokens: &Vec<BFieldElement>) -> Self
fn from(tokens: &Vec<BFieldElement>) -> Self
Converts to this type from the input type.
Source§impl<const N: usize> From<[BFieldElement; N]> for NonDeterminism
impl<const N: usize> From<[BFieldElement; N]> for NonDeterminism
Source§fn from(tokens: [BFieldElement; N]) -> Self
fn from(tokens: [BFieldElement; N]) -> Self
Converts to this type from the input type.
Source§impl From<Vec<BFieldElement>> for NonDeterminism
impl From<Vec<BFieldElement>> for NonDeterminism
Source§fn from(tokens: Vec<BFieldElement>) -> Self
fn from(tokens: Vec<BFieldElement>) -> Self
Converts to this type from the input type.
Source§impl PartialEq for NonDeterminism
impl PartialEq for NonDeterminism
Source§impl Serialize for NonDeterminism
impl Serialize for NonDeterminism
impl Eq for NonDeterminism
impl StructuralPartialEq for NonDeterminism
Auto Trait Implementations§
impl Freeze for NonDeterminism
impl RefUnwindSafe for NonDeterminism
impl Send for NonDeterminism
impl Sync for NonDeterminism
impl Unpin for NonDeterminism
impl UnwindSafe for NonDeterminism
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.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