Struct dusk_cdf::Polynomial
source · [−]pub struct Polynomial { /* private fields */ }Expand description
PLONK polynomial expression representation with its selectors and witnesses.
Implementations
sourceimpl Polynomial
impl Polynomial
sourcepub const fn new(
qm: Scalar,
ql: Scalar,
qr: Scalar,
qd: Scalar,
qc: Scalar,
qo: Scalar,
pi: Scalar,
a: IndexedWitness,
b: IndexedWitness,
d: IndexedWitness,
o: IndexedWitness,
re: bool
) -> Self
pub const fn new(
qm: Scalar,
ql: Scalar,
qr: Scalar,
qd: Scalar,
qc: Scalar,
qo: Scalar,
pi: Scalar,
a: IndexedWitness,
b: IndexedWitness,
d: IndexedWitness,
o: IndexedWitness,
re: bool
) -> Self
Create a new polynomial
sourcepub const fn internals(
&self
) -> (&Scalar, &Scalar, &Scalar, &Scalar, &Scalar, &Scalar, &Scalar, &IndexedWitness, &IndexedWitness, &IndexedWitness, &IndexedWitness, bool)
pub const fn internals(
&self
) -> (&Scalar, &Scalar, &Scalar, &Scalar, &Scalar, &Scalar, &Scalar, &IndexedWitness, &IndexedWitness, &IndexedWitness, &IndexedWitness, bool)
Fetch the constraint internals
Trait Implementations
sourceimpl Clone for Polynomial
impl Clone for Polynomial
sourcefn clone(&self) -> Polynomial
fn clone(&self) -> Polynomial
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
sourceimpl Debug for Polynomial
impl Debug for Polynomial
sourceimpl Default for Polynomial
impl Default for Polynomial
sourcefn default() -> Polynomial
fn default() -> Polynomial
Returns the “default value” for a type. Read more
sourceimpl Element for Polynomial
impl Element for Polynomial
sourcefn to_buffer(
&self,
config: &Self::Config,
context: &mut ContextUnit,
buf: &mut [u8]
)
fn to_buffer(
&self,
config: &Self::Config,
context: &mut ContextUnit,
buf: &mut [u8]
)
Write the type into the buffer. Read more
sourcefn try_from_buffer_in_place<S>(
&mut self,
config: &Self::Config,
context: &mut Context<S>,
buf: &[u8]
) -> Result<()> where
S: Read + Seek,
fn try_from_buffer_in_place<S>(
&mut self,
config: &Self::Config,
context: &mut Context<S>,
buf: &[u8]
) -> Result<()> where
S: Read + Seek,
Deserialize the type from a given buffer Read more
sourcefn validate(&self, preamble: &Preamble) -> Result<()>
fn validate(&self, preamble: &Preamble) -> Result<()>
Perform the internal validations of the associated element
sourcefn validate_buffer_len(config: &Self::Config, len: usize) -> Result<()>
fn validate_buffer_len(config: &Self::Config, len: usize) -> Result<()>
Assert the buffer is big enough to store the type
sourcefn to_vec(&self, config: &Self::Config, context: &mut ContextUnit) -> Vec<u8>
fn to_vec(&self, config: &Self::Config, context: &mut ContextUnit) -> Vec<u8>
Serialize the object into a bytes array.
sourcefn try_from_buffer<S>(
config: &Self::Config,
context: &mut Context<S>,
buf: &[u8]
) -> Result<Self> where
S: Read + Seek,
fn try_from_buffer<S>(
config: &Self::Config,
context: &mut Context<S>,
buf: &[u8]
) -> Result<Self> where
S: Read + Seek,
Create a new instance of the type from the provided buffer
sourcefn try_decode_in_place<'a, S>(
&mut self,
config: &Self::Config,
context: &mut Context<S>,
buf: &'a [u8]
) -> Result<&'a [u8]> where
S: Read + Seek,
fn try_decode_in_place<'a, S>(
&mut self,
config: &Self::Config,
context: &mut Context<S>,
buf: &'a [u8]
) -> Result<&'a [u8]> where
S: Read + Seek,
Write an element from the buffer, and return the remainder bytes Read more
sourcefn try_decode<'a, S>(
config: &Self::Config,
context: &mut Context<S>,
buf: &'a [u8]
) -> Result<(Self, &'a [u8])> where
S: Read + Seek,
fn try_decode<'a, S>(
config: &Self::Config,
context: &mut Context<S>,
buf: &'a [u8]
) -> Result<(Self, &'a [u8])> where
S: Read + Seek,
Write an element from the buffer, and return the remainder bytes Read more
sourcefn encode<'a>(
&self,
config: &Self::Config,
context: &mut ContextUnit,
buf: &'a mut [u8]
) -> &'a mut [u8]ⓘNotable traits for &[u8]impl Read for &[u8]impl Write for &mut [u8]
fn encode<'a>(
&self,
config: &Self::Config,
context: &mut ContextUnit,
buf: &'a mut [u8]
) -> &'a mut [u8]ⓘNotable traits for &[u8]impl Read for &[u8]impl Write for &mut [u8]
Read an element into the buffer, returning the remainder bytes Read more
sourcefn try_to_writer<W>(
&self,
writer: W,
config: &Self::Config,
context: &mut ContextUnit
) -> Result<usize> where
W: Write,
fn try_to_writer<W>(
&self,
writer: W,
config: &Self::Config,
context: &mut ContextUnit
) -> Result<usize> where
W: Write,
Send the bytes representation of an element to a writer
sourceimpl Hash for Polynomial
impl Hash for Polynomial
sourceimpl PartialEq<Polynomial> for Polynomial
impl PartialEq<Polynomial> for Polynomial
sourcefn eq(&self, other: &Polynomial) -> bool
fn eq(&self, other: &Polynomial) -> bool
This method tests for self and other values to be equal, and is used
by ==. Read more
sourcefn ne(&self, other: &Polynomial) -> bool
fn ne(&self, other: &Polynomial) -> bool
This method tests for !=.
impl Copy for Polynomial
impl Eq for Polynomial
impl StructuralEq for Polynomial
impl StructuralPartialEq for Polynomial
Auto Trait Implementations
impl RefUnwindSafe for Polynomial
impl Send for Polynomial
impl Sync for Polynomial
impl Unpin for Polynomial
impl UnwindSafe for Polynomial
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