pub struct EncodableWitness { /* private fields */ }Expand description
Witness that can be encoded into a CDF file
Implementations§
Source§impl EncodableWitness
impl EncodableWitness
Sourcepub const fn new(
id: usize,
constraint: Option<usize>,
value: Scalar,
source: EncodableSource,
) -> Self
pub const fn new( id: usize, constraint: Option<usize>, value: Scalar, source: EncodableSource, ) -> Self
Create a new encodable witness instance
Sourcepub const fn constraint(&self) -> Option<usize>
pub const fn constraint(&self) -> Option<usize>
Constraint that originated the witness
Sourcepub const fn source(&self) -> &EncodableSource
pub const fn source(&self) -> &EncodableSource
Source reference to be encoded
Trait Implementations§
Source§impl Clone for EncodableWitness
impl Clone for EncodableWitness
Source§fn clone(&self) -> EncodableWitness
fn clone(&self) -> EncodableWitness
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 EncodableWitness
impl Debug for EncodableWitness
Source§impl Default for EncodableWitness
impl Default for EncodableWitness
Source§fn default() -> EncodableWitness
fn default() -> EncodableWitness
Returns the “default value” for a type. Read more
Source§impl Element for EncodableWitness
impl Element for EncodableWitness
Source§impl EncodableElement for EncodableWitness
impl EncodableElement for EncodableWitness
Source§fn to_buffer(&self, ctx: &mut EncoderContext, buf: &mut [u8])
fn to_buffer(&self, ctx: &mut EncoderContext, buf: &mut [u8])
Write the type into the buffer. Read more
Source§fn to_vec(&self, ctx: &mut EncoderContext) -> Vec<u8> ⓘ
fn to_vec(&self, ctx: &mut EncoderContext) -> Vec<u8> ⓘ
Serialize the object into a bytes array.
Source§impl Hash for EncodableWitness
impl Hash for EncodableWitness
Source§impl Ord for EncodableWitness
impl Ord for EncodableWitness
Source§fn cmp(&self, other: &EncodableWitness) -> Ordering
fn cmp(&self, other: &EncodableWitness) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for EncodableWitness
impl PartialEq for EncodableWitness
Source§impl PartialOrd for EncodableWitness
impl PartialOrd for EncodableWitness
impl Eq for EncodableWitness
impl StructuralPartialEq for EncodableWitness
Auto Trait Implementations§
impl Freeze for EncodableWitness
impl RefUnwindSafe for EncodableWitness
impl Send for EncodableWitness
impl Sync for EncodableWitness
impl Unpin for EncodableWitness
impl UnwindSafe for EncodableWitness
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