Struct dusk_plonk::circuit::VerifierData
source · [−]pub struct VerifierData { /* private fields */ }
Expand description
Collection of structs/objects that the Verifier will use in order to
de/serialize data needed for Circuit proof verification.
This structure can be seen as a link between the Circuit
public input
positions and the VerifierKey
that the Verifier needs to use.
Implementations
sourceimpl VerifierData
impl VerifierData
sourcepub const fn new(key: VerifierKey, public_inputs_indexes: Vec<usize>) -> Self
pub const fn new(key: VerifierKey, public_inputs_indexes: Vec<usize>) -> Self
Creates a new VerifierData
from a VerifierKey
and the public
input positions of the circuit that it represents.
sourcepub const fn key(&self) -> &VerifierKey
pub const fn key(&self) -> &VerifierKey
Returns a reference to the contained VerifierKey
.
sourcepub fn public_inputs_indexes(&self) -> &[usize]
pub fn public_inputs_indexes(&self) -> &[usize]
Returns a reference to the contained Public Input positions.
sourcepub fn to_var_bytes(&self) -> Vec<u8>
pub fn to_var_bytes(&self) -> Vec<u8>
Deserializes the VerifierData
into a vector of bytes.
sourcepub fn from_slice(buf: &[u8]) -> Result<Self, Error>
pub fn from_slice(buf: &[u8]) -> Result<Self, Error>
Serializes VerifierData
from a slice of bytes.
Trait Implementations
sourceimpl Clone for VerifierData
impl Clone for VerifierData
sourcefn clone(&self) -> VerifierData
fn clone(&self) -> VerifierData
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
Auto Trait Implementations
impl RefUnwindSafe for VerifierData
impl Send for VerifierData
impl Sync for VerifierData
impl Unpin for VerifierData
impl UnwindSafe for VerifierData
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