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§
Source§impl VerifierData
impl VerifierData
Sourcepub const fn new(key: VerifierKey, public_inputs_indexes: Vec<u32>) -> Self
pub const fn new(key: VerifierKey, public_inputs_indexes: Vec<u32>) -> 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) -> &[u32]
pub fn public_inputs_indexes(&self) -> &[u32]
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§
Source§impl Clone for VerifierData
impl Clone for VerifierData
Source§fn clone(&self) -> VerifierData
fn clone(&self) -> VerifierData
Returns a duplicate 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 VerifierData
impl Debug for VerifierData
Source§impl Decode for VerifierData
impl Decode for VerifierData
Source§impl Encode for VerifierData
impl Encode for VerifierData
Source§fn encode_to<__CodecOutputEdqy: Output + ?Sized>(
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy,
)
fn encode_to<__CodecOutputEdqy: Output + ?Sized>( &self, __codec_dest_edqy: &mut __CodecOutputEdqy, )
Convert self to a slice and append it to the destination.
Source§fn size_hint(&self) -> usize
fn size_hint(&self) -> usize
If possible give a hint of expected size of the encoding. Read more
Source§fn using_encoded<R, F>(&self, f: F) -> R
fn using_encoded<R, F>(&self, f: F) -> R
Convert self to a slice and then invoke the given closure with it.
Source§fn encoded_size(&self) -> usize
fn encoded_size(&self) -> usize
Calculates the encoded size. Read more
Source§impl PartialEq for VerifierData
impl PartialEq for VerifierData
impl EncodeLike for VerifierData
impl StructuralPartialEq for VerifierData
Auto Trait Implementations§
impl Freeze for VerifierData
impl RefUnwindSafe for VerifierData
impl Send for VerifierData
impl Sync for VerifierData
impl Unpin for VerifierData
impl UnwindSafe for VerifierData
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> DecodeLimit for Twhere
T: Decode,
impl<T> DecodeLimit for Twhere
T: Decode,
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