[−][src]Struct zkinterface::structs::constraints::ConstraintSystem
Fields
constraints: Vec<BilinearConstraint>
Implementations
impl ConstraintSystem
[src]
pub fn build<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>(
&'args self,
builder: &'mut_bldr mut FlatBufferBuilder<'bldr>
) -> WIPOffset<Root<'bldr>>
[src]
&'args self,
builder: &'mut_bldr mut FlatBufferBuilder<'bldr>
) -> WIPOffset<Root<'bldr>>
Add this structure into a Flatbuffers message builder.
pub fn write_into(&self, writer: &mut impl Write) -> Result<()>
[src]
Writes this constraint system as a Flatbuffers message into the provided buffer.
Examples
let mut buf = Vec::<u8>::new(); let constraints = zkinterface::ConstraintSystem::from(&[][..]); constraints.write_into(&mut buf).unwrap(); assert!(buf.len() > 0);
Trait Implementations
impl Clone for ConstraintSystem
[src]
fn clone(&self) -> ConstraintSystem
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for ConstraintSystem
[src]
impl Default for ConstraintSystem
[src]
fn default() -> ConstraintSystem
[src]
impl<'de> Deserialize<'de> for ConstraintSystem
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Eq for ConstraintSystem
[src]
impl<'_> From<&'_ [((Vec<u64>, Vec<u8>), (Vec<u64>, Vec<u8>), (Vec<u64>, Vec<u8>))]> for ConstraintSystem
[src]
fn from(
constraints_vec: &[((Vec<u64>, Vec<u8>), (Vec<u64>, Vec<u8>), (Vec<u64>, Vec<u8>))]
) -> ConstraintSystem
[src]
constraints_vec: &[((Vec<u64>, Vec<u8>), (Vec<u64>, Vec<u8>), (Vec<u64>, Vec<u8>))]
) -> ConstraintSystem
Creates a ConstraintSystem
from an R1CS vector
Examples
let constraints_vec: &[((Vec<u64>, Vec<u8>), (Vec<u64>, Vec<u8>), (Vec<u64>, Vec<u8>))] = &[ // (A ids values) * (B ids values) = (C ids values) ((vec![1], vec![1]), (vec![1], vec![1]), (vec![4], vec![1])), // x * x = xx ((vec![2], vec![1]), (vec![2], vec![1]), (vec![5], vec![1])), // y * y = yy ((vec![0], vec![1]), (vec![4, 5], vec![1, 1]), (vec![3], vec![1])), // 1 * (xx + yy) = z ]; let constraints = zkinterface::ConstraintSystem::from(constraints_vec);
impl<'a> From<ConstraintSystem<'a>> for ConstraintSystem
[src]
fn from(fb_cs: ConstraintSystem<'_>) -> ConstraintSystem
[src]
Convert from Flatbuffers references to owned structure.
impl PartialEq<ConstraintSystem> for ConstraintSystem
[src]
fn eq(&self, other: &ConstraintSystem) -> bool
[src]
fn ne(&self, other: &ConstraintSystem) -> bool
[src]
impl Serialize for ConstraintSystem
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl StructuralEq for ConstraintSystem
[src]
impl StructuralPartialEq for ConstraintSystem
[src]
impl<'a> TryFrom<&'a [u8]> for ConstraintSystem
[src]
Auto Trait Implementations
impl RefUnwindSafe for ConstraintSystem
impl Send for ConstraintSystem
impl Sync for ConstraintSystem
impl Unpin for ConstraintSystem
impl UnwindSafe for ConstraintSystem
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,