[][src]Struct resource_proof::ResourceProver

pub struct ResourceProver { /* fields omitted */ }

Object used to compute a result

Methods

impl ResourceProver[src]

pub fn expected_steps(&self) -> u64[src]

The expected number of steps is pow(2, difficulty). The process is probabilistic, so the actual number of steps required may be more or less.

The length of each step depends on data size. Total expected time is proportional to length * pow(2, difficulty).

pub fn try_step(&mut self) -> Option<u64>[src]

Try one step; if successful return the proof result.

(This does not invalidate the prover. Continuing might find another valid solution.)

pub fn solve(&mut self) -> u64[src]

Keep stepping until a solution is found. Expected time can be calculated roughly (see expected_steps) but there is no upper bound (besides u64::MAX).

Auto Trait Implementations

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]