pub struct ReadIOP<'a, S: Sha + 'a> { /* private fields */ }
Implementations§
source§impl<'a, S: Sha + 'a> ReadIOP<'a, S>
impl<'a, S: Sha + 'a> ReadIOP<'a, S>
pub fn new(sha: &'a S, proof: &'a [u32]) -> Self
pub fn get_sha(&self) -> &S
pub fn read_u32s(&mut self, n: usize) -> &'a [u32]
sourcepub fn read_field_elem_slice<T: Elem>(&mut self, n: usize) -> &'a [T] ⓘ
pub fn read_field_elem_slice<T: Elem>(&mut self, n: usize) -> &'a [T] ⓘ
Read some field elements from this IOP, and check to make sure they’re not INVALID.
sourcepub fn read_pod_slice<T: Pod>(&mut self, n: usize) -> &'a [T] ⓘ
pub fn read_pod_slice<T: Pod>(&mut self, n: usize) -> &'a [T] ⓘ
Read some plain old data from this IOP without doing any validation. Prefer to use read_field_elem_slice if reading field elements.
pub fn commit(&mut self, digest: &Digest)
sourcepub fn verify_complete(&self)
pub fn verify_complete(&self)
Checks that the entire data of the IOP has been read.
Trait Implementations§
Auto Trait Implementations§
impl<'a, S> RefUnwindSafe for ReadIOP<'a, S>where
S: RefUnwindSafe,
<S as Sha>::DigestPtr: RefUnwindSafe,
impl<'a, S> Send for ReadIOP<'a, S>where
S: Send,
<S as Sha>::DigestPtr: Send,
impl<'a, S> Sync for ReadIOP<'a, S>where
S: Sync,
<S as Sha>::DigestPtr: Sync,
impl<'a, S> Unpin for ReadIOP<'a, S>where
S: Unpin,
<S as Sha>::DigestPtr: Unpin,
impl<'a, S> UnwindSafe for ReadIOP<'a, S>where
S: UnwindSafe,
<S as Sha>::DigestPtr: UnwindSafe,
Blanket Implementations§
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>
§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<R> Rng for Rwhere
R: RngCore + ?Sized,
impl<R> Rng for Rwhere
R: RngCore + ?Sized,
source§fn gen<T>(&mut self) -> Twhere
Standard: Distribution<T>,
fn gen<T>(&mut self) -> Twhere
Standard: Distribution<T>,
source§fn gen_range<T, R>(&mut self, range: R) -> Twhere
T: SampleUniform,
R: SampleRange<T>,
fn gen_range<T, R>(&mut self, range: R) -> Twhere
T: SampleUniform,
R: SampleRange<T>,
Generate a random value in the given range. Read more
source§fn sample<T, D>(&mut self, distr: D) -> Twhere
D: Distribution<T>,
fn sample<T, D>(&mut self, distr: D) -> Twhere
D: Distribution<T>,
Sample a new value, using the given distribution. Read more
source§fn sample_iter<T, D>(self, distr: D) -> DistIter<D, Self, T>where
D: Distribution<T>,
Self: Sized,
fn sample_iter<T, D>(self, distr: D) -> DistIter<D, Self, T>where
D: Distribution<T>,
Self: Sized,
Create an iterator that generates values using the given distribution. Read more
source§fn gen_bool(&mut self, p: f64) -> bool
fn gen_bool(&mut self, p: f64) -> bool
Return a bool with a probability
p
of being true. Read moresource§fn gen_ratio(&mut self, numerator: u32, denominator: u32) -> bool
fn gen_ratio(&mut self, numerator: u32, denominator: u32) -> bool
Return a bool with a probability of
numerator/denominator
of being
true. I.e. gen_ratio(2, 3)
has chance of 2 in 3, or about 67%, of
returning true. If numerator == denominator
, then the returned value
is guaranteed to be true
. If numerator == 0
, then the returned
value is guaranteed to be false
. Read more