Struct risc0_zkvm_host::Prover
source · [−]pub struct Prover { /* private fields */ }
Expand description
The prover generates a Receipt by executing a given method in a ZKVM.
Implementations
sourceimpl Prover
impl Prover
sourcepub fn new(elf_contents: &[u8], method_id: &[u8]) -> Result<Self>
pub fn new(elf_contents: &[u8], method_id: &[u8]) -> Result<Self>
Create a new Prover with the given method (specified via
elf_contents
) and an associated method ID (specified via
method_id
).
sourcepub fn add_input(&mut self, slice: &[u32]) -> Result<()>
pub fn add_input(&mut self, slice: &[u32]) -> Result<()>
Provide private input data that is availble to guest-side method code to ‘read’.
sourcepub fn get_output(&self) -> Result<&[u8]>
pub fn get_output(&self) -> Result<&[u8]>
Provide access to private output data written by guest-side method code.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Prover
impl !Send for Prover
impl !Sync for Prover
impl Unpin for Prover
impl UnwindSafe for Prover
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more