Struct triton_vm::program::NonDeterminism
source · 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 divine_sibling,
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§fn eq(&self, other: &NonDeterminism) -> bool
fn eq(&self, other: &NonDeterminism) -> bool
This method tests for
self and other values to be equal, and is used
by ==.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> 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