#[repr(transparent)]pub struct DynamicPolyVec<E>(pub Vec<DynamicPolynomial<E>>);Expand description
Unfortunately, we cannot implement of GenTranscribable for
Vec<DynamicPolynomial<E>> since they both are foreign types, so we define
this wrapper as a workaround.
Polynomials are transcribed as raw elements without any field metadata: the field config is bound into the transcript separately, when the field is sampled. Polynomials are written untrimmed (trimming requires a config), so writers should trim beforehand if proof size matters.
Tuple Fields§
§0: Vec<DynamicPolynomial<E>>Implementations§
Source§impl<E> DynamicPolyVec<E>
impl<E> DynamicPolyVec<E>
pub fn reinterpret(value: &Vec<DynamicPolynomial<E>>) -> &Self
Trait Implementations§
Source§impl<E: Clone> Clone for DynamicPolyVec<E>
impl<E: Clone> Clone for DynamicPolyVec<E>
Source§fn clone(&self) -> DynamicPolyVec<E>
fn clone(&self) -> DynamicPolyVec<E>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<E: Debug> Debug for DynamicPolyVec<E>
impl<E: Debug> Debug for DynamicPolyVec<E>
Source§impl<E: Default> Default for DynamicPolyVec<E>
impl<E: Default> Default for DynamicPolyVec<E>
Source§fn default() -> DynamicPolyVec<E>
fn default() -> DynamicPolyVec<E>
Returns the “default value” for a type. Read more
Source§impl<E> From<Vec<DynamicPolynomial<E>>> for DynamicPolyVec<E>
impl<E> From<Vec<DynamicPolynomial<E>>> for DynamicPolyVec<E>
Source§fn from(value: Vec<DynamicPolynomial<E>>) -> Self
fn from(value: Vec<DynamicPolynomial<E>>) -> Self
Converts to this type from the input type.
Source§impl<E> GenTranscribable for DynamicPolyVec<E>where
E: ConstTranscribable,
impl<E> GenTranscribable for DynamicPolyVec<E>where
E: ConstTranscribable,
Source§fn read_transcription_bytes_exact(bytes: &[u8]) -> Self
fn read_transcription_bytes_exact(bytes: &[u8]) -> Self
Creates a new instance from a byte buffer.
The buffer must be exactly the expected length.
Source§fn write_transcription_bytes_exact(&self, buf: &mut [u8])
fn write_transcription_bytes_exact(&self, buf: &mut [u8])
Transcribes the current instance into a byte buffer.
The buffer must be exactly the expected length.
Source§impl<E: Hash> Hash for DynamicPolyVec<E>
impl<E: Hash> Hash for DynamicPolyVec<E>
Source§impl<E: PartialEq> PartialEq for DynamicPolyVec<E>
impl<E: PartialEq> PartialEq for DynamicPolyVec<E>
Source§fn eq(&self, other: &DynamicPolyVec<E>) -> bool
fn eq(&self, other: &DynamicPolyVec<E>) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl<E> Transcribable for DynamicPolyVec<E>where
E: ConstTranscribable,
impl<E> Transcribable for DynamicPolyVec<E>where
E: ConstTranscribable,
Source§fn get_num_bytes(&self) -> usize
fn get_num_bytes(&self) -> usize
Returns the number of bytes required to represent this type.
The buffer passed to
write_transcription_bytes should be exactly the
length returned by this function.§const LENGTH_NUM_BYTES: usize = u32::NUM_BYTES
const LENGTH_NUM_BYTES: usize = u32::NUM_BYTES
Number of bytes required to represent length of this type, could be
zero if known in advance.
§fn read_num_bytes(bytes: &[u8]) -> usize
fn read_num_bytes(bytes: &[u8]) -> usize
Read number of bytes required to represent this type.
The buffer must be exactly
LENGTH_NUM_BYTES long.
The buffer passed to read_transcription_bytes should be exactly the
length returned by this function.§fn read_transcription_bytes_subset(bytes: &[u8]) -> (Self, &[u8])
fn read_transcription_bytes_subset(bytes: &[u8]) -> (Self, &[u8])
Reads an instance of this type from the beginning of the byte slice, and
returns the instance along with the remaining byte slice.
§fn write_transcription_bytes_subset<'a>(
&self,
buf: &'a mut [u8],
) -> &'a mut [u8] ⓘ
fn write_transcription_bytes_subset<'a>( &self, buf: &'a mut [u8], ) -> &'a mut [u8] ⓘ
Writes this instance, prefixed by length, into the beginning of the byte
buffer, and returns the remaining byte buffer.
impl<E: Eq> Eq for DynamicPolyVec<E>
impl<E> StructuralPartialEq for DynamicPolyVec<E>
Auto Trait Implementations§
impl<E> Freeze for DynamicPolyVec<E>
impl<E> RefUnwindSafe for DynamicPolyVec<E>where
E: RefUnwindSafe,
impl<E> Send for DynamicPolyVec<E>where
E: Send,
impl<E> Sync for DynamicPolyVec<E>where
E: Sync,
impl<E> Unpin for DynamicPolyVec<E>where
E: Unpin,
impl<E> UnsafeUnpin for DynamicPolyVec<E>
impl<E> UnwindSafe for DynamicPolyVec<E>where
E: UnwindSafe,
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> 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