diff --git a/docs/apidocs/.lock b/docs/apidocs/.lock new file mode 100644 index 00000000..e69de29b diff --git a/docs/apidocs/CNAME b/docs/apidocs/CNAME new file mode 100644 index 00000000..03ba660d --- /dev/null +++ b/docs/apidocs/CNAME @@ -0,0 +1 @@ +apidocs.pecadorplonkish.xyz diff --git a/docs/apidocs/chiquito/all.html b/docs/apidocs/chiquito/all.html new file mode 100644 index 00000000..b41d11f5 --- /dev/null +++ b/docs/apidocs/chiquito/all.html @@ -0,0 +1 @@ +List of all items in this crate

List of all items

Structs

Enums

Traits

Functions

Type Definitions

Constants

\ No newline at end of file diff --git a/docs/apidocs/chiquito/ast/enum.ExposeOffset.html b/docs/apidocs/chiquito/ast/enum.ExposeOffset.html new file mode 100644 index 00000000..208a4504 --- /dev/null +++ b/docs/apidocs/chiquito/ast/enum.ExposeOffset.html @@ -0,0 +1,104 @@ +ExposeOffset in chiquito::ast - Rust
pub enum ExposeOffset {
+    First,
+    Last,
+    Step(usize),
+}

Variants§

§

First

§

Last

§

Step(usize)

Trait Implementations§

source§

impl Clone for ExposeOffset

source§

fn clone(&self) -> ExposeOffset

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for ExposeOffset

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for ExposeOffset

source§

fn deserialize<D>(deserializer: D) -> Result<ExposeOffset, D::Error>where + D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Copy for ExposeOffset

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Conv for T

§

fn conv<T>(self) -> Twhere + Self: Into<T>,

Converts self into T using Into<T>. Read more
§

impl<T> FmtForward for T

§

fn fmt_binary(self) -> FmtBinary<Self>where + Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
§

fn fmt_display(self) -> FmtDisplay<Self>where + Self: Display,

Causes self to use its Display implementation when +Debug-formatted.
§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>where + Self: LowerExp,

Causes self to use its LowerExp implementation when +Debug-formatted.
§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>where + Self: LowerHex,

Causes self to use its LowerHex implementation when +Debug-formatted.
§

fn fmt_octal(self) -> FmtOctal<Self>where + Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
§

fn fmt_pointer(self) -> FmtPointer<Self>where + Self: Pointer,

Causes self to use its Pointer implementation when +Debug-formatted.
§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>where + Self: UpperExp,

Causes self to use its UpperExp implementation when +Debug-formatted.
§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>where + Self: UpperHex,

Causes self to use its UpperHex implementation when +Debug-formatted.
§

fn fmt_list(self) -> FmtList<Self>where + &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
§

impl<T> Pipe for Twhere + T: ?Sized,

§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere + Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere + R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere + R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> Rwhere + Self: Borrow<B>, + B: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
§

fn pipe_borrow_mut<'a, B, R>( + &'a mut self, + func: impl FnOnce(&'a mut B) -> R +) -> Rwhere + Self: BorrowMut<B>, + B: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe +function. Read more
§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> Rwhere + Self: AsRef<U>, + U: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> Rwhere + Self: AsMut<U>, + U: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe +function.
§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> Rwhere + Self: Deref<Target = T>, + T: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.deref() into the pipe function.
§

fn pipe_deref_mut<'a, T, R>( + &'a mut self, + func: impl FnOnce(&'a mut T) -> R +) -> Rwhere + Self: DerefMut<Target = T> + Deref, + T: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe +function.
§

impl<T> Pointable for T

§

const ALIGN: usize = mem::align_of::<T>()

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
§

impl<T> Tap for T

§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Selfwhere + Self: Borrow<B>, + B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere + Self: BorrowMut<B>, + B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Selfwhere + Self: AsRef<R>, + R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere + Self: AsMut<R>, + R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Selfwhere + Self: Deref<Target = T>, + T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Selfwhere + Self: Borrow<B>, + B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere + Self: BorrowMut<B>, + B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release +builds.
§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Selfwhere + Self: AsRef<R>, + R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release +builds.
§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere + Self: AsMut<R>, + R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release +builds.
§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Selfwhere + Self: Deref<Target = T>, + T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release +builds.
§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release +builds.
source§

impl<T> ToOwned for Twhere + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
§

impl<T> TryConv for T

§

fn try_conv<T>(self) -> Result<T, Self::Error>where + Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for Twhere + T: for<'de> Deserialize<'de>,

§

impl<T> Ungil for Twhere + T: Send,

\ No newline at end of file diff --git a/docs/apidocs/chiquito/ast/index.html b/docs/apidocs/chiquito/ast/index.html new file mode 100644 index 00000000..ae89bce2 --- /dev/null +++ b/docs/apidocs/chiquito/ast/index.html @@ -0,0 +1 @@ +chiquito::ast - Rust

Module chiquito::ast

source ·

Modules

Structs

Enums

Type Definitions

\ No newline at end of file diff --git a/docs/apidocs/chiquito/ast/query/enum.Queriable.html b/docs/apidocs/chiquito/ast/query/enum.Queriable.html new file mode 100644 index 00000000..7f87c821 --- /dev/null +++ b/docs/apidocs/chiquito/ast/query/enum.Queriable.html @@ -0,0 +1,129 @@ +Queriable in chiquito::ast::query - Rust
pub enum Queriable<F> {
+    Internal(InternalSignal),
+    Forward(ForwardSignal, bool),
+    Shared(SharedSignal, i32),
+    Fixed(FixedSignal, i32),
+    StepTypeNext(StepTypeHandler),
+    Halo2AdviceQuery(ImportedHalo2Advice, i32),
+    Halo2FixedQuery(ImportedHalo2Fixed, i32),
+    _unaccessible(PhantomData<F>),
+}

Variants§

§

Internal(InternalSignal)

§

Forward(ForwardSignal, bool)

§

Shared(SharedSignal, i32)

§

Fixed(FixedSignal, i32)

§

StepTypeNext(StepTypeHandler)

§

Halo2AdviceQuery(ImportedHalo2Advice, i32)

§

Halo2FixedQuery(ImportedHalo2Fixed, i32)

§

_unaccessible(PhantomData<F>)

Implementations§

source§

impl<F> Queriable<F>

source

pub fn next(&self) -> Queriable<F>

Call next function on a Querible forward signal to build constraints for forward +signal with rotation. Cannot be called on an internal signal and must be used within a +transition constraint. Returns a new Queriable forward signal with rotation.

+
source

pub fn prev(&self) -> Queriable<F>

Call prev function on a Querible shared signal to build constraints for shared +signal that decreases rotation by 1. Must be called on a shared signal and used within a +transition constraint. Returns a new Queriable shared signal with positive or +negative rotation.

+
source

pub fn rot(&self, rotation: i32) -> Queriable<F>

Call rot function on a Querible shared signal to build constraints for shared signal +with arbitrary rotation. Must be called on a shared signal and used within a +transition constraint. Returns a new Queriable shared signal with positive or +negative rotation.

+
source

pub fn uuid(&self) -> u128

source

pub fn annotation(&self) -> String

Trait Implementations§

source§

impl<F: Clone, RHS: Into<ASTExpr<F>>> Add<RHS> for Queriable<F>

§

type Output = Expr<F, Queriable<F>>

The resulting type after applying the + operator.
source§

fn add(self, rhs: RHS) -> Self::Output

Performs the + operation. Read more
source§

impl<F: Clone> Clone for Queriable<F>

source§

fn clone(&self) -> Queriable<F>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<F> Debug for Queriable<F>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for Queriable<Fr>

source§

fn deserialize<D>(deserializer: D) -> Result<Queriable<Fr>, D::Error>where + D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl<F> From<Queriable<F>> for ASTExpr<F>

source§

fn from(value: Queriable<F>) -> Self

Converts to this type from the input type.
source§

impl<F> From<Queriable<F>> for Constraint<F>

source§

fn from(query: Queriable<F>) -> Self

Converts to this type from the input type.
source§

impl<F: Hash> Hash for Queriable<F>

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)where + H: Hasher, + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl<F: Clone, RHS: Into<ASTExpr<F>>> Mul<RHS> for Queriable<F>

§

type Output = Expr<F, Queriable<F>>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: RHS) -> Self::Output

Performs the * operation. Read more
source§

impl<F: Clone> Neg for Queriable<F>

§

type Output = Expr<F, Queriable<F>>

The resulting type after applying the - operator.
source§

fn neg(self) -> Self::Output

Performs the unary - operation. Read more
source§

impl<F: PartialEq> PartialEq<Queriable<F>> for Queriable<F>

source§

fn eq(&self, other: &Queriable<F>) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl<F: Clone, RHS: Into<ASTExpr<F>>> Sub<RHS> for Queriable<F>

§

type Output = Expr<F, Queriable<F>>

The resulting type after applying the - operator.
source§

fn sub(self, rhs: RHS) -> Self::Output

Performs the - operation. Read more
source§

impl<F: Clone> ToExpr<F, Queriable<F>> for Queriable<F>

source§

fn expr(&self) -> ASTExpr<F>

source§

impl<F: Copy> Copy for Queriable<F>

source§

impl<F: Eq> Eq for Queriable<F>

source§

impl<F> StructuralEq for Queriable<F>

source§

impl<F> StructuralPartialEq for Queriable<F>

Auto Trait Implementations§

§

impl<F> RefUnwindSafe for Queriable<F>where + F: RefUnwindSafe,

§

impl<F> Send for Queriable<F>where + F: Send,

§

impl<F> Sync for Queriable<F>where + F: Sync,

§

impl<F> Unpin for Queriable<F>where + F: Unpin,

§

impl<F> UnwindSafe for Queriable<F>where + F: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for Twhere + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Conv for T

§

fn conv<T>(self) -> Twhere + Self: Into<T>,

Converts self into T using Into<T>. Read more
§

impl<T> FmtForward for T

§

fn fmt_binary(self) -> FmtBinary<Self>where + Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
§

fn fmt_display(self) -> FmtDisplay<Self>where + Self: Display,

Causes self to use its Display implementation when +Debug-formatted.
§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>where + Self: LowerExp,

Causes self to use its LowerExp implementation when +Debug-formatted.
§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>where + Self: LowerHex,

Causes self to use its LowerHex implementation when +Debug-formatted.
§

fn fmt_octal(self) -> FmtOctal<Self>where + Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
§

fn fmt_pointer(self) -> FmtPointer<Self>where + Self: Pointer,

Causes self to use its Pointer implementation when +Debug-formatted.
§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>where + Self: UpperExp,

Causes self to use its UpperExp implementation when +Debug-formatted.
§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>where + Self: UpperHex,

Causes self to use its UpperHex implementation when +Debug-formatted.
§

fn fmt_list(self) -> FmtList<Self>where + &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
§

impl<T> Pipe for Twhere + T: ?Sized,

§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere + Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere + R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere + R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> Rwhere + Self: Borrow<B>, + B: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
§

fn pipe_borrow_mut<'a, B, R>( + &'a mut self, + func: impl FnOnce(&'a mut B) -> R +) -> Rwhere + Self: BorrowMut<B>, + B: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe +function. Read more
§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> Rwhere + Self: AsRef<U>, + U: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> Rwhere + Self: AsMut<U>, + U: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe +function.
§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> Rwhere + Self: Deref<Target = T>, + T: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.deref() into the pipe function.
§

fn pipe_deref_mut<'a, T, R>( + &'a mut self, + func: impl FnOnce(&'a mut T) -> R +) -> Rwhere + Self: DerefMut<Target = T> + Deref, + T: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe +function.
§

impl<T> Pointable for T

§

const ALIGN: usize = mem::align_of::<T>()

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
§

impl<T> Tap for T

§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Selfwhere + Self: Borrow<B>, + B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere + Self: BorrowMut<B>, + B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Selfwhere + Self: AsRef<R>, + R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere + Self: AsMut<R>, + R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Selfwhere + Self: Deref<Target = T>, + T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Selfwhere + Self: Borrow<B>, + B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere + Self: BorrowMut<B>, + B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release +builds.
§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Selfwhere + Self: AsRef<R>, + R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release +builds.
§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere + Self: AsMut<R>, + R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release +builds.
§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Selfwhere + Self: Deref<Target = T>, + T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release +builds.
§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release +builds.
source§

impl<T> ToOwned for Twhere + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
§

impl<T> TryConv for T

§

fn try_conv<T>(self) -> Result<T, Self::Error>where + Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for Twhere + T: for<'de> Deserialize<'de>,

§

impl<T> Ungil for Twhere + T: Send,

\ No newline at end of file diff --git a/docs/apidocs/chiquito/ast/query/index.html b/docs/apidocs/chiquito/ast/query/index.html new file mode 100644 index 00000000..54e597d1 --- /dev/null +++ b/docs/apidocs/chiquito/ast/query/index.html @@ -0,0 +1 @@ +chiquito::ast::query - Rust

Module chiquito::ast::query

source ·

Enums

\ No newline at end of file diff --git a/docs/apidocs/chiquito/ast/query/sidebar-items.js b/docs/apidocs/chiquito/ast/query/sidebar-items.js new file mode 100644 index 00000000..5e5de215 --- /dev/null +++ b/docs/apidocs/chiquito/ast/query/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"enum":["Queriable"]}; \ No newline at end of file diff --git a/docs/apidocs/chiquito/ast/sidebar-items.js b/docs/apidocs/chiquito/ast/sidebar-items.js new file mode 100644 index 00000000..f6c34b90 --- /dev/null +++ b/docs/apidocs/chiquito/ast/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"enum":["ExposeOffset"],"mod":["query"],"struct":["Circuit","Constraint","FixedSignal","ForwardSignal","ImportedHalo2Column","InternalSignal","Lookup","SharedSignal","StepType","TransitionConstraint"],"type":["ASTExpr","FixedGen","ImportedHalo2Advice","ImportedHalo2Fixed","StepTypeUUID"]}; \ No newline at end of file diff --git a/docs/apidocs/chiquito/ast/struct.Circuit.html b/docs/apidocs/chiquito/ast/struct.Circuit.html new file mode 100644 index 00000000..6facfe71 --- /dev/null +++ b/docs/apidocs/chiquito/ast/struct.Circuit.html @@ -0,0 +1,138 @@ +Circuit in chiquito::ast - Rust

Struct chiquito::ast::Circuit

source ·
pub struct Circuit<F, TraceArgs> {
Show 15 fields + pub step_types: HashMap<u128, Rc<StepType<F>>>, + pub forward_signals: Vec<ForwardSignal>, + pub shared_signals: Vec<SharedSignal>, + pub fixed_signals: Vec<FixedSignal>, + pub halo2_advice: Vec<ImportedHalo2Advice>, + pub halo2_fixed: Vec<ImportedHalo2Fixed>, + pub exposed: Vec<(Queriable<F>, ExposeOffset)>, + pub annotations: HashMap<u128, String>, + pub trace: Option<Rc<Trace<F, TraceArgs>>>, + pub fixed_assignments: Option<FixedAssignment<F>>, + pub first_step: Option<StepTypeUUID>, + pub last_step: Option<StepTypeUUID>, + pub num_steps: usize, + pub q_enable: bool, + pub id: u128, +
}
Expand description

Circuit

+

Fields§

§step_types: HashMap<u128, Rc<StepType<F>>>§forward_signals: Vec<ForwardSignal>§shared_signals: Vec<SharedSignal>§fixed_signals: Vec<FixedSignal>§halo2_advice: Vec<ImportedHalo2Advice>§halo2_fixed: Vec<ImportedHalo2Fixed>§exposed: Vec<(Queriable<F>, ExposeOffset)>§annotations: HashMap<u128, String>§trace: Option<Rc<Trace<F, TraceArgs>>>§fixed_assignments: Option<FixedAssignment<F>>§first_step: Option<StepTypeUUID>§last_step: Option<StepTypeUUID>§num_steps: usize§q_enable: bool§id: u128

Implementations§

source§

impl<F, TraceArgs> Circuit<F, TraceArgs>

source

pub fn add_forward<N: Into<String>>( + &mut self, + name: N, + phase: usize +) -> ForwardSignal

source

pub fn add_shared<N: Into<String>>( + &mut self, + name: N, + phase: usize +) -> SharedSignal

source

pub fn add_fixed<N: Into<String>>(&mut self, name: N) -> FixedSignal

source

pub fn expose(&mut self, signal: Queriable<F>, offset: ExposeOffset)

source

pub fn add_halo2_advice( + &mut self, + name: &str, + column: Halo2Column<Advice> +) -> ImportedHalo2Advice

source

pub fn add_halo2_fixed( + &mut self, + name: &str, + column: Halo2Column<Fixed> +) -> ImportedHalo2Fixed

source

pub fn add_step_type<N: Into<String>>( + &mut self, + handler: StepTypeHandler, + name: N +)

source

pub fn add_step_type_def(&mut self, step: StepType<F>) -> StepTypeUUID

source

pub fn set_trace<D>(&mut self, def: D)where + D: Fn(&mut TraceContext<F>, TraceArgs) + 'static,

source

pub fn get_step_type(&self, uuid: u128) -> Rc<StepType<F>>

source

pub fn set_fixed_assignments(&mut self, assignments: FixedAssignment<F>)

Trait Implementations§

source§

impl<F: Clone, TraceArgs: Clone> Clone for Circuit<F, TraceArgs>

source§

fn clone(&self) -> Circuit<F, TraceArgs>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<F: Debug, TraceArgs: Debug> Debug for Circuit<F, TraceArgs>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<F, TraceArgs> Default for Circuit<F, TraceArgs>

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for Circuit<Fr, ()>

source§

fn deserialize<D>(deserializer: D) -> Result<Circuit<Fr, ()>, D::Error>where + D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl<F: Clone, TraceArgs> From<&Circuit<F, TraceArgs>> for AutoTraceGenerator<F>

source§

fn from(circuit: &Circuit<F, TraceArgs>) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

§

impl<F, TraceArgs> !RefUnwindSafe for Circuit<F, TraceArgs>

§

impl<F, TraceArgs> !Send for Circuit<F, TraceArgs>

§

impl<F, TraceArgs> !Sync for Circuit<F, TraceArgs>

§

impl<F, TraceArgs> Unpin for Circuit<F, TraceArgs>where + F: Unpin,

§

impl<F, TraceArgs> !UnwindSafe for Circuit<F, TraceArgs>

Blanket Implementations§

source§

impl<T> Any for Twhere + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Conv for T

§

fn conv<T>(self) -> Twhere + Self: Into<T>,

Converts self into T using Into<T>. Read more
§

impl<T> FmtForward for T

§

fn fmt_binary(self) -> FmtBinary<Self>where + Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
§

fn fmt_display(self) -> FmtDisplay<Self>where + Self: Display,

Causes self to use its Display implementation when +Debug-formatted.
§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>where + Self: LowerExp,

Causes self to use its LowerExp implementation when +Debug-formatted.
§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>where + Self: LowerHex,

Causes self to use its LowerHex implementation when +Debug-formatted.
§

fn fmt_octal(self) -> FmtOctal<Self>where + Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
§

fn fmt_pointer(self) -> FmtPointer<Self>where + Self: Pointer,

Causes self to use its Pointer implementation when +Debug-formatted.
§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>where + Self: UpperExp,

Causes self to use its UpperExp implementation when +Debug-formatted.
§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>where + Self: UpperHex,

Causes self to use its UpperHex implementation when +Debug-formatted.
§

fn fmt_list(self) -> FmtList<Self>where + &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
§

impl<T> Pipe for Twhere + T: ?Sized,

§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere + Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere + R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere + R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> Rwhere + Self: Borrow<B>, + B: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
§

fn pipe_borrow_mut<'a, B, R>( + &'a mut self, + func: impl FnOnce(&'a mut B) -> R +) -> Rwhere + Self: BorrowMut<B>, + B: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe +function. Read more
§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> Rwhere + Self: AsRef<U>, + U: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> Rwhere + Self: AsMut<U>, + U: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe +function.
§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> Rwhere + Self: Deref<Target = T>, + T: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.deref() into the pipe function.
§

fn pipe_deref_mut<'a, T, R>( + &'a mut self, + func: impl FnOnce(&'a mut T) -> R +) -> Rwhere + Self: DerefMut<Target = T> + Deref, + T: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe +function.
§

impl<T> Pointable for T

§

const ALIGN: usize = mem::align_of::<T>()

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
§

impl<T> Tap for T

§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Selfwhere + Self: Borrow<B>, + B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere + Self: BorrowMut<B>, + B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Selfwhere + Self: AsRef<R>, + R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere + Self: AsMut<R>, + R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Selfwhere + Self: Deref<Target = T>, + T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Selfwhere + Self: Borrow<B>, + B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere + Self: BorrowMut<B>, + B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release +builds.
§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Selfwhere + Self: AsRef<R>, + R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release +builds.
§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere + Self: AsMut<R>, + R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release +builds.
§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Selfwhere + Self: Deref<Target = T>, + T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release +builds.
§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release +builds.
source§

impl<T> ToOwned for Twhere + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
§

impl<T> TryConv for T

§

fn try_conv<T>(self) -> Result<T, Self::Error>where + Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for Twhere + T: for<'de> Deserialize<'de>,

\ No newline at end of file diff --git a/docs/apidocs/chiquito/ast/struct.Constraint.html b/docs/apidocs/chiquito/ast/struct.Constraint.html new file mode 100644 index 00000000..a0b85e14 --- /dev/null +++ b/docs/apidocs/chiquito/ast/struct.Constraint.html @@ -0,0 +1,109 @@ +Constraint in chiquito::ast - Rust

Struct chiquito::ast::Constraint

source ·
pub struct Constraint<F> {
+    pub annotation: String,
+    pub expr: ASTExpr<F>,
+}
Expand description

Condition

+

Fields§

§annotation: String§expr: ASTExpr<F>

Trait Implementations§

source§

impl<F: Clone> Clone for Constraint<F>

source§

fn clone(&self) -> Constraint<F>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<F: Debug> Debug for Constraint<F>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for Constraint<Fr>

source§

fn deserialize<D>(deserializer: D) -> Result<Constraint<Fr>, D::Error>where + D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more

Auto Trait Implementations§

§

impl<F> RefUnwindSafe for Constraint<F>where + F: RefUnwindSafe,

§

impl<F> Send for Constraint<F>where + F: Send,

§

impl<F> Sync for Constraint<F>where + F: Sync,

§

impl<F> Unpin for Constraint<F>where + F: Unpin,

§

impl<F> UnwindSafe for Constraint<F>where + F: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for Twhere + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Conv for T

§

fn conv<T>(self) -> Twhere + Self: Into<T>,

Converts self into T using Into<T>. Read more
§

impl<T> FmtForward for T

§

fn fmt_binary(self) -> FmtBinary<Self>where + Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
§

fn fmt_display(self) -> FmtDisplay<Self>where + Self: Display,

Causes self to use its Display implementation when +Debug-formatted.
§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>where + Self: LowerExp,

Causes self to use its LowerExp implementation when +Debug-formatted.
§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>where + Self: LowerHex,

Causes self to use its LowerHex implementation when +Debug-formatted.
§

fn fmt_octal(self) -> FmtOctal<Self>where + Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
§

fn fmt_pointer(self) -> FmtPointer<Self>where + Self: Pointer,

Causes self to use its Pointer implementation when +Debug-formatted.
§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>where + Self: UpperExp,

Causes self to use its UpperExp implementation when +Debug-formatted.
§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>where + Self: UpperHex,

Causes self to use its UpperHex implementation when +Debug-formatted.
§

fn fmt_list(self) -> FmtList<Self>where + &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
§

impl<T> Pipe for Twhere + T: ?Sized,

§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere + Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere + R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere + R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> Rwhere + Self: Borrow<B>, + B: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
§

fn pipe_borrow_mut<'a, B, R>( + &'a mut self, + func: impl FnOnce(&'a mut B) -> R +) -> Rwhere + Self: BorrowMut<B>, + B: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe +function. Read more
§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> Rwhere + Self: AsRef<U>, + U: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> Rwhere + Self: AsMut<U>, + U: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe +function.
§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> Rwhere + Self: Deref<Target = T>, + T: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.deref() into the pipe function.
§

fn pipe_deref_mut<'a, T, R>( + &'a mut self, + func: impl FnOnce(&'a mut T) -> R +) -> Rwhere + Self: DerefMut<Target = T> + Deref, + T: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe +function.
§

impl<T> Pointable for T

§

const ALIGN: usize = mem::align_of::<T>()

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
§

impl<T> Tap for T

§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Selfwhere + Self: Borrow<B>, + B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere + Self: BorrowMut<B>, + B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Selfwhere + Self: AsRef<R>, + R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere + Self: AsMut<R>, + R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Selfwhere + Self: Deref<Target = T>, + T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Selfwhere + Self: Borrow<B>, + B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere + Self: BorrowMut<B>, + B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release +builds.
§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Selfwhere + Self: AsRef<R>, + R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release +builds.
§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere + Self: AsMut<R>, + R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release +builds.
§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Selfwhere + Self: Deref<Target = T>, + T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release +builds.
§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release +builds.
source§

impl<T> ToOwned for Twhere + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
§

impl<T> TryConv for T

§

fn try_conv<T>(self) -> Result<T, Self::Error>where + Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for Twhere + T: for<'de> Deserialize<'de>,

§

impl<T> Ungil for Twhere + T: Send,

\ No newline at end of file diff --git a/docs/apidocs/chiquito/ast/struct.FixedSignal.html b/docs/apidocs/chiquito/ast/struct.FixedSignal.html new file mode 100644 index 00000000..fa1640b8 --- /dev/null +++ b/docs/apidocs/chiquito/ast/struct.FixedSignal.html @@ -0,0 +1,104 @@ +FixedSignal in chiquito::ast - Rust

Struct chiquito::ast::FixedSignal

source ·
pub struct FixedSignal { /* private fields */ }

Implementations§

source§

impl FixedSignal

source

pub fn new(annotation: String) -> FixedSignal

source

pub fn new_with_id(id: u128, annotation: String) -> Self

source

pub fn uuid(&self) -> u128

Trait Implementations§

source§

impl Clone for FixedSignal

source§

fn clone(&self) -> FixedSignal

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for FixedSignal

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for FixedSignal

source§

fn deserialize<D>(deserializer: D) -> Result<FixedSignal, D::Error>where + D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Hash for FixedSignal

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)where + H: Hasher, + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl PartialEq<FixedSignal> for FixedSignal

source§

fn eq(&self, other: &FixedSignal) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Copy for FixedSignal

source§

impl Eq for FixedSignal

source§

impl StructuralEq for FixedSignal

source§

impl StructuralPartialEq for FixedSignal

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Conv for T

§

fn conv<T>(self) -> Twhere + Self: Into<T>,

Converts self into T using Into<T>. Read more
§

impl<T> FmtForward for T

§

fn fmt_binary(self) -> FmtBinary<Self>where + Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
§

fn fmt_display(self) -> FmtDisplay<Self>where + Self: Display,

Causes self to use its Display implementation when +Debug-formatted.
§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>where + Self: LowerExp,

Causes self to use its LowerExp implementation when +Debug-formatted.
§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>where + Self: LowerHex,

Causes self to use its LowerHex implementation when +Debug-formatted.
§

fn fmt_octal(self) -> FmtOctal<Self>where + Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
§

fn fmt_pointer(self) -> FmtPointer<Self>where + Self: Pointer,

Causes self to use its Pointer implementation when +Debug-formatted.
§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>where + Self: UpperExp,

Causes self to use its UpperExp implementation when +Debug-formatted.
§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>where + Self: UpperHex,

Causes self to use its UpperHex implementation when +Debug-formatted.
§

fn fmt_list(self) -> FmtList<Self>where + &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
§

impl<T> Pipe for Twhere + T: ?Sized,

§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere + Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere + R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere + R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> Rwhere + Self: Borrow<B>, + B: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
§

fn pipe_borrow_mut<'a, B, R>( + &'a mut self, + func: impl FnOnce(&'a mut B) -> R +) -> Rwhere + Self: BorrowMut<B>, + B: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe +function. Read more
§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> Rwhere + Self: AsRef<U>, + U: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> Rwhere + Self: AsMut<U>, + U: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe +function.
§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> Rwhere + Self: Deref<Target = T>, + T: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.deref() into the pipe function.
§

fn pipe_deref_mut<'a, T, R>( + &'a mut self, + func: impl FnOnce(&'a mut T) -> R +) -> Rwhere + Self: DerefMut<Target = T> + Deref, + T: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe +function.
§

impl<T> Pointable for T

§

const ALIGN: usize = mem::align_of::<T>()

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
§

impl<T> Tap for T

§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Selfwhere + Self: Borrow<B>, + B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere + Self: BorrowMut<B>, + B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Selfwhere + Self: AsRef<R>, + R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere + Self: AsMut<R>, + R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Selfwhere + Self: Deref<Target = T>, + T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Selfwhere + Self: Borrow<B>, + B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere + Self: BorrowMut<B>, + B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release +builds.
§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Selfwhere + Self: AsRef<R>, + R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release +builds.
§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere + Self: AsMut<R>, + R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release +builds.
§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Selfwhere + Self: Deref<Target = T>, + T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release +builds.
§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release +builds.
source§

impl<T> ToOwned for Twhere + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
§

impl<T> TryConv for T

§

fn try_conv<T>(self) -> Result<T, Self::Error>where + Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for Twhere + T: for<'de> Deserialize<'de>,

§

impl<T> Ungil for Twhere + T: Send,

\ No newline at end of file diff --git a/docs/apidocs/chiquito/ast/struct.ForwardSignal.html b/docs/apidocs/chiquito/ast/struct.ForwardSignal.html new file mode 100644 index 00000000..eaa16da6 --- /dev/null +++ b/docs/apidocs/chiquito/ast/struct.ForwardSignal.html @@ -0,0 +1,105 @@ +ForwardSignal in chiquito::ast - Rust

Struct chiquito::ast::ForwardSignal

source ·
pub struct ForwardSignal { /* private fields */ }
Expand description

ForwardSignal

+

Implementations§

source§

impl ForwardSignal

source

pub fn new_with_phase(phase: usize, annotation: String) -> ForwardSignal

source

pub fn new_with_id(id: u128, phase: usize, annotation: String) -> Self

source

pub fn uuid(&self) -> u128

source

pub fn phase(&self) -> usize

Trait Implementations§

source§

impl Clone for ForwardSignal

source§

fn clone(&self) -> ForwardSignal

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for ForwardSignal

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for ForwardSignal

source§

fn deserialize<D>(deserializer: D) -> Result<ForwardSignal, D::Error>where + D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Hash for ForwardSignal

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)where + H: Hasher, + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl PartialEq<ForwardSignal> for ForwardSignal

source§

fn eq(&self, other: &ForwardSignal) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Copy for ForwardSignal

source§

impl Eq for ForwardSignal

source§

impl StructuralEq for ForwardSignal

source§

impl StructuralPartialEq for ForwardSignal

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Conv for T

§

fn conv<T>(self) -> Twhere + Self: Into<T>,

Converts self into T using Into<T>. Read more
§

impl<T> FmtForward for T

§

fn fmt_binary(self) -> FmtBinary<Self>where + Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
§

fn fmt_display(self) -> FmtDisplay<Self>where + Self: Display,

Causes self to use its Display implementation when +Debug-formatted.
§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>where + Self: LowerExp,

Causes self to use its LowerExp implementation when +Debug-formatted.
§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>where + Self: LowerHex,

Causes self to use its LowerHex implementation when +Debug-formatted.
§

fn fmt_octal(self) -> FmtOctal<Self>where + Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
§

fn fmt_pointer(self) -> FmtPointer<Self>where + Self: Pointer,

Causes self to use its Pointer implementation when +Debug-formatted.
§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>where + Self: UpperExp,

Causes self to use its UpperExp implementation when +Debug-formatted.
§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>where + Self: UpperHex,

Causes self to use its UpperHex implementation when +Debug-formatted.
§

fn fmt_list(self) -> FmtList<Self>where + &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
§

impl<T> Pipe for Twhere + T: ?Sized,

§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere + Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere + R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere + R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> Rwhere + Self: Borrow<B>, + B: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
§

fn pipe_borrow_mut<'a, B, R>( + &'a mut self, + func: impl FnOnce(&'a mut B) -> R +) -> Rwhere + Self: BorrowMut<B>, + B: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe +function. Read more
§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> Rwhere + Self: AsRef<U>, + U: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> Rwhere + Self: AsMut<U>, + U: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe +function.
§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> Rwhere + Self: Deref<Target = T>, + T: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.deref() into the pipe function.
§

fn pipe_deref_mut<'a, T, R>( + &'a mut self, + func: impl FnOnce(&'a mut T) -> R +) -> Rwhere + Self: DerefMut<Target = T> + Deref, + T: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe +function.
§

impl<T> Pointable for T

§

const ALIGN: usize = mem::align_of::<T>()

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
§

impl<T> Tap for T

§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Selfwhere + Self: Borrow<B>, + B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere + Self: BorrowMut<B>, + B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Selfwhere + Self: AsRef<R>, + R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere + Self: AsMut<R>, + R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Selfwhere + Self: Deref<Target = T>, + T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Selfwhere + Self: Borrow<B>, + B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere + Self: BorrowMut<B>, + B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release +builds.
§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Selfwhere + Self: AsRef<R>, + R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release +builds.
§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere + Self: AsMut<R>, + R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release +builds.
§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Selfwhere + Self: Deref<Target = T>, + T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release +builds.
§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release +builds.
source§

impl<T> ToOwned for Twhere + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
§

impl<T> TryConv for T

§

fn try_conv<T>(self) -> Result<T, Self::Error>where + Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for Twhere + T: for<'de> Deserialize<'de>,

§

impl<T> Ungil for Twhere + T: Send,

\ No newline at end of file diff --git a/docs/apidocs/chiquito/ast/struct.ImportedHalo2Column.html b/docs/apidocs/chiquito/ast/struct.ImportedHalo2Column.html new file mode 100644 index 00000000..fcab10ab --- /dev/null +++ b/docs/apidocs/chiquito/ast/struct.ImportedHalo2Column.html @@ -0,0 +1,113 @@ +ImportedHalo2Column in chiquito::ast - Rust
pub struct ImportedHalo2Column<CT: ColumnType> {
+    pub column: Halo2Column<CT>,
+    /* private fields */
+}

Fields§

§column: Halo2Column<CT>

Implementations§

source§

impl<CT: ColumnType> ImportedHalo2Column<CT>

source

pub fn new( + column: Halo2Column<CT>, + annotation: String +) -> ImportedHalo2Column<CT>

source

pub fn uuid(&self) -> u128

Trait Implementations§

source§

impl<CT: Clone + ColumnType> Clone for ImportedHalo2Column<CT>

source§

fn clone(&self) -> ImportedHalo2Column<CT>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<CT: Debug + ColumnType> Debug for ImportedHalo2Column<CT>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<CT: Hash + ColumnType> Hash for ImportedHalo2Column<CT>

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)where + H: Hasher, + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl<CT: PartialEq + ColumnType> PartialEq<ImportedHalo2Column<CT>> for ImportedHalo2Column<CT>

source§

fn eq(&self, other: &ImportedHalo2Column<CT>) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl<CT: Copy + ColumnType> Copy for ImportedHalo2Column<CT>

source§

impl<CT: Eq + ColumnType> Eq for ImportedHalo2Column<CT>

source§

impl<CT: ColumnType> StructuralEq for ImportedHalo2Column<CT>

source§

impl<CT: ColumnType> StructuralPartialEq for ImportedHalo2Column<CT>

Auto Trait Implementations§

§

impl<CT> RefUnwindSafe for ImportedHalo2Column<CT>where + CT: RefUnwindSafe,

§

impl<CT> Send for ImportedHalo2Column<CT>where + CT: Send,

§

impl<CT> Sync for ImportedHalo2Column<CT>where + CT: Sync,

§

impl<CT> Unpin for ImportedHalo2Column<CT>where + CT: Unpin,

§

impl<CT> UnwindSafe for ImportedHalo2Column<CT>where + CT: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for Twhere + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Conv for T

§

fn conv<T>(self) -> Twhere + Self: Into<T>,

Converts self into T using Into<T>. Read more
§

impl<T> FmtForward for T

§

fn fmt_binary(self) -> FmtBinary<Self>where + Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
§

fn fmt_display(self) -> FmtDisplay<Self>where + Self: Display,

Causes self to use its Display implementation when +Debug-formatted.
§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>where + Self: LowerExp,

Causes self to use its LowerExp implementation when +Debug-formatted.
§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>where + Self: LowerHex,

Causes self to use its LowerHex implementation when +Debug-formatted.
§

fn fmt_octal(self) -> FmtOctal<Self>where + Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
§

fn fmt_pointer(self) -> FmtPointer<Self>where + Self: Pointer,

Causes self to use its Pointer implementation when +Debug-formatted.
§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>where + Self: UpperExp,

Causes self to use its UpperExp implementation when +Debug-formatted.
§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>where + Self: UpperHex,

Causes self to use its UpperHex implementation when +Debug-formatted.
§

fn fmt_list(self) -> FmtList<Self>where + &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
§

impl<T> Pipe for Twhere + T: ?Sized,

§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere + Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere + R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere + R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> Rwhere + Self: Borrow<B>, + B: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
§

fn pipe_borrow_mut<'a, B, R>( + &'a mut self, + func: impl FnOnce(&'a mut B) -> R +) -> Rwhere + Self: BorrowMut<B>, + B: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe +function. Read more
§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> Rwhere + Self: AsRef<U>, + U: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> Rwhere + Self: AsMut<U>, + U: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe +function.
§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> Rwhere + Self: Deref<Target = T>, + T: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.deref() into the pipe function.
§

fn pipe_deref_mut<'a, T, R>( + &'a mut self, + func: impl FnOnce(&'a mut T) -> R +) -> Rwhere + Self: DerefMut<Target = T> + Deref, + T: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe +function.
§

impl<T> Pointable for T

§

const ALIGN: usize = mem::align_of::<T>()

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
§

impl<T> Tap for T

§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Selfwhere + Self: Borrow<B>, + B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere + Self: BorrowMut<B>, + B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Selfwhere + Self: AsRef<R>, + R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere + Self: AsMut<R>, + R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Selfwhere + Self: Deref<Target = T>, + T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Selfwhere + Self: Borrow<B>, + B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere + Self: BorrowMut<B>, + B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release +builds.
§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Selfwhere + Self: AsRef<R>, + R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release +builds.
§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere + Self: AsMut<R>, + R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release +builds.
§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Selfwhere + Self: Deref<Target = T>, + T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release +builds.
§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release +builds.
source§

impl<T> ToOwned for Twhere + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
§

impl<T> TryConv for T

§

fn try_conv<T>(self) -> Result<T, Self::Error>where + Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

impl<T> Ungil for Twhere + T: Send,

\ No newline at end of file diff --git a/docs/apidocs/chiquito/ast/struct.InternalSignal.html b/docs/apidocs/chiquito/ast/struct.InternalSignal.html new file mode 100644 index 00000000..acc9e40c --- /dev/null +++ b/docs/apidocs/chiquito/ast/struct.InternalSignal.html @@ -0,0 +1,104 @@ +InternalSignal in chiquito::ast - Rust
pub struct InternalSignal { /* private fields */ }

Implementations§

source§

impl InternalSignal

source

pub fn new(annotation: String) -> InternalSignal

source

pub fn new_with_id(id: u128, annotation: String) -> Self

source

pub fn uuid(&self) -> u128

Trait Implementations§

source§

impl Clone for InternalSignal

source§

fn clone(&self) -> InternalSignal

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for InternalSignal

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for InternalSignal

source§

fn deserialize<D>(deserializer: D) -> Result<InternalSignal, D::Error>where + D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Hash for InternalSignal

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)where + H: Hasher, + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl PartialEq<InternalSignal> for InternalSignal

source§

fn eq(&self, other: &InternalSignal) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Copy for InternalSignal

source§

impl Eq for InternalSignal

source§

impl StructuralEq for InternalSignal

source§

impl StructuralPartialEq for InternalSignal

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Conv for T

§

fn conv<T>(self) -> Twhere + Self: Into<T>,

Converts self into T using Into<T>. Read more
§

impl<T> FmtForward for T

§

fn fmt_binary(self) -> FmtBinary<Self>where + Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
§

fn fmt_display(self) -> FmtDisplay<Self>where + Self: Display,

Causes self to use its Display implementation when +Debug-formatted.
§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>where + Self: LowerExp,

Causes self to use its LowerExp implementation when +Debug-formatted.
§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>where + Self: LowerHex,

Causes self to use its LowerHex implementation when +Debug-formatted.
§

fn fmt_octal(self) -> FmtOctal<Self>where + Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
§

fn fmt_pointer(self) -> FmtPointer<Self>where + Self: Pointer,

Causes self to use its Pointer implementation when +Debug-formatted.
§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>where + Self: UpperExp,

Causes self to use its UpperExp implementation when +Debug-formatted.
§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>where + Self: UpperHex,

Causes self to use its UpperHex implementation when +Debug-formatted.
§

fn fmt_list(self) -> FmtList<Self>where + &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
§

impl<T> Pipe for Twhere + T: ?Sized,

§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere + Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere + R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere + R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> Rwhere + Self: Borrow<B>, + B: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
§

fn pipe_borrow_mut<'a, B, R>( + &'a mut self, + func: impl FnOnce(&'a mut B) -> R +) -> Rwhere + Self: BorrowMut<B>, + B: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe +function. Read more
§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> Rwhere + Self: AsRef<U>, + U: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> Rwhere + Self: AsMut<U>, + U: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe +function.
§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> Rwhere + Self: Deref<Target = T>, + T: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.deref() into the pipe function.
§

fn pipe_deref_mut<'a, T, R>( + &'a mut self, + func: impl FnOnce(&'a mut T) -> R +) -> Rwhere + Self: DerefMut<Target = T> + Deref, + T: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe +function.
§

impl<T> Pointable for T

§

const ALIGN: usize = mem::align_of::<T>()

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
§

impl<T> Tap for T

§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Selfwhere + Self: Borrow<B>, + B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere + Self: BorrowMut<B>, + B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Selfwhere + Self: AsRef<R>, + R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere + Self: AsMut<R>, + R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Selfwhere + Self: Deref<Target = T>, + T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Selfwhere + Self: Borrow<B>, + B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere + Self: BorrowMut<B>, + B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release +builds.
§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Selfwhere + Self: AsRef<R>, + R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release +builds.
§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere + Self: AsMut<R>, + R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release +builds.
§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Selfwhere + Self: Deref<Target = T>, + T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release +builds.
§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release +builds.
source§

impl<T> ToOwned for Twhere + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
§

impl<T> TryConv for T

§

fn try_conv<T>(self) -> Result<T, Self::Error>where + Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for Twhere + T: for<'de> Deserialize<'de>,

§

impl<T> Ungil for Twhere + T: Send,

\ No newline at end of file diff --git a/docs/apidocs/chiquito/ast/struct.Lookup.html b/docs/apidocs/chiquito/ast/struct.Lookup.html new file mode 100644 index 00000000..415cf81c --- /dev/null +++ b/docs/apidocs/chiquito/ast/struct.Lookup.html @@ -0,0 +1,114 @@ +Lookup in chiquito::ast - Rust

Struct chiquito::ast::Lookup

source ·
pub struct Lookup<F> {
+    pub annotation: String,
+    pub exprs: Vec<(Constraint<F>, ASTExpr<F>)>,
+    pub enable: Option<Constraint<F>>,
+}

Fields§

§annotation: String§exprs: Vec<(Constraint<F>, ASTExpr<F>)>§enable: Option<Constraint<F>>

Implementations§

source§

impl<F: Debug + Clone> Lookup<F>

source

pub fn add( + &mut self, + constraint_annotation: String, + constraint_expr: ASTExpr<F>, + expression: ASTExpr<F> +)

source

pub fn enable(&mut self, enable_annotation: String, enable_expr: ASTExpr<F>)

Trait Implementations§

source§

impl<F: Clone> Clone for Lookup<F>

source§

fn clone(&self) -> Lookup<F>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<F: Debug> Debug for Lookup<F>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<F> Default for Lookup<F>

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for Lookup<Fr>

source§

fn deserialize<D>(deserializer: D) -> Result<Lookup<Fr>, D::Error>where + D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more

Auto Trait Implementations§

§

impl<F> RefUnwindSafe for Lookup<F>where + F: RefUnwindSafe,

§

impl<F> Send for Lookup<F>where + F: Send,

§

impl<F> Sync for Lookup<F>where + F: Sync,

§

impl<F> Unpin for Lookup<F>where + F: Unpin,

§

impl<F> UnwindSafe for Lookup<F>where + F: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for Twhere + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Conv for T

§

fn conv<T>(self) -> Twhere + Self: Into<T>,

Converts self into T using Into<T>. Read more
§

impl<T> FmtForward for T

§

fn fmt_binary(self) -> FmtBinary<Self>where + Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
§

fn fmt_display(self) -> FmtDisplay<Self>where + Self: Display,

Causes self to use its Display implementation when +Debug-formatted.
§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>where + Self: LowerExp,

Causes self to use its LowerExp implementation when +Debug-formatted.
§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>where + Self: LowerHex,

Causes self to use its LowerHex implementation when +Debug-formatted.
§

fn fmt_octal(self) -> FmtOctal<Self>where + Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
§

fn fmt_pointer(self) -> FmtPointer<Self>where + Self: Pointer,

Causes self to use its Pointer implementation when +Debug-formatted.
§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>where + Self: UpperExp,

Causes self to use its UpperExp implementation when +Debug-formatted.
§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>where + Self: UpperHex,

Causes self to use its UpperHex implementation when +Debug-formatted.
§

fn fmt_list(self) -> FmtList<Self>where + &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
§

impl<T> Pipe for Twhere + T: ?Sized,

§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere + Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere + R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere + R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> Rwhere + Self: Borrow<B>, + B: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
§

fn pipe_borrow_mut<'a, B, R>( + &'a mut self, + func: impl FnOnce(&'a mut B) -> R +) -> Rwhere + Self: BorrowMut<B>, + B: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe +function. Read more
§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> Rwhere + Self: AsRef<U>, + U: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> Rwhere + Self: AsMut<U>, + U: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe +function.
§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> Rwhere + Self: Deref<Target = T>, + T: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.deref() into the pipe function.
§

fn pipe_deref_mut<'a, T, R>( + &'a mut self, + func: impl FnOnce(&'a mut T) -> R +) -> Rwhere + Self: DerefMut<Target = T> + Deref, + T: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe +function.
§

impl<T> Pointable for T

§

const ALIGN: usize = mem::align_of::<T>()

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
§

impl<T> Tap for T

§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Selfwhere + Self: Borrow<B>, + B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere + Self: BorrowMut<B>, + B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Selfwhere + Self: AsRef<R>, + R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere + Self: AsMut<R>, + R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Selfwhere + Self: Deref<Target = T>, + T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Selfwhere + Self: Borrow<B>, + B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere + Self: BorrowMut<B>, + B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release +builds.
§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Selfwhere + Self: AsRef<R>, + R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release +builds.
§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere + Self: AsMut<R>, + R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release +builds.
§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Selfwhere + Self: Deref<Target = T>, + T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release +builds.
§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release +builds.
source§

impl<T> ToOwned for Twhere + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
§

impl<T> TryConv for T

§

fn try_conv<T>(self) -> Result<T, Self::Error>where + Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for Twhere + T: for<'de> Deserialize<'de>,

§

impl<T> Ungil for Twhere + T: Send,

\ No newline at end of file diff --git a/docs/apidocs/chiquito/ast/struct.SharedSignal.html b/docs/apidocs/chiquito/ast/struct.SharedSignal.html new file mode 100644 index 00000000..ec1f2353 --- /dev/null +++ b/docs/apidocs/chiquito/ast/struct.SharedSignal.html @@ -0,0 +1,104 @@ +SharedSignal in chiquito::ast - Rust

Struct chiquito::ast::SharedSignal

source ·
pub struct SharedSignal { /* private fields */ }

Implementations§

source§

impl SharedSignal

source

pub fn new_with_phase(phase: usize, annotation: String) -> SharedSignal

source

pub fn new_with_id(id: u128, phase: usize, annotation: String) -> Self

source

pub fn uuid(&self) -> u128

source

pub fn phase(&self) -> usize

Trait Implementations§

source§

impl Clone for SharedSignal

source§

fn clone(&self) -> SharedSignal

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for SharedSignal

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for SharedSignal

source§

fn deserialize<D>(deserializer: D) -> Result<SharedSignal, D::Error>where + D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Hash for SharedSignal

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)where + H: Hasher, + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl PartialEq<SharedSignal> for SharedSignal

source§

fn eq(&self, other: &SharedSignal) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Copy for SharedSignal

source§

impl Eq for SharedSignal

source§

impl StructuralEq for SharedSignal

source§

impl StructuralPartialEq for SharedSignal

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Conv for T

§

fn conv<T>(self) -> Twhere + Self: Into<T>,

Converts self into T using Into<T>. Read more
§

impl<T> FmtForward for T

§

fn fmt_binary(self) -> FmtBinary<Self>where + Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
§

fn fmt_display(self) -> FmtDisplay<Self>where + Self: Display,

Causes self to use its Display implementation when +Debug-formatted.
§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>where + Self: LowerExp,

Causes self to use its LowerExp implementation when +Debug-formatted.
§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>where + Self: LowerHex,

Causes self to use its LowerHex implementation when +Debug-formatted.
§

fn fmt_octal(self) -> FmtOctal<Self>where + Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
§

fn fmt_pointer(self) -> FmtPointer<Self>where + Self: Pointer,

Causes self to use its Pointer implementation when +Debug-formatted.
§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>where + Self: UpperExp,

Causes self to use its UpperExp implementation when +Debug-formatted.
§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>where + Self: UpperHex,

Causes self to use its UpperHex implementation when +Debug-formatted.
§

fn fmt_list(self) -> FmtList<Self>where + &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
§

impl<T> Pipe for Twhere + T: ?Sized,

§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere + Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere + R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere + R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> Rwhere + Self: Borrow<B>, + B: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
§

fn pipe_borrow_mut<'a, B, R>( + &'a mut self, + func: impl FnOnce(&'a mut B) -> R +) -> Rwhere + Self: BorrowMut<B>, + B: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe +function. Read more
§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> Rwhere + Self: AsRef<U>, + U: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> Rwhere + Self: AsMut<U>, + U: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe +function.
§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> Rwhere + Self: Deref<Target = T>, + T: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.deref() into the pipe function.
§

fn pipe_deref_mut<'a, T, R>( + &'a mut self, + func: impl FnOnce(&'a mut T) -> R +) -> Rwhere + Self: DerefMut<Target = T> + Deref, + T: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe +function.
§

impl<T> Pointable for T

§

const ALIGN: usize = mem::align_of::<T>()

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
§

impl<T> Tap for T

§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Selfwhere + Self: Borrow<B>, + B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere + Self: BorrowMut<B>, + B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Selfwhere + Self: AsRef<R>, + R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere + Self: AsMut<R>, + R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Selfwhere + Self: Deref<Target = T>, + T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Selfwhere + Self: Borrow<B>, + B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere + Self: BorrowMut<B>, + B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release +builds.
§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Selfwhere + Self: AsRef<R>, + R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release +builds.
§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere + Self: AsMut<R>, + R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release +builds.
§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Selfwhere + Self: Deref<Target = T>, + T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release +builds.
§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release +builds.
source§

impl<T> ToOwned for Twhere + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
§

impl<T> TryConv for T

§

fn try_conv<T>(self) -> Result<T, Self::Error>where + Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for Twhere + T: for<'de> Deserialize<'de>,

§

impl<T> Ungil for Twhere + T: Send,

\ No newline at end of file diff --git a/docs/apidocs/chiquito/ast/struct.StepType.html b/docs/apidocs/chiquito/ast/struct.StepType.html new file mode 100644 index 00000000..e05bc60c --- /dev/null +++ b/docs/apidocs/chiquito/ast/struct.StepType.html @@ -0,0 +1,118 @@ +StepType in chiquito::ast - Rust

Struct chiquito::ast::StepType

source ·
pub struct StepType<F> {
+    pub name: String,
+    pub signals: Vec<InternalSignal>,
+    pub constraints: Vec<Constraint<F>>,
+    pub transition_constraints: Vec<TransitionConstraint<F>>,
+    pub lookups: Vec<Lookup<F>>,
+    pub auto_signals: HashMap<Queriable<F>, ASTExpr<F>>,
+    pub annotations: HashMap<u128, String>,
+    /* private fields */
+}
Expand description

Step

+

Fields§

§name: String§signals: Vec<InternalSignal>§constraints: Vec<Constraint<F>>§transition_constraints: Vec<TransitionConstraint<F>>§lookups: Vec<Lookup<F>>§auto_signals: HashMap<Queriable<F>, ASTExpr<F>>§annotations: HashMap<u128, String>

Implementations§

source§

impl<F> StepType<F>

source

pub fn new(uuid: u128, name: String) -> Self

source

pub fn uuid(&self) -> StepTypeUUID

source

pub fn add_signal<N: Into<String>>(&mut self, name: N) -> InternalSignal

source

pub fn add_constr(&mut self, annotation: String, expr: ASTExpr<F>)

source

pub fn add_transition(&mut self, annotation: String, expr: ASTExpr<F>)

Trait Implementations§

source§

impl<F: Debug> Debug for StepType<F>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for StepType<Fr>

source§

fn deserialize<D>(deserializer: D) -> Result<StepType<Fr>, D::Error>where + D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl<F> Hash for StepType<F>

source§

fn hash<H: Hasher>(&self, state: &mut H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)where + H: Hasher, + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl<F> PartialEq<StepType<F>> for StepType<F>

source§

fn eq(&self, other: &Self) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl<F> Eq for StepType<F>

Auto Trait Implementations§

§

impl<F> RefUnwindSafe for StepType<F>where + F: RefUnwindSafe,

§

impl<F> Send for StepType<F>where + F: Send,

§

impl<F> Sync for StepType<F>where + F: Sync,

§

impl<F> Unpin for StepType<F>where + F: Unpin,

§

impl<F> UnwindSafe for StepType<F>where + F: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for Twhere + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Conv for T

§

fn conv<T>(self) -> Twhere + Self: Into<T>,

Converts self into T using Into<T>. Read more
§

impl<T> FmtForward for T

§

fn fmt_binary(self) -> FmtBinary<Self>where + Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
§

fn fmt_display(self) -> FmtDisplay<Self>where + Self: Display,

Causes self to use its Display implementation when +Debug-formatted.
§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>where + Self: LowerExp,

Causes self to use its LowerExp implementation when +Debug-formatted.
§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>where + Self: LowerHex,

Causes self to use its LowerHex implementation when +Debug-formatted.
§

fn fmt_octal(self) -> FmtOctal<Self>where + Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
§

fn fmt_pointer(self) -> FmtPointer<Self>where + Self: Pointer,

Causes self to use its Pointer implementation when +Debug-formatted.
§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>where + Self: UpperExp,

Causes self to use its UpperExp implementation when +Debug-formatted.
§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>where + Self: UpperHex,

Causes self to use its UpperHex implementation when +Debug-formatted.
§

fn fmt_list(self) -> FmtList<Self>where + &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
§

impl<T> Pipe for Twhere + T: ?Sized,

§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere + Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere + R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere + R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> Rwhere + Self: Borrow<B>, + B: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
§

fn pipe_borrow_mut<'a, B, R>( + &'a mut self, + func: impl FnOnce(&'a mut B) -> R +) -> Rwhere + Self: BorrowMut<B>, + B: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe +function. Read more
§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> Rwhere + Self: AsRef<U>, + U: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> Rwhere + Self: AsMut<U>, + U: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe +function.
§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> Rwhere + Self: Deref<Target = T>, + T: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.deref() into the pipe function.
§

fn pipe_deref_mut<'a, T, R>( + &'a mut self, + func: impl FnOnce(&'a mut T) -> R +) -> Rwhere + Self: DerefMut<Target = T> + Deref, + T: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe +function.
§

impl<T> Pointable for T

§

const ALIGN: usize = mem::align_of::<T>()

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
§

impl<T> Tap for T

§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Selfwhere + Self: Borrow<B>, + B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere + Self: BorrowMut<B>, + B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Selfwhere + Self: AsRef<R>, + R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere + Self: AsMut<R>, + R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Selfwhere + Self: Deref<Target = T>, + T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Selfwhere + Self: Borrow<B>, + B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere + Self: BorrowMut<B>, + B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release +builds.
§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Selfwhere + Self: AsRef<R>, + R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release +builds.
§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere + Self: AsMut<R>, + R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release +builds.
§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Selfwhere + Self: Deref<Target = T>, + T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release +builds.
§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release +builds.
§

impl<T> TryConv for T

§

fn try_conv<T>(self) -> Result<T, Self::Error>where + Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for Twhere + T: for<'de> Deserialize<'de>,

§

impl<T> Ungil for Twhere + T: Send,

\ No newline at end of file diff --git a/docs/apidocs/chiquito/ast/struct.TransitionConstraint.html b/docs/apidocs/chiquito/ast/struct.TransitionConstraint.html new file mode 100644 index 00000000..41ad176d --- /dev/null +++ b/docs/apidocs/chiquito/ast/struct.TransitionConstraint.html @@ -0,0 +1,109 @@ +TransitionConstraint in chiquito::ast - Rust
pub struct TransitionConstraint<F> {
+    pub annotation: String,
+    pub expr: ASTExpr<F>,
+}
Expand description

TransitionCondition

+

Fields§

§annotation: String§expr: ASTExpr<F>

Trait Implementations§

source§

impl<F: Clone> Clone for TransitionConstraint<F>

source§

fn clone(&self) -> TransitionConstraint<F>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<F: Debug> Debug for TransitionConstraint<F>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for TransitionConstraint<Fr>

source§

fn deserialize<D>(deserializer: D) -> Result<TransitionConstraint<Fr>, D::Error>where + D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more

Auto Trait Implementations§

§

impl<F> RefUnwindSafe for TransitionConstraint<F>where + F: RefUnwindSafe,

§

impl<F> Send for TransitionConstraint<F>where + F: Send,

§

impl<F> Sync for TransitionConstraint<F>where + F: Sync,

§

impl<F> Unpin for TransitionConstraint<F>where + F: Unpin,

§

impl<F> UnwindSafe for TransitionConstraint<F>where + F: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for Twhere + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Conv for T

§

fn conv<T>(self) -> Twhere + Self: Into<T>,

Converts self into T using Into<T>. Read more
§

impl<T> FmtForward for T

§

fn fmt_binary(self) -> FmtBinary<Self>where + Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
§

fn fmt_display(self) -> FmtDisplay<Self>where + Self: Display,

Causes self to use its Display implementation when +Debug-formatted.
§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>where + Self: LowerExp,

Causes self to use its LowerExp implementation when +Debug-formatted.
§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>where + Self: LowerHex,

Causes self to use its LowerHex implementation when +Debug-formatted.
§

fn fmt_octal(self) -> FmtOctal<Self>where + Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
§

fn fmt_pointer(self) -> FmtPointer<Self>where + Self: Pointer,

Causes self to use its Pointer implementation when +Debug-formatted.
§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>where + Self: UpperExp,

Causes self to use its UpperExp implementation when +Debug-formatted.
§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>where + Self: UpperHex,

Causes self to use its UpperHex implementation when +Debug-formatted.
§

fn fmt_list(self) -> FmtList<Self>where + &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
§

impl<T> Pipe for Twhere + T: ?Sized,

§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere + Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere + R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere + R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> Rwhere + Self: Borrow<B>, + B: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
§

fn pipe_borrow_mut<'a, B, R>( + &'a mut self, + func: impl FnOnce(&'a mut B) -> R +) -> Rwhere + Self: BorrowMut<B>, + B: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe +function. Read more
§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> Rwhere + Self: AsRef<U>, + U: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> Rwhere + Self: AsMut<U>, + U: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe +function.
§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> Rwhere + Self: Deref<Target = T>, + T: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.deref() into the pipe function.
§

fn pipe_deref_mut<'a, T, R>( + &'a mut self, + func: impl FnOnce(&'a mut T) -> R +) -> Rwhere + Self: DerefMut<Target = T> + Deref, + T: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe +function.
§

impl<T> Pointable for T

§

const ALIGN: usize = mem::align_of::<T>()

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
§

impl<T> Tap for T

§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Selfwhere + Self: Borrow<B>, + B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere + Self: BorrowMut<B>, + B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Selfwhere + Self: AsRef<R>, + R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere + Self: AsMut<R>, + R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Selfwhere + Self: Deref<Target = T>, + T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Selfwhere + Self: Borrow<B>, + B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere + Self: BorrowMut<B>, + B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release +builds.
§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Selfwhere + Self: AsRef<R>, + R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release +builds.
§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere + Self: AsMut<R>, + R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release +builds.
§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Selfwhere + Self: Deref<Target = T>, + T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release +builds.
§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release +builds.
source§

impl<T> ToOwned for Twhere + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
§

impl<T> TryConv for T

§

fn try_conv<T>(self) -> Result<T, Self::Error>where + Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for Twhere + T: for<'de> Deserialize<'de>,

§

impl<T> Ungil for Twhere + T: Send,

\ No newline at end of file diff --git a/docs/apidocs/chiquito/ast/type.ASTExpr.html b/docs/apidocs/chiquito/ast/type.ASTExpr.html new file mode 100644 index 00000000..ec0e3fb7 --- /dev/null +++ b/docs/apidocs/chiquito/ast/type.ASTExpr.html @@ -0,0 +1 @@ +ASTExpr in chiquito::ast - Rust

Type Definition chiquito::ast::ASTExpr

source ·
pub type ASTExpr<F> = Expr<F, Queriable<F>>;

Trait Implementations§

source§

impl<F> From<Constraint<F>> for ASTExpr<F>

source§

fn from(c: Constraint<F>) -> Self

Converts to this type from the input type.
source§

impl<F> From<Queriable<F>> for ASTExpr<F>

source§

fn from(value: Queriable<F>) -> Self

Converts to this type from the input type.
\ No newline at end of file diff --git a/docs/apidocs/chiquito/ast/type.FixedGen.html b/docs/apidocs/chiquito/ast/type.FixedGen.html new file mode 100644 index 00000000..029e6514 --- /dev/null +++ b/docs/apidocs/chiquito/ast/type.FixedGen.html @@ -0,0 +1 @@ +FixedGen in chiquito::ast - Rust

Type Definition chiquito::ast::FixedGen

source ·
pub type FixedGen<F> = dyn Fn(&mut FixedGenContext<F>) + 'static;
\ No newline at end of file diff --git a/docs/apidocs/chiquito/ast/type.ImportedHalo2Advice.html b/docs/apidocs/chiquito/ast/type.ImportedHalo2Advice.html new file mode 100644 index 00000000..0c1de8a7 --- /dev/null +++ b/docs/apidocs/chiquito/ast/type.ImportedHalo2Advice.html @@ -0,0 +1 @@ +ImportedHalo2Advice in chiquito::ast - Rust

Type Definition chiquito::ast::ImportedHalo2Advice

source ·
pub type ImportedHalo2Advice = ImportedHalo2Column<Advice>;
\ No newline at end of file diff --git a/docs/apidocs/chiquito/ast/type.ImportedHalo2Fixed.html b/docs/apidocs/chiquito/ast/type.ImportedHalo2Fixed.html new file mode 100644 index 00000000..e4ab4b76 --- /dev/null +++ b/docs/apidocs/chiquito/ast/type.ImportedHalo2Fixed.html @@ -0,0 +1 @@ +ImportedHalo2Fixed in chiquito::ast - Rust

Type Definition chiquito::ast::ImportedHalo2Fixed

source ·
pub type ImportedHalo2Fixed = ImportedHalo2Column<Fixed>;
\ No newline at end of file diff --git a/docs/apidocs/chiquito/ast/type.StepTypeUUID.html b/docs/apidocs/chiquito/ast/type.StepTypeUUID.html new file mode 100644 index 00000000..f5779e10 --- /dev/null +++ b/docs/apidocs/chiquito/ast/type.StepTypeUUID.html @@ -0,0 +1 @@ +StepTypeUUID in chiquito::ast - Rust

Type Definition chiquito::ast::StepTypeUUID

source ·
pub type StepTypeUUID = u128;
\ No newline at end of file diff --git a/docs/apidocs/chiquito/field/index.html b/docs/apidocs/chiquito/field/index.html new file mode 100644 index 00000000..f19908c9 --- /dev/null +++ b/docs/apidocs/chiquito/field/index.html @@ -0,0 +1 @@ +chiquito::field - Rust

Module chiquito::field

source ·

Traits

\ No newline at end of file diff --git a/docs/apidocs/chiquito/field/sidebar-items.js b/docs/apidocs/chiquito/field/sidebar-items.js new file mode 100644 index 00000000..a6450d7d --- /dev/null +++ b/docs/apidocs/chiquito/field/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"trait":["Field"]}; \ No newline at end of file diff --git a/docs/apidocs/chiquito/field/trait.Field.html b/docs/apidocs/chiquito/field/trait.Field.html new file mode 100644 index 00000000..872cf941 --- /dev/null +++ b/docs/apidocs/chiquito/field/trait.Field.html @@ -0,0 +1,15 @@ +Field in chiquito::field - Rust

Trait chiquito::field::Field

source ·
pub trait Field: Sized + Eq + Copy + Clone + Default + Neg<Output = Self> + From<u64> + Add<Output = Self> + Sub<Output = Self> + Mul<Output = Self> + Sum + Product + for<'a> Add<&'a Self, Output = Self> + for<'a> Sub<&'a Self, Output = Self> + for<'a> Mul<&'a Self, Output = Self> + for<'a> Sum<&'a Self> + for<'a> Product<&'a Self> + AddAssign + SubAssign + MulAssign + for<'a> AddAssign<&'a Self> + for<'a> SubAssign<&'a Self> + for<'a> MulAssign<&'a Self> + Send + Sync + Debug + 'static {
+    const ZERO: Self;
+    const ONE: Self;
+
+    // Required methods
+    fn mi(&self) -> Self;
+    fn pow<S: AsRef<[u64]>>(&self, exp: S) -> Self;
+}

Required Associated Constants§

source

const ZERO: Self

The zero element of the field, the additive identity.

+
source

const ONE: Self

The one element of the field, the multiplicative identity.

+

Required Methods§

source

fn mi(&self) -> Self

Computes the multiplicative inverse of this element, +return zero if the element is zero. This is different from +FF invert that returns None if the element is zero.

+
source

fn pow<S: AsRef<[u64]>>(&self, exp: S) -> Self

Exponentiates self by exp, where exp is a little-endian order integer +exponent.

+

Implementors§

source§

impl<T: Field + From<u64>> Field for T

source§

const ZERO: Self = <Self as Field>::ZERO

source§

const ONE: Self = <Self as Field>::ONE

\ No newline at end of file diff --git a/docs/apidocs/chiquito/frontend/dsl/cb/enum.Typing.html b/docs/apidocs/chiquito/frontend/dsl/cb/enum.Typing.html new file mode 100644 index 00000000..ad9b8d7d --- /dev/null +++ b/docs/apidocs/chiquito/frontend/dsl/cb/enum.Typing.html @@ -0,0 +1,104 @@ +Typing in chiquito::frontend::dsl::cb - Rust

Enum chiquito::frontend::dsl::cb::Typing

source ·
pub enum Typing {
+    Unknown,
+    Boolean,
+    AntiBooly,
+}

Variants§

§

Unknown

§

Boolean

§

AntiBooly

Trait Implementations§

source§

impl Clone for Typing

source§

fn clone(&self) -> Typing

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Typing

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl PartialEq<Typing> for Typing

source§

fn eq(&self, other: &Typing) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Eq for Typing

source§

impl StructuralEq for Typing

source§

impl StructuralPartialEq for Typing

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Conv for T

§

fn conv<T>(self) -> Twhere + Self: Into<T>,

Converts self into T using Into<T>. Read more
§

impl<T> FmtForward for T

§

fn fmt_binary(self) -> FmtBinary<Self>where + Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
§

fn fmt_display(self) -> FmtDisplay<Self>where + Self: Display,

Causes self to use its Display implementation when +Debug-formatted.
§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>where + Self: LowerExp,

Causes self to use its LowerExp implementation when +Debug-formatted.
§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>where + Self: LowerHex,

Causes self to use its LowerHex implementation when +Debug-formatted.
§

fn fmt_octal(self) -> FmtOctal<Self>where + Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
§

fn fmt_pointer(self) -> FmtPointer<Self>where + Self: Pointer,

Causes self to use its Pointer implementation when +Debug-formatted.
§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>where + Self: UpperExp,

Causes self to use its UpperExp implementation when +Debug-formatted.
§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>where + Self: UpperHex,

Causes self to use its UpperHex implementation when +Debug-formatted.
§

fn fmt_list(self) -> FmtList<Self>where + &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
§

impl<T> Pipe for Twhere + T: ?Sized,

§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere + Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere + R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere + R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> Rwhere + Self: Borrow<B>, + B: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
§

fn pipe_borrow_mut<'a, B, R>( + &'a mut self, + func: impl FnOnce(&'a mut B) -> R +) -> Rwhere + Self: BorrowMut<B>, + B: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe +function. Read more
§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> Rwhere + Self: AsRef<U>, + U: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> Rwhere + Self: AsMut<U>, + U: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe +function.
§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> Rwhere + Self: Deref<Target = T>, + T: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.deref() into the pipe function.
§

fn pipe_deref_mut<'a, T, R>( + &'a mut self, + func: impl FnOnce(&'a mut T) -> R +) -> Rwhere + Self: DerefMut<Target = T> + Deref, + T: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe +function.
§

impl<T> Pointable for T

§

const ALIGN: usize = mem::align_of::<T>()

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
§

impl<T> Tap for T

§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Selfwhere + Self: Borrow<B>, + B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere + Self: BorrowMut<B>, + B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Selfwhere + Self: AsRef<R>, + R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere + Self: AsMut<R>, + R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Selfwhere + Self: Deref<Target = T>, + T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Selfwhere + Self: Borrow<B>, + B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere + Self: BorrowMut<B>, + B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release +builds.
§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Selfwhere + Self: AsRef<R>, + R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release +builds.
§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere + Self: AsMut<R>, + R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release +builds.
§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Selfwhere + Self: Deref<Target = T>, + T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release +builds.
§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release +builds.
source§

impl<T> ToOwned for Twhere + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
§

impl<T> TryConv for T

§

fn try_conv<T>(self) -> Result<T, Self::Error>where + Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

impl<T> Ungil for Twhere + T: Send,

\ No newline at end of file diff --git a/docs/apidocs/chiquito/frontend/dsl/cb/fn.and.html b/docs/apidocs/chiquito/frontend/dsl/cb/fn.and.html new file mode 100644 index 00000000..563cfae7 --- /dev/null +++ b/docs/apidocs/chiquito/frontend/dsl/cb/fn.and.html @@ -0,0 +1,8 @@ +and in chiquito::frontend::dsl::cb - Rust

Function chiquito::frontend::dsl::cb::and

source ·
pub fn and<F: From<u64>, E: Into<Constraint<F>>, I: IntoIterator<Item = E>>(
+    inputs: I
+) -> Constraint<F>
Expand description

Takes an iterator of input constraints and returns a new constraint representing the logical AND +of all input constraints. In practice, multiplies all input constraints together, i.e. A * B * C

+
    +
  • … = 0.
  • +
+
\ No newline at end of file diff --git a/docs/apidocs/chiquito/frontend/dsl/cb/fn.annotate.html b/docs/apidocs/chiquito/frontend/dsl/cb/fn.annotate.html new file mode 100644 index 00000000..ed2542bb --- /dev/null +++ b/docs/apidocs/chiquito/frontend/dsl/cb/fn.annotate.html @@ -0,0 +1,7 @@ +annotate in chiquito::frontend::dsl::cb - Rust

Function chiquito::frontend::dsl::cb::annotate

source ·
pub fn annotate<F, E: Into<ASTExpr<F>>>(
+    annotation: String,
+    expr: E,
+    typing: Typing
+) -> Constraint<F>
Expand description

Takes a string annotation and an expression, and returns a new constraint with the given +annotation and expression.

+
\ No newline at end of file diff --git a/docs/apidocs/chiquito/frontend/dsl/cb/fn.eq.html b/docs/apidocs/chiquito/frontend/dsl/cb/fn.eq.html new file mode 100644 index 00000000..13e768d2 --- /dev/null +++ b/docs/apidocs/chiquito/frontend/dsl/cb/fn.eq.html @@ -0,0 +1,6 @@ +eq in chiquito::frontend::dsl::cb - Rust

Function chiquito::frontend::dsl::cb::eq

source ·
pub fn eq<F, LHS: Into<Constraint<F>>, RHS: Into<Constraint<F>>>(
+    lhs: LHS,
+    rhs: RHS
+) -> Constraint<F>
Expand description

Takes two constraints and returns a new constraint representing the equality of the input +constraints.

+
\ No newline at end of file diff --git a/docs/apidocs/chiquito/frontend/dsl/cb/fn.if_next_step.html b/docs/apidocs/chiquito/frontend/dsl/cb/fn.if_next_step.html new file mode 100644 index 00000000..5609215c --- /dev/null +++ b/docs/apidocs/chiquito/frontend/dsl/cb/fn.if_next_step.html @@ -0,0 +1,6 @@ +if_next_step in chiquito::frontend::dsl::cb - Rust

Function chiquito::frontend::dsl::cb::if_next_step

source ·
pub fn if_next_step<F: Clone, T: Into<Constraint<F>>, ST: Into<StepTypeHandler>>(
+    step_type: ST,
+    constraint: T
+) -> Constraint<F>
Expand description

Takes a StepTypeHandler and a constraint, and returns a new constraint that is only applied if +the next step is of the given step type.

+
\ No newline at end of file diff --git a/docs/apidocs/chiquito/frontend/dsl/cb/fn.isz.html b/docs/apidocs/chiquito/frontend/dsl/cb/fn.isz.html new file mode 100644 index 00000000..ffe58896 --- /dev/null +++ b/docs/apidocs/chiquito/frontend/dsl/cb/fn.isz.html @@ -0,0 +1,3 @@ +isz in chiquito::frontend::dsl::cb - Rust

Function chiquito::frontend::dsl::cb::isz

source ·
pub fn isz<F, T: Into<Constraint<F>>>(constraint: T) -> Constraint<F>
Expand description

Takes a constraint and returns a new constraint representing whether the input constraint is +zero.

+
\ No newline at end of file diff --git a/docs/apidocs/chiquito/frontend/dsl/cb/fn.lookup.html b/docs/apidocs/chiquito/frontend/dsl/cb/fn.lookup.html new file mode 100644 index 00000000..b79d9a86 --- /dev/null +++ b/docs/apidocs/chiquito/frontend/dsl/cb/fn.lookup.html @@ -0,0 +1,3 @@ +lookup in chiquito::frontend::dsl::cb - Rust

Function chiquito::frontend::dsl::cb::lookup

source ·
pub fn lookup<F: Debug + Clone>() -> InPlaceLookupBuilder<F>
Expand description

Creates a new empty LookupBuilder object and returns it. Can an chain multiple add and +enable function calls after to build the lookup table.

+
\ No newline at end of file diff --git a/docs/apidocs/chiquito/frontend/dsl/cb/fn.next_step_must_be.html b/docs/apidocs/chiquito/frontend/dsl/cb/fn.next_step_must_be.html new file mode 100644 index 00000000..4ddea56d --- /dev/null +++ b/docs/apidocs/chiquito/frontend/dsl/cb/fn.next_step_must_be.html @@ -0,0 +1,5 @@ +next_step_must_be in chiquito::frontend::dsl::cb - Rust
pub fn next_step_must_be<F: From<u64>, ST: Into<StepTypeHandler>>(
+    step_type: ST
+) -> Constraint<F>
Expand description

Takes a StepTypeHandler and returns a new constraint that requires the next step to be of the +given step type.

+
\ No newline at end of file diff --git a/docs/apidocs/chiquito/frontend/dsl/cb/fn.next_step_must_not_be.html b/docs/apidocs/chiquito/frontend/dsl/cb/fn.next_step_must_not_be.html new file mode 100644 index 00000000..ae185f6f --- /dev/null +++ b/docs/apidocs/chiquito/frontend/dsl/cb/fn.next_step_must_not_be.html @@ -0,0 +1,5 @@ +next_step_must_not_be in chiquito::frontend::dsl::cb - Rust
pub fn next_step_must_not_be<F: From<u64>, ST: Into<StepTypeHandler>>(
+    step_type: ST
+) -> Constraint<F>
Expand description

Takes a StepTypeHandler and returns a new constraint that requires the next step to not be of +the given step type.

+
\ No newline at end of file diff --git a/docs/apidocs/chiquito/frontend/dsl/cb/fn.not.html b/docs/apidocs/chiquito/frontend/dsl/cb/fn.not.html new file mode 100644 index 00000000..50b2b8e7 --- /dev/null +++ b/docs/apidocs/chiquito/frontend/dsl/cb/fn.not.html @@ -0,0 +1,3 @@ +not in chiquito::frontend::dsl::cb - Rust

Function chiquito::frontend::dsl::cb::not

source ·
pub fn not<F: From<u64>, T: Into<Constraint<F>>>(constraint: T) -> Constraint<F>
Expand description

Takes a constraint and returns a new constraint representing the logical NOT of the input +constraint. The input constraint must have a value of either 0 or 1.

+
\ No newline at end of file diff --git a/docs/apidocs/chiquito/frontend/dsl/cb/fn.or.html b/docs/apidocs/chiquito/frontend/dsl/cb/fn.or.html new file mode 100644 index 00000000..80118fee --- /dev/null +++ b/docs/apidocs/chiquito/frontend/dsl/cb/fn.or.html @@ -0,0 +1,6 @@ +or in chiquito::frontend::dsl::cb - Rust

Function chiquito::frontend::dsl::cb::or

source ·
pub fn or<F: From<u64> + Debug, E: Into<Constraint<F>> + Clone, I: IntoIterator<Item = E> + Clone>(
+    inputs: I
+) -> Constraint<F>
Expand description

Takes an iterator of input constraints and returns a new constraint representing the logical OR +of all input constraints. In practice, constructs the output constraint in the format of +not(and(not(A), not(B), not(C), …)) = 0, which is equivalent to or(A, B, C, …).

+
\ No newline at end of file diff --git a/docs/apidocs/chiquito/frontend/dsl/cb/fn.rlc.html b/docs/apidocs/chiquito/frontend/dsl/cb/fn.rlc.html new file mode 100644 index 00000000..bb663c30 --- /dev/null +++ b/docs/apidocs/chiquito/frontend/dsl/cb/fn.rlc.html @@ -0,0 +1,5 @@ +rlc in chiquito::frontend::dsl::cb - Rust

Function chiquito::frontend::dsl::cb::rlc

source ·
pub fn rlc<F: From<u64>, E: Into<ASTExpr<F>> + Clone, R: Into<ASTExpr<F>> + Clone>(
+    exprs: &[E],
+    randomness: R
+) -> ASTExpr<F>
Expand description

Computes the randomized linear combination of the given expressions and randomness.

+
\ No newline at end of file diff --git a/docs/apidocs/chiquito/frontend/dsl/cb/fn.select.html b/docs/apidocs/chiquito/frontend/dsl/cb/fn.select.html new file mode 100644 index 00000000..995fd86c --- /dev/null +++ b/docs/apidocs/chiquito/frontend/dsl/cb/fn.select.html @@ -0,0 +1,8 @@ +select in chiquito::frontend::dsl::cb - Rust

Function chiquito::frontend::dsl::cb::select

source ·
pub fn select<F: From<u64> + Clone, T1: Into<Constraint<F>>, T2: Into<Constraint<F>>, T3: Into<Constraint<F>>>(
+    selector: T1,
+    when_true: T2,
+    when_false: T3
+) -> Constraint<F>
Expand description

Takes a selector constraint and two other constraints, and returns a new constraint that +represents the value of when_true if the selector is true, or when_false if the selector is +false.

+
\ No newline at end of file diff --git a/docs/apidocs/chiquito/frontend/dsl/cb/fn.table.html b/docs/apidocs/chiquito/frontend/dsl/cb/fn.table.html new file mode 100644 index 00000000..3ad26c22 --- /dev/null +++ b/docs/apidocs/chiquito/frontend/dsl/cb/fn.table.html @@ -0,0 +1 @@ +table in chiquito::frontend::dsl::cb - Rust

Function chiquito::frontend::dsl::cb::table

source ·
pub fn table<F: Default>() -> LookupTableStore<F>
\ No newline at end of file diff --git a/docs/apidocs/chiquito/frontend/dsl/cb/fn.unless.html b/docs/apidocs/chiquito/frontend/dsl/cb/fn.unless.html new file mode 100644 index 00000000..ce0ced67 --- /dev/null +++ b/docs/apidocs/chiquito/frontend/dsl/cb/fn.unless.html @@ -0,0 +1,6 @@ +unless in chiquito::frontend::dsl::cb - Rust

Function chiquito::frontend::dsl::cb::unless

source ·
pub fn unless<F: From<u64> + Clone, T1: Into<Constraint<F>>, T2: Into<Constraint<F>>>(
+    selector: T1,
+    when_false: T2
+) -> Constraint<F>
Expand description

Takes a selector constraint and a when_false constraint, and returns a new constraint that +represents the value of when_false unless the selector is true, in which case it returns zero.

+
\ No newline at end of file diff --git a/docs/apidocs/chiquito/frontend/dsl/cb/fn.when.html b/docs/apidocs/chiquito/frontend/dsl/cb/fn.when.html new file mode 100644 index 00000000..5dc0b61d --- /dev/null +++ b/docs/apidocs/chiquito/frontend/dsl/cb/fn.when.html @@ -0,0 +1,6 @@ +when in chiquito::frontend::dsl::cb - Rust

Function chiquito::frontend::dsl::cb::when

source ·
pub fn when<F: From<u64> + Clone, T1: Into<Constraint<F>>, T2: Into<Constraint<F>>>(
+    selector: T1,
+    when_true: T2
+) -> Constraint<F>
Expand description

Takes a selector constraint and a when_true constraint, and returns a new constraint that +represents the value of when_true if the selector is true, or zero if the selector is false.

+
\ No newline at end of file diff --git a/docs/apidocs/chiquito/frontend/dsl/cb/fn.xor.html b/docs/apidocs/chiquito/frontend/dsl/cb/fn.xor.html new file mode 100644 index 00000000..c558492f --- /dev/null +++ b/docs/apidocs/chiquito/frontend/dsl/cb/fn.xor.html @@ -0,0 +1,6 @@ +xor in chiquito::frontend::dsl::cb - Rust

Function chiquito::frontend::dsl::cb::xor

source ·
pub fn xor<F: From<u64> + Clone, LHS: Into<Constraint<F>>, RHS: Into<Constraint<F>>>(
+    lhs: LHS,
+    rhs: RHS
+) -> Constraint<F>
Expand description

Takes two expressions and returns a new expression representing the logical XOR of the input +expressions.

+
\ No newline at end of file diff --git a/docs/apidocs/chiquito/frontend/dsl/cb/index.html b/docs/apidocs/chiquito/frontend/dsl/cb/index.html new file mode 100644 index 00000000..2cd945a6 --- /dev/null +++ b/docs/apidocs/chiquito/frontend/dsl/cb/index.html @@ -0,0 +1,17 @@ +chiquito::frontend::dsl::cb - Rust

Module chiquito::frontend::dsl::cb

source ·

Structs

  • Represents a constraint with an associated annotation and expression.

Enums

Functions

  • Takes an iterator of input constraints and returns a new constraint representing the logical AND +of all input constraints. In practice, multiplies all input constraints together, i.e. A * B * C
  • Takes a string annotation and an expression, and returns a new constraint with the given +annotation and expression.
  • Takes two constraints and returns a new constraint representing the equality of the input +constraints.
  • Takes a StepTypeHandler and a constraint, and returns a new constraint that is only applied if +the next step is of the given step type.
  • Takes a constraint and returns a new constraint representing whether the input constraint is +zero.
  • Creates a new empty LookupBuilder object and returns it. Can an chain multiple add and +enable function calls after to build the lookup table.
  • Takes a StepTypeHandler and returns a new constraint that requires the next step to be of the +given step type.
  • Takes a StepTypeHandler and returns a new constraint that requires the next step to not be of +the given step type.
  • Takes a constraint and returns a new constraint representing the logical NOT of the input +constraint. The input constraint must have a value of either 0 or 1.
  • Takes an iterator of input constraints and returns a new constraint representing the logical OR +of all input constraints. In practice, constructs the output constraint in the format of +not(and(not(A), not(B), not(C), …)) = 0, which is equivalent to or(A, B, C, …).
  • Computes the randomized linear combination of the given expressions and randomness.
  • Takes a selector constraint and two other constraints, and returns a new constraint that +represents the value of when_true if the selector is true, or when_false if the selector is +false.
  • Takes a selector constraint and a when_false constraint, and returns a new constraint that +represents the value of when_false unless the selector is true, in which case it returns zero.
  • Takes a selector constraint and a when_true constraint, and returns a new constraint that +represents the value of when_true if the selector is true, or zero if the selector is false.
  • Takes two expressions and returns a new expression representing the logical XOR of the input +expressions.
\ No newline at end of file diff --git a/docs/apidocs/chiquito/frontend/dsl/cb/sidebar-items.js b/docs/apidocs/chiquito/frontend/dsl/cb/sidebar-items.js new file mode 100644 index 00000000..585d8415 --- /dev/null +++ b/docs/apidocs/chiquito/frontend/dsl/cb/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"enum":["Typing"],"fn":["and","annotate","eq","if_next_step","isz","lookup","next_step_must_be","next_step_must_not_be","not","or","rlc","select","table","unless","when","xor"],"struct":["Constraint"]}; \ No newline at end of file diff --git a/docs/apidocs/chiquito/frontend/dsl/cb/struct.Constraint.html b/docs/apidocs/chiquito/frontend/dsl/cb/struct.Constraint.html new file mode 100644 index 00000000..904c2403 --- /dev/null +++ b/docs/apidocs/chiquito/frontend/dsl/cb/struct.Constraint.html @@ -0,0 +1,108 @@ +Constraint in chiquito::frontend::dsl::cb - Rust
pub struct Constraint<F> {
+    pub annotation: String,
+    pub expr: ASTExpr<F>,
+    pub typing: Typing,
+}
Expand description

Represents a constraint with an associated annotation and expression.

+

Fields§

§annotation: String§expr: ASTExpr<F>§typing: Typing

Trait Implementations§

source§

impl<F: Clone> Clone for Constraint<F>

source§

fn clone(&self) -> Constraint<F>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<F> Debug for Constraint<F>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<F> From<Constraint<F>> for ASTExpr<F>

source§

fn from(c: Constraint<F>) -> Self

Converts to this type from the input type.
source§

impl<F: Debug> From<Expr<F, Queriable<F>>> for Constraint<F>

source§

fn from(expr: ASTExpr<F>) -> Self

Converts to this type from the input type.
source§

impl<F> From<Queriable<F>> for Constraint<F>

source§

fn from(query: Queriable<F>) -> Self

Converts to this type from the input type.
source§

impl<F: From<u64> + Debug> From<bool> for Constraint<F>

source§

fn from(value: bool) -> Self

Converts to this type from the input type.
source§

impl<F: Field + From<u64> + Debug> From<i32> for Constraint<F>

source§

fn from(v: i32) -> Self

Converts to this type from the input type.
source§

impl<F: From<u64> + Debug> From<u32> for Constraint<F>

source§

fn from(value: u32) -> Self

Converts to this type from the input type.
source§

impl<F: From<u64> + Debug> From<u64> for Constraint<F>

source§

fn from(value: u64) -> Self

Converts to this type from the input type.
source§

impl<F: From<u64> + Debug> From<u8> for Constraint<F>

source§

fn from(value: u8) -> Self

Converts to this type from the input type.
source§

impl<F: From<u64> + Debug> From<usize> for Constraint<F>

source§

fn from(value: usize) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

§

impl<F> RefUnwindSafe for Constraint<F>where + F: RefUnwindSafe,

§

impl<F> Send for Constraint<F>where + F: Send,

§

impl<F> Sync for Constraint<F>where + F: Sync,

§

impl<F> Unpin for Constraint<F>where + F: Unpin,

§

impl<F> UnwindSafe for Constraint<F>where + F: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for Twhere + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Conv for T

§

fn conv<T>(self) -> Twhere + Self: Into<T>,

Converts self into T using Into<T>. Read more
§

impl<T> FmtForward for T

§

fn fmt_binary(self) -> FmtBinary<Self>where + Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
§

fn fmt_display(self) -> FmtDisplay<Self>where + Self: Display,

Causes self to use its Display implementation when +Debug-formatted.
§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>where + Self: LowerExp,

Causes self to use its LowerExp implementation when +Debug-formatted.
§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>where + Self: LowerHex,

Causes self to use its LowerHex implementation when +Debug-formatted.
§

fn fmt_octal(self) -> FmtOctal<Self>where + Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
§

fn fmt_pointer(self) -> FmtPointer<Self>where + Self: Pointer,

Causes self to use its Pointer implementation when +Debug-formatted.
§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>where + Self: UpperExp,

Causes self to use its UpperExp implementation when +Debug-formatted.
§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>where + Self: UpperHex,

Causes self to use its UpperHex implementation when +Debug-formatted.
§

fn fmt_list(self) -> FmtList<Self>where + &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
§

impl<T> Pipe for Twhere + T: ?Sized,

§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere + Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere + R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere + R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> Rwhere + Self: Borrow<B>, + B: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
§

fn pipe_borrow_mut<'a, B, R>( + &'a mut self, + func: impl FnOnce(&'a mut B) -> R +) -> Rwhere + Self: BorrowMut<B>, + B: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe +function. Read more
§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> Rwhere + Self: AsRef<U>, + U: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> Rwhere + Self: AsMut<U>, + U: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe +function.
§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> Rwhere + Self: Deref<Target = T>, + T: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.deref() into the pipe function.
§

fn pipe_deref_mut<'a, T, R>( + &'a mut self, + func: impl FnOnce(&'a mut T) -> R +) -> Rwhere + Self: DerefMut<Target = T> + Deref, + T: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe +function.
§

impl<T> Pointable for T

§

const ALIGN: usize = mem::align_of::<T>()

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
§

impl<T> Tap for T

§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Selfwhere + Self: Borrow<B>, + B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere + Self: BorrowMut<B>, + B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Selfwhere + Self: AsRef<R>, + R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere + Self: AsMut<R>, + R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Selfwhere + Self: Deref<Target = T>, + T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Selfwhere + Self: Borrow<B>, + B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere + Self: BorrowMut<B>, + B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release +builds.
§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Selfwhere + Self: AsRef<R>, + R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release +builds.
§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere + Self: AsMut<R>, + R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release +builds.
§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Selfwhere + Self: Deref<Target = T>, + T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release +builds.
§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release +builds.
source§

impl<T> ToOwned for Twhere + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
§

impl<T> TryConv for T

§

fn try_conv<T>(self) -> Result<T, Self::Error>where + Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

impl<T> Ungil for Twhere + T: Send,

\ No newline at end of file diff --git a/docs/apidocs/chiquito/frontend/dsl/enum.StepTypeDefInput.html b/docs/apidocs/chiquito/frontend/dsl/enum.StepTypeDefInput.html new file mode 100644 index 00000000..a6cbfb3b --- /dev/null +++ b/docs/apidocs/chiquito/frontend/dsl/enum.StepTypeDefInput.html @@ -0,0 +1,100 @@ +StepTypeDefInput in chiquito::frontend::dsl - Rust
pub enum StepTypeDefInput {
+    Handler(StepTypeHandler),
+    String(&'static str),
+}

Variants§

§

Handler(StepTypeHandler)

§

String(&'static str)

Trait Implementations§

source§

impl From<&'static str> for StepTypeDefInput

source§

fn from(s: &'static str) -> Self

Converts to this type from the input type.
source§

impl From<StepTypeHandler> for StepTypeDefInput

source§

fn from(h: StepTypeHandler) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Conv for T

§

fn conv<T>(self) -> Twhere + Self: Into<T>,

Converts self into T using Into<T>. Read more
§

impl<T> FmtForward for T

§

fn fmt_binary(self) -> FmtBinary<Self>where + Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
§

fn fmt_display(self) -> FmtDisplay<Self>where + Self: Display,

Causes self to use its Display implementation when +Debug-formatted.
§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>where + Self: LowerExp,

Causes self to use its LowerExp implementation when +Debug-formatted.
§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>where + Self: LowerHex,

Causes self to use its LowerHex implementation when +Debug-formatted.
§

fn fmt_octal(self) -> FmtOctal<Self>where + Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
§

fn fmt_pointer(self) -> FmtPointer<Self>where + Self: Pointer,

Causes self to use its Pointer implementation when +Debug-formatted.
§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>where + Self: UpperExp,

Causes self to use its UpperExp implementation when +Debug-formatted.
§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>where + Self: UpperHex,

Causes self to use its UpperHex implementation when +Debug-formatted.
§

fn fmt_list(self) -> FmtList<Self>where + &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
§

impl<T> Pipe for Twhere + T: ?Sized,

§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere + Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere + R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere + R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> Rwhere + Self: Borrow<B>, + B: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
§

fn pipe_borrow_mut<'a, B, R>( + &'a mut self, + func: impl FnOnce(&'a mut B) -> R +) -> Rwhere + Self: BorrowMut<B>, + B: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe +function. Read more
§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> Rwhere + Self: AsRef<U>, + U: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> Rwhere + Self: AsMut<U>, + U: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe +function.
§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> Rwhere + Self: Deref<Target = T>, + T: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.deref() into the pipe function.
§

fn pipe_deref_mut<'a, T, R>( + &'a mut self, + func: impl FnOnce(&'a mut T) -> R +) -> Rwhere + Self: DerefMut<Target = T> + Deref, + T: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe +function.
§

impl<T> Pointable for T

§

const ALIGN: usize = mem::align_of::<T>()

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
§

impl<T> Tap for T

§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Selfwhere + Self: Borrow<B>, + B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere + Self: BorrowMut<B>, + B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Selfwhere + Self: AsRef<R>, + R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere + Self: AsMut<R>, + R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Selfwhere + Self: Deref<Target = T>, + T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Selfwhere + Self: Borrow<B>, + B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere + Self: BorrowMut<B>, + B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release +builds.
§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Selfwhere + Self: AsRef<R>, + R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release +builds.
§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere + Self: AsMut<R>, + R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release +builds.
§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Selfwhere + Self: Deref<Target = T>, + T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release +builds.
§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release +builds.
§

impl<T> TryConv for T

§

fn try_conv<T>(self) -> Result<T, Self::Error>where + Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

impl<T> Ungil for Twhere + T: Send,

\ No newline at end of file diff --git a/docs/apidocs/chiquito/frontend/dsl/fn.circuit.html b/docs/apidocs/chiquito/frontend/dsl/fn.circuit.html new file mode 100644 index 00000000..e27a3183 --- /dev/null +++ b/docs/apidocs/chiquito/frontend/dsl/fn.circuit.html @@ -0,0 +1,7 @@ +circuit in chiquito::frontend::dsl - Rust

Function chiquito::frontend::dsl::circuit

source ·
pub fn circuit<F, TraceArgs, D>(_name: &str, def: D) -> Circuit<F, TraceArgs>where
+    D: Fn(&mut CircuitContext<F, TraceArgs>),
Expand description

Creates a Circuit instance by providing a name and a definition closure that is applied to a +mutable CircuitContext. The user customizes the definition closure by calling CircuitContext +functions. This is the main function that users call to define a Chiquito circuit. Currently, +the name is not used for annotation within the function, but it may be used in future +implementations.

+
\ No newline at end of file diff --git a/docs/apidocs/chiquito/frontend/dsl/index.html b/docs/apidocs/chiquito/frontend/dsl/index.html new file mode 100644 index 00000000..41df958f --- /dev/null +++ b/docs/apidocs/chiquito/frontend/dsl/index.html @@ -0,0 +1,13 @@ +chiquito::frontend::dsl - Rust

Module chiquito::frontend::dsl

source ·

Re-exports

  • pub use sc::*;

Modules

Structs

  • A generic structure designed to handle the context of a circuit for generic types F, +TraceArgs and StepArgs. The struct contains a Circuit instance and implements +methods to build the circuit, add various components, and manipulate the circuit. F is a +generic type representing the field of the circuit. TraceArgs is a generic type +representing the arguments passed to the trace function. StepArgs is a generic type +representing the arguments passed to the step_type_def function.
  • A generic structure designed to handle the context of a step type definition. The struct +contains a StepType instance and implements methods to build the step type, add components, +and manipulate the step type. F is a generic type representing the field of the step type. +Args is the type of the step instance witness generation arguments.

Enums

Functions

  • Creates a Circuit instance by providing a name and a definition closure that is applied to a +mutable CircuitContext. The user customizes the definition closure by calling CircuitContext +functions. This is the main function that users call to define a Chiquito circuit. Currently, +the name is not used for annotation within the function, but it may be used in future +implementations.
\ No newline at end of file diff --git a/docs/apidocs/chiquito/frontend/dsl/lb/index.html b/docs/apidocs/chiquito/frontend/dsl/lb/index.html new file mode 100644 index 00000000..ee02ab66 --- /dev/null +++ b/docs/apidocs/chiquito/frontend/dsl/lb/index.html @@ -0,0 +1 @@ +chiquito::frontend::dsl::lb - Rust

Module chiquito::frontend::dsl::lb

source ·

Structs

Traits

\ No newline at end of file diff --git a/docs/apidocs/chiquito/frontend/dsl/lb/sidebar-items.js b/docs/apidocs/chiquito/frontend/dsl/lb/sidebar-items.js new file mode 100644 index 00000000..5e45676b --- /dev/null +++ b/docs/apidocs/chiquito/frontend/dsl/lb/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"struct":["InPlaceLookupBuilder","LookupTable","LookupTableBuilder","LookupTableRegistry","LookupTableStore"],"trait":["LookupBuilder"]}; \ No newline at end of file diff --git a/docs/apidocs/chiquito/frontend/dsl/lb/struct.InPlaceLookupBuilder.html b/docs/apidocs/chiquito/frontend/dsl/lb/struct.InPlaceLookupBuilder.html new file mode 100644 index 00000000..8398f252 --- /dev/null +++ b/docs/apidocs/chiquito/frontend/dsl/lb/struct.InPlaceLookupBuilder.html @@ -0,0 +1,115 @@ +InPlaceLookupBuilder in chiquito::frontend::dsl::lb - Rust
pub struct InPlaceLookupBuilder<F> { /* private fields */ }
Expand description

A helper struct for building lookup tables.

+

Implementations§

source§

impl<F: Debug + Clone> InPlaceLookupBuilder<F>

source

pub fn add<C: Into<Constraint<F>>, E: Into<ASTExpr<F>>>( + self, + constraint: C, + expression: E +) -> Self

Adds a source column-lookup column pair to the lookup table. Because the function returns a +mutable reference to the LookupBuilder<F>, it can an chain multiple add and enable +function calls to build the lookup table. Requires calling lookup to create an empty +LookupBuilder instance at the very front.

+
source

pub fn enable<C: Into<Constraint<F>>>(self, enable: C) -> Self

Adds a selector column specific to the lookup table. Because the function returns a mutable +reference to the LookupBuilder<F>, it can an chain multiple add and enable function +calls to build the lookup table. Requires calling lookup to create an +empty LookupBuilder instance at the very front.

+

Trait Implementations§

source§

impl<F> Default for InPlaceLookupBuilder<F>

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl<F> LookupBuilder<F> for InPlaceLookupBuilder<F>

source§

fn build(self, _: &StepTypeSetupContext<'_, F>) -> Lookup<F>

Auto Trait Implementations§

§

impl<F> RefUnwindSafe for InPlaceLookupBuilder<F>where + F: RefUnwindSafe,

§

impl<F> Send for InPlaceLookupBuilder<F>where + F: Send,

§

impl<F> Sync for InPlaceLookupBuilder<F>where + F: Sync,

§

impl<F> Unpin for InPlaceLookupBuilder<F>where + F: Unpin,

§

impl<F> UnwindSafe for InPlaceLookupBuilder<F>where + F: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for Twhere + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Conv for T

§

fn conv<T>(self) -> Twhere + Self: Into<T>,

Converts self into T using Into<T>. Read more
§

impl<T> FmtForward for T

§

fn fmt_binary(self) -> FmtBinary<Self>where + Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
§

fn fmt_display(self) -> FmtDisplay<Self>where + Self: Display,

Causes self to use its Display implementation when +Debug-formatted.
§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>where + Self: LowerExp,

Causes self to use its LowerExp implementation when +Debug-formatted.
§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>where + Self: LowerHex,

Causes self to use its LowerHex implementation when +Debug-formatted.
§

fn fmt_octal(self) -> FmtOctal<Self>where + Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
§

fn fmt_pointer(self) -> FmtPointer<Self>where + Self: Pointer,

Causes self to use its Pointer implementation when +Debug-formatted.
§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>where + Self: UpperExp,

Causes self to use its UpperExp implementation when +Debug-formatted.
§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>where + Self: UpperHex,

Causes self to use its UpperHex implementation when +Debug-formatted.
§

fn fmt_list(self) -> FmtList<Self>where + &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
§

impl<T> Pipe for Twhere + T: ?Sized,

§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere + Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere + R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere + R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> Rwhere + Self: Borrow<B>, + B: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
§

fn pipe_borrow_mut<'a, B, R>( + &'a mut self, + func: impl FnOnce(&'a mut B) -> R +) -> Rwhere + Self: BorrowMut<B>, + B: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe +function. Read more
§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> Rwhere + Self: AsRef<U>, + U: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> Rwhere + Self: AsMut<U>, + U: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe +function.
§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> Rwhere + Self: Deref<Target = T>, + T: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.deref() into the pipe function.
§

fn pipe_deref_mut<'a, T, R>( + &'a mut self, + func: impl FnOnce(&'a mut T) -> R +) -> Rwhere + Self: DerefMut<Target = T> + Deref, + T: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe +function.
§

impl<T> Pointable for T

§

const ALIGN: usize = mem::align_of::<T>()

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
§

impl<T> Tap for T

§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Selfwhere + Self: Borrow<B>, + B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere + Self: BorrowMut<B>, + B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Selfwhere + Self: AsRef<R>, + R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere + Self: AsMut<R>, + R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Selfwhere + Self: Deref<Target = T>, + T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Selfwhere + Self: Borrow<B>, + B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere + Self: BorrowMut<B>, + B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release +builds.
§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Selfwhere + Self: AsRef<R>, + R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release +builds.
§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere + Self: AsMut<R>, + R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release +builds.
§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Selfwhere + Self: Deref<Target = T>, + T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release +builds.
§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release +builds.
§

impl<T> TryConv for T

§

fn try_conv<T>(self) -> Result<T, Self::Error>where + Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

impl<T> Ungil for Twhere + T: Send,

\ No newline at end of file diff --git a/docs/apidocs/chiquito/frontend/dsl/lb/struct.LookupTable.html b/docs/apidocs/chiquito/frontend/dsl/lb/struct.LookupTable.html new file mode 100644 index 00000000..7c0a8748 --- /dev/null +++ b/docs/apidocs/chiquito/frontend/dsl/lb/struct.LookupTable.html @@ -0,0 +1,108 @@ +LookupTable in chiquito::frontend::dsl::lb - Rust
pub struct LookupTable { /* private fields */ }

Implementations§

source§

impl LookupTable

source

pub fn apply<F, C: Into<Constraint<F>>>( + &self, + constraint: C +) -> LookupTableBuilder<F>

source

pub fn when<F, C: Into<Constraint<F>>>( + &self, + enable: C +) -> LookupTableBuilder<F>

Adds a selector column specific to the lookup table. Because the function returns a mutable +reference to the LookupBuilder<F>, it can an chain multiple add and enable function +calls to build the lookup table. Requires calling lookup to create an +empty LookupBuilder instance at the very front.

+

Trait Implementations§

source§

impl Clone for LookupTable

source§

fn clone(&self) -> LookupTable

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for LookupTable

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Copy for LookupTable

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Conv for T

§

fn conv<T>(self) -> Twhere + Self: Into<T>,

Converts self into T using Into<T>. Read more
§

impl<T> FmtForward for T

§

fn fmt_binary(self) -> FmtBinary<Self>where + Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
§

fn fmt_display(self) -> FmtDisplay<Self>where + Self: Display,

Causes self to use its Display implementation when +Debug-formatted.
§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>where + Self: LowerExp,

Causes self to use its LowerExp implementation when +Debug-formatted.
§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>where + Self: LowerHex,

Causes self to use its LowerHex implementation when +Debug-formatted.
§

fn fmt_octal(self) -> FmtOctal<Self>where + Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
§

fn fmt_pointer(self) -> FmtPointer<Self>where + Self: Pointer,

Causes self to use its Pointer implementation when +Debug-formatted.
§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>where + Self: UpperExp,

Causes self to use its UpperExp implementation when +Debug-formatted.
§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>where + Self: UpperHex,

Causes self to use its UpperHex implementation when +Debug-formatted.
§

fn fmt_list(self) -> FmtList<Self>where + &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
§

impl<T> Pipe for Twhere + T: ?Sized,

§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere + Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere + R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere + R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> Rwhere + Self: Borrow<B>, + B: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
§

fn pipe_borrow_mut<'a, B, R>( + &'a mut self, + func: impl FnOnce(&'a mut B) -> R +) -> Rwhere + Self: BorrowMut<B>, + B: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe +function. Read more
§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> Rwhere + Self: AsRef<U>, + U: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> Rwhere + Self: AsMut<U>, + U: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe +function.
§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> Rwhere + Self: Deref<Target = T>, + T: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.deref() into the pipe function.
§

fn pipe_deref_mut<'a, T, R>( + &'a mut self, + func: impl FnOnce(&'a mut T) -> R +) -> Rwhere + Self: DerefMut<Target = T> + Deref, + T: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe +function.
§

impl<T> Pointable for T

§

const ALIGN: usize = mem::align_of::<T>()

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
§

impl<T> Tap for T

§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Selfwhere + Self: Borrow<B>, + B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere + Self: BorrowMut<B>, + B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Selfwhere + Self: AsRef<R>, + R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere + Self: AsMut<R>, + R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Selfwhere + Self: Deref<Target = T>, + T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Selfwhere + Self: Borrow<B>, + B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere + Self: BorrowMut<B>, + B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release +builds.
§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Selfwhere + Self: AsRef<R>, + R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release +builds.
§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere + Self: AsMut<R>, + R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release +builds.
§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Selfwhere + Self: Deref<Target = T>, + T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release +builds.
§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release +builds.
source§

impl<T> ToOwned for Twhere + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
§

impl<T> TryConv for T

§

fn try_conv<T>(self) -> Result<T, Self::Error>where + Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

impl<T> Ungil for Twhere + T: Send,

\ No newline at end of file diff --git a/docs/apidocs/chiquito/frontend/dsl/lb/struct.LookupTableBuilder.html b/docs/apidocs/chiquito/frontend/dsl/lb/struct.LookupTableBuilder.html new file mode 100644 index 00000000..0082c5c1 --- /dev/null +++ b/docs/apidocs/chiquito/frontend/dsl/lb/struct.LookupTableBuilder.html @@ -0,0 +1,106 @@ +LookupTableBuilder in chiquito::frontend::dsl::lb - Rust
pub struct LookupTableBuilder<F> { /* private fields */ }

Implementations§

source§

impl<F> LookupTableBuilder<F>

source

pub fn apply<C: Into<Constraint<F>>>(self, constraint: C) -> Self

source

pub fn when<C: Into<Constraint<F>>>(self, enable: C) -> Self

Adds a selector column specific to the lookup table. Because the function returns a mutable +reference to the LookupBuilder<F>, it can an chain multiple add and enable function +calls to build the lookup table. Requires calling lookup to create an +empty LookupBuilder instance at the very front.

+

Trait Implementations§

Auto Trait Implementations§

§

impl<F> RefUnwindSafe for LookupTableBuilder<F>where + F: RefUnwindSafe,

§

impl<F> Send for LookupTableBuilder<F>where + F: Send,

§

impl<F> Sync for LookupTableBuilder<F>where + F: Sync,

§

impl<F> Unpin for LookupTableBuilder<F>where + F: Unpin,

§

impl<F> UnwindSafe for LookupTableBuilder<F>where + F: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for Twhere + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Conv for T

§

fn conv<T>(self) -> Twhere + Self: Into<T>,

Converts self into T using Into<T>. Read more
§

impl<T> FmtForward for T

§

fn fmt_binary(self) -> FmtBinary<Self>where + Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
§

fn fmt_display(self) -> FmtDisplay<Self>where + Self: Display,

Causes self to use its Display implementation when +Debug-formatted.
§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>where + Self: LowerExp,

Causes self to use its LowerExp implementation when +Debug-formatted.
§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>where + Self: LowerHex,

Causes self to use its LowerHex implementation when +Debug-formatted.
§

fn fmt_octal(self) -> FmtOctal<Self>where + Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
§

fn fmt_pointer(self) -> FmtPointer<Self>where + Self: Pointer,

Causes self to use its Pointer implementation when +Debug-formatted.
§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>where + Self: UpperExp,

Causes self to use its UpperExp implementation when +Debug-formatted.
§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>where + Self: UpperHex,

Causes self to use its UpperHex implementation when +Debug-formatted.
§

fn fmt_list(self) -> FmtList<Self>where + &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
§

impl<T> Pipe for Twhere + T: ?Sized,

§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere + Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere + R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere + R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> Rwhere + Self: Borrow<B>, + B: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
§

fn pipe_borrow_mut<'a, B, R>( + &'a mut self, + func: impl FnOnce(&'a mut B) -> R +) -> Rwhere + Self: BorrowMut<B>, + B: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe +function. Read more
§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> Rwhere + Self: AsRef<U>, + U: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> Rwhere + Self: AsMut<U>, + U: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe +function.
§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> Rwhere + Self: Deref<Target = T>, + T: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.deref() into the pipe function.
§

fn pipe_deref_mut<'a, T, R>( + &'a mut self, + func: impl FnOnce(&'a mut T) -> R +) -> Rwhere + Self: DerefMut<Target = T> + Deref, + T: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe +function.
§

impl<T> Pointable for T

§

const ALIGN: usize = mem::align_of::<T>()

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
§

impl<T> Tap for T

§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Selfwhere + Self: Borrow<B>, + B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere + Self: BorrowMut<B>, + B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Selfwhere + Self: AsRef<R>, + R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere + Self: AsMut<R>, + R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Selfwhere + Self: Deref<Target = T>, + T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Selfwhere + Self: Borrow<B>, + B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere + Self: BorrowMut<B>, + B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release +builds.
§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Selfwhere + Self: AsRef<R>, + R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release +builds.
§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere + Self: AsMut<R>, + R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release +builds.
§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Selfwhere + Self: Deref<Target = T>, + T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release +builds.
§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release +builds.
§

impl<T> TryConv for T

§

fn try_conv<T>(self) -> Result<T, Self::Error>where + Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

impl<T> Ungil for Twhere + T: Send,

\ No newline at end of file diff --git a/docs/apidocs/chiquito/frontend/dsl/lb/struct.LookupTableRegistry.html b/docs/apidocs/chiquito/frontend/dsl/lb/struct.LookupTableRegistry.html new file mode 100644 index 00000000..1848cc9d --- /dev/null +++ b/docs/apidocs/chiquito/frontend/dsl/lb/struct.LookupTableRegistry.html @@ -0,0 +1,100 @@ +LookupTableRegistry in chiquito::frontend::dsl::lb - Rust
pub struct LookupTableRegistry<F>(_);

Implementations§

source§

impl<F> LookupTableRegistry<F>

source

pub fn add(&self, table: LookupTableStore<F>)

source§

impl<F: Clone> LookupTableRegistry<F>

source

pub fn get(&self, uuid: u128) -> LookupTableStore<F>

Trait Implementations§

source§

impl<F> Clone for LookupTableRegistry<F>

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<F: Debug> Debug for LookupTableRegistry<F>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<F> Default for LookupTableRegistry<F>

source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl<F> RefUnwindSafe for LookupTableRegistry<F>

§

impl<F> Send for LookupTableRegistry<F>where + F: Send,

§

impl<F> Sync for LookupTableRegistry<F>where + F: Send,

§

impl<F> Unpin for LookupTableRegistry<F>

§

impl<F> UnwindSafe for LookupTableRegistry<F>

Blanket Implementations§

source§

impl<T> Any for Twhere + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Conv for T

§

fn conv<T>(self) -> Twhere + Self: Into<T>,

Converts self into T using Into<T>. Read more
§

impl<T> FmtForward for T

§

fn fmt_binary(self) -> FmtBinary<Self>where + Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
§

fn fmt_display(self) -> FmtDisplay<Self>where + Self: Display,

Causes self to use its Display implementation when +Debug-formatted.
§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>where + Self: LowerExp,

Causes self to use its LowerExp implementation when +Debug-formatted.
§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>where + Self: LowerHex,

Causes self to use its LowerHex implementation when +Debug-formatted.
§

fn fmt_octal(self) -> FmtOctal<Self>where + Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
§

fn fmt_pointer(self) -> FmtPointer<Self>where + Self: Pointer,

Causes self to use its Pointer implementation when +Debug-formatted.
§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>where + Self: UpperExp,

Causes self to use its UpperExp implementation when +Debug-formatted.
§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>where + Self: UpperHex,

Causes self to use its UpperHex implementation when +Debug-formatted.
§

fn fmt_list(self) -> FmtList<Self>where + &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
§

impl<T> Pipe for Twhere + T: ?Sized,

§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere + Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere + R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere + R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> Rwhere + Self: Borrow<B>, + B: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
§

fn pipe_borrow_mut<'a, B, R>( + &'a mut self, + func: impl FnOnce(&'a mut B) -> R +) -> Rwhere + Self: BorrowMut<B>, + B: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe +function. Read more
§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> Rwhere + Self: AsRef<U>, + U: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> Rwhere + Self: AsMut<U>, + U: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe +function.
§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> Rwhere + Self: Deref<Target = T>, + T: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.deref() into the pipe function.
§

fn pipe_deref_mut<'a, T, R>( + &'a mut self, + func: impl FnOnce(&'a mut T) -> R +) -> Rwhere + Self: DerefMut<Target = T> + Deref, + T: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe +function.
§

impl<T> Pointable for T

§

const ALIGN: usize = mem::align_of::<T>()

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
§

impl<T> Tap for T

§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Selfwhere + Self: Borrow<B>, + B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere + Self: BorrowMut<B>, + B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Selfwhere + Self: AsRef<R>, + R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere + Self: AsMut<R>, + R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Selfwhere + Self: Deref<Target = T>, + T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Selfwhere + Self: Borrow<B>, + B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere + Self: BorrowMut<B>, + B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release +builds.
§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Selfwhere + Self: AsRef<R>, + R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release +builds.
§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere + Self: AsMut<R>, + R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release +builds.
§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Selfwhere + Self: Deref<Target = T>, + T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release +builds.
§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release +builds.
source§

impl<T> ToOwned for Twhere + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
§

impl<T> TryConv for T

§

fn try_conv<T>(self) -> Result<T, Self::Error>where + Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

impl<T> Ungil for Twhere + T: Send,

\ No newline at end of file diff --git a/docs/apidocs/chiquito/frontend/dsl/lb/struct.LookupTableStore.html b/docs/apidocs/chiquito/frontend/dsl/lb/struct.LookupTableStore.html new file mode 100644 index 00000000..3f71d489 --- /dev/null +++ b/docs/apidocs/chiquito/frontend/dsl/lb/struct.LookupTableStore.html @@ -0,0 +1,103 @@ +LookupTableStore in chiquito::frontend::dsl::lb - Rust
pub struct LookupTableStore<F> { /* private fields */ }

Implementations§

source§

impl<F> LookupTableStore<F>

source

pub fn add<E: Into<ASTExpr<F>>>(self, expr: E) -> Self

source

pub fn uuid(&self) -> u128

Trait Implementations§

source§

impl<F: Clone> Clone for LookupTableStore<F>

source§

fn clone(&self) -> LookupTableStore<F>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<F: Debug> Debug for LookupTableStore<F>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<F> Default for LookupTableStore<F>

source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl<F> RefUnwindSafe for LookupTableStore<F>where + F: RefUnwindSafe,

§

impl<F> Send for LookupTableStore<F>where + F: Send,

§

impl<F> Sync for LookupTableStore<F>where + F: Sync,

§

impl<F> Unpin for LookupTableStore<F>where + F: Unpin,

§

impl<F> UnwindSafe for LookupTableStore<F>where + F: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for Twhere + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Conv for T

§

fn conv<T>(self) -> Twhere + Self: Into<T>,

Converts self into T using Into<T>. Read more
§

impl<T> FmtForward for T

§

fn fmt_binary(self) -> FmtBinary<Self>where + Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
§

fn fmt_display(self) -> FmtDisplay<Self>where + Self: Display,

Causes self to use its Display implementation when +Debug-formatted.
§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>where + Self: LowerExp,

Causes self to use its LowerExp implementation when +Debug-formatted.
§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>where + Self: LowerHex,

Causes self to use its LowerHex implementation when +Debug-formatted.
§

fn fmt_octal(self) -> FmtOctal<Self>where + Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
§

fn fmt_pointer(self) -> FmtPointer<Self>where + Self: Pointer,

Causes self to use its Pointer implementation when +Debug-formatted.
§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>where + Self: UpperExp,

Causes self to use its UpperExp implementation when +Debug-formatted.
§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>where + Self: UpperHex,

Causes self to use its UpperHex implementation when +Debug-formatted.
§

fn fmt_list(self) -> FmtList<Self>where + &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
§

impl<T> Pipe for Twhere + T: ?Sized,

§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere + Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere + R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere + R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> Rwhere + Self: Borrow<B>, + B: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
§

fn pipe_borrow_mut<'a, B, R>( + &'a mut self, + func: impl FnOnce(&'a mut B) -> R +) -> Rwhere + Self: BorrowMut<B>, + B: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe +function. Read more
§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> Rwhere + Self: AsRef<U>, + U: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> Rwhere + Self: AsMut<U>, + U: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe +function.
§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> Rwhere + Self: Deref<Target = T>, + T: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.deref() into the pipe function.
§

fn pipe_deref_mut<'a, T, R>( + &'a mut self, + func: impl FnOnce(&'a mut T) -> R +) -> Rwhere + Self: DerefMut<Target = T> + Deref, + T: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe +function.
§

impl<T> Pointable for T

§

const ALIGN: usize = mem::align_of::<T>()

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
§

impl<T> Tap for T

§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Selfwhere + Self: Borrow<B>, + B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere + Self: BorrowMut<B>, + B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Selfwhere + Self: AsRef<R>, + R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere + Self: AsMut<R>, + R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Selfwhere + Self: Deref<Target = T>, + T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Selfwhere + Self: Borrow<B>, + B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere + Self: BorrowMut<B>, + B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release +builds.
§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Selfwhere + Self: AsRef<R>, + R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release +builds.
§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere + Self: AsMut<R>, + R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release +builds.
§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Selfwhere + Self: Deref<Target = T>, + T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release +builds.
§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release +builds.
source§

impl<T> ToOwned for Twhere + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
§

impl<T> TryConv for T

§

fn try_conv<T>(self) -> Result<T, Self::Error>where + Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

impl<T> Ungil for Twhere + T: Send,

\ No newline at end of file diff --git a/docs/apidocs/chiquito/frontend/dsl/lb/trait.LookupBuilder.html b/docs/apidocs/chiquito/frontend/dsl/lb/trait.LookupBuilder.html new file mode 100644 index 00000000..432e2dfa --- /dev/null +++ b/docs/apidocs/chiquito/frontend/dsl/lb/trait.LookupBuilder.html @@ -0,0 +1,4 @@ +LookupBuilder in chiquito::frontend::dsl::lb - Rust
pub trait LookupBuilder<F> {
+    // Required method
+    fn build(self, ctx: &StepTypeSetupContext<'_, F>) -> Lookup<F>;
+}

Required Methods§

source

fn build(self, ctx: &StepTypeSetupContext<'_, F>) -> Lookup<F>

Implementors§

\ No newline at end of file diff --git a/docs/apidocs/chiquito/frontend/dsl/sc/fn.super_circuit.html b/docs/apidocs/chiquito/frontend/dsl/sc/fn.super_circuit.html new file mode 100644 index 00000000..65c3cb7b --- /dev/null +++ b/docs/apidocs/chiquito/frontend/dsl/sc/fn.super_circuit.html @@ -0,0 +1,5 @@ +super_circuit in chiquito::frontend::dsl::sc - Rust
pub fn super_circuit<F: Field + Hash, MappingArgs, D>(
+    _name: &str,
+    def: D
+) -> SuperCircuit<F, MappingArgs>where
+    D: Fn(&mut SuperCircuitContext<F, MappingArgs>),
\ No newline at end of file diff --git a/docs/apidocs/chiquito/frontend/dsl/sc/index.html b/docs/apidocs/chiquito/frontend/dsl/sc/index.html new file mode 100644 index 00000000..34b865c5 --- /dev/null +++ b/docs/apidocs/chiquito/frontend/dsl/sc/index.html @@ -0,0 +1 @@ +chiquito::frontend::dsl::sc - Rust

Module chiquito::frontend::dsl::sc

source ·

Structs

Functions

\ No newline at end of file diff --git a/docs/apidocs/chiquito/frontend/dsl/sc/sidebar-items.js b/docs/apidocs/chiquito/frontend/dsl/sc/sidebar-items.js new file mode 100644 index 00000000..f2a84fee --- /dev/null +++ b/docs/apidocs/chiquito/frontend/dsl/sc/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"fn":["super_circuit"],"struct":["SuperCircuitContext"]}; \ No newline at end of file diff --git a/docs/apidocs/chiquito/frontend/dsl/sc/struct.SuperCircuitContext.html b/docs/apidocs/chiquito/frontend/dsl/sc/struct.SuperCircuitContext.html new file mode 100644 index 00000000..284288ca --- /dev/null +++ b/docs/apidocs/chiquito/frontend/dsl/sc/struct.SuperCircuitContext.html @@ -0,0 +1,113 @@ +SuperCircuitContext in chiquito::frontend::dsl::sc - Rust
pub struct SuperCircuitContext<F, MappingArgs> {
+    pub tables: LookupTableRegistry<F>,
+    /* private fields */
+}

Fields§

§tables: LookupTableRegistry<F>

Implementations§

source§

impl<F: Field + Hash, MappingArgs> SuperCircuitContext<F, MappingArgs>

source

pub fn sub_circuit<CM: CellManager, SSB: StepSelectorBuilder, TraceArgs, Imports, Exports, D>( + &mut self, + config: CompilerConfig<CM, SSB>, + sub_circuit_def: D, + imports: Imports +) -> (AssignmentGenerator<F, TraceArgs>, Exports)where + D: Fn(&mut CircuitContext<F, TraceArgs>, Imports) -> Exports,

source

pub fn sub_circuit_with_ast<CM: CellManager, SSB: StepSelectorBuilder, TraceArgs>( + &mut self, + config: CompilerConfig<CM, SSB>, + sub_circuit: Circuit<F, TraceArgs> +) -> AssignmentGenerator<F, TraceArgs>

source

pub fn mapping<D: Fn(&mut MappingContext<F>, MappingArgs) + 'static>( + &mut self, + def: D +)

source

pub fn compile(self) -> SuperCircuit<F, MappingArgs>

Trait Implementations§

source§

impl<F, MappingArgs> Default for SuperCircuitContext<F, MappingArgs>

source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl<F, MappingArgs> !RefUnwindSafe for SuperCircuitContext<F, MappingArgs>

§

impl<F, MappingArgs> !Send for SuperCircuitContext<F, MappingArgs>

§

impl<F, MappingArgs> !Sync for SuperCircuitContext<F, MappingArgs>

§

impl<F, MappingArgs> Unpin for SuperCircuitContext<F, MappingArgs>where + F: Unpin,

§

impl<F, MappingArgs> !UnwindSafe for SuperCircuitContext<F, MappingArgs>

Blanket Implementations§

source§

impl<T> Any for Twhere + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Conv for T

§

fn conv<T>(self) -> Twhere + Self: Into<T>,

Converts self into T using Into<T>. Read more
§

impl<T> FmtForward for T

§

fn fmt_binary(self) -> FmtBinary<Self>where + Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
§

fn fmt_display(self) -> FmtDisplay<Self>where + Self: Display,

Causes self to use its Display implementation when +Debug-formatted.
§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>where + Self: LowerExp,

Causes self to use its LowerExp implementation when +Debug-formatted.
§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>where + Self: LowerHex,

Causes self to use its LowerHex implementation when +Debug-formatted.
§

fn fmt_octal(self) -> FmtOctal<Self>where + Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
§

fn fmt_pointer(self) -> FmtPointer<Self>where + Self: Pointer,

Causes self to use its Pointer implementation when +Debug-formatted.
§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>where + Self: UpperExp,

Causes self to use its UpperExp implementation when +Debug-formatted.
§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>where + Self: UpperHex,

Causes self to use its UpperHex implementation when +Debug-formatted.
§

fn fmt_list(self) -> FmtList<Self>where + &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
§

impl<T> Pipe for Twhere + T: ?Sized,

§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere + Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere + R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere + R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> Rwhere + Self: Borrow<B>, + B: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
§

fn pipe_borrow_mut<'a, B, R>( + &'a mut self, + func: impl FnOnce(&'a mut B) -> R +) -> Rwhere + Self: BorrowMut<B>, + B: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe +function. Read more
§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> Rwhere + Self: AsRef<U>, + U: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> Rwhere + Self: AsMut<U>, + U: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe +function.
§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> Rwhere + Self: Deref<Target = T>, + T: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.deref() into the pipe function.
§

fn pipe_deref_mut<'a, T, R>( + &'a mut self, + func: impl FnOnce(&'a mut T) -> R +) -> Rwhere + Self: DerefMut<Target = T> + Deref, + T: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe +function.
§

impl<T> Pointable for T

§

const ALIGN: usize = mem::align_of::<T>()

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
§

impl<T> Tap for T

§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Selfwhere + Self: Borrow<B>, + B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere + Self: BorrowMut<B>, + B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Selfwhere + Self: AsRef<R>, + R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere + Self: AsMut<R>, + R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Selfwhere + Self: Deref<Target = T>, + T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Selfwhere + Self: Borrow<B>, + B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere + Self: BorrowMut<B>, + B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release +builds.
§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Selfwhere + Self: AsRef<R>, + R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release +builds.
§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere + Self: AsMut<R>, + R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release +builds.
§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Selfwhere + Self: Deref<Target = T>, + T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release +builds.
§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release +builds.
§

impl<T> TryConv for T

§

fn try_conv<T>(self) -> Result<T, Self::Error>where + Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/docs/apidocs/chiquito/frontend/dsl/sidebar-items.js b/docs/apidocs/chiquito/frontend/dsl/sidebar-items.js new file mode 100644 index 00000000..346177e5 --- /dev/null +++ b/docs/apidocs/chiquito/frontend/dsl/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"enum":["StepTypeDefInput"],"fn":["circuit"],"mod":["cb","lb","sc"],"struct":["CircuitContext","StepTypeContext","StepTypeHandler","StepTypeSetupContext","StepTypeWGHandler"]}; \ No newline at end of file diff --git a/docs/apidocs/chiquito/frontend/dsl/struct.CircuitContext.html b/docs/apidocs/chiquito/frontend/dsl/struct.CircuitContext.html new file mode 100644 index 00000000..552fea1c --- /dev/null +++ b/docs/apidocs/chiquito/frontend/dsl/struct.CircuitContext.html @@ -0,0 +1,151 @@ +CircuitContext in chiquito::frontend::dsl - Rust
pub struct CircuitContext<F, TraceArgs> { /* private fields */ }
Expand description

A generic structure designed to handle the context of a circuit for generic types F, +TraceArgs and StepArgs. The struct contains a Circuit instance and implements +methods to build the circuit, add various components, and manipulate the circuit. F is a +generic type representing the field of the circuit. TraceArgs is a generic type +representing the arguments passed to the trace function. StepArgs is a generic type +representing the arguments passed to the step_type_def function.

+

Implementations§

source§

impl<F, TraceArgs> CircuitContext<F, TraceArgs>

source

pub fn forward(&mut self, name: &str) -> Queriable<F>

Adds a forward signal to the circuit with a name string and zero rotation and returns a +Queriable instance representing the added forward signal.

+
source

pub fn forward_with_phase(&mut self, name: &str, phase: usize) -> Queriable<F>

Adds a forward signal to the circuit with a name string and a specified phase and returns a +Queriable instance representing the added forward signal.

+
source

pub fn shared(&mut self, name: &str) -> Queriable<F>

Adds a shared signal to the circuit with a name string and zero rotation and returns a +Queriable instance representing the added shared signal.

+
source

pub fn shared_with_phase(&mut self, name: &str, phase: usize) -> Queriable<F>

Adds a shared signal to the circuit with a name string and a specified phase and returns a +Queriable instance representing the added shared signal.

+
source

pub fn fixed(&mut self, name: &str) -> Queriable<F>

source

pub fn expose(&mut self, queriable: Queriable<F>, offset: ExposeOffset)

Exposes the first step instance value of a forward signal as public.

+
source

pub fn import_halo2_advice( + &mut self, + name: &str, + column: Halo2Column<Advice> +) -> Queriable<F>

Imports a halo2 advice column with a name string into the circuit and returns a +Queriable instance representing the imported column.

+
source

pub fn import_halo2_fixed( + &mut self, + name: &str, + column: Halo2Column<Fixed> +) -> Queriable<F>

Imports a halo2 fixed column with a name string into the circuit and returns a +Queriable instance representing the imported column.

+
source

pub fn step_type(&mut self, name: &str) -> StepTypeHandler

Adds a new step type with the specified name to the circuit and returns a +StepTypeHandler instance. The StepTypeHandler instance can be used to define the +step type using the step_type_def function.

+
source

pub fn step_type_def<D, Args, S: Into<StepTypeDefInput>, R>( + &mut self, + step: S, + def: D +) -> StepTypeWGHandler<F, Args, R>where + D: FnOnce(&mut StepTypeContext<F>) -> StepTypeWGHandler<F, Args, R>, + R: Fn(&mut StepInstance<F>, Args) + 'static,

Defines a step type using the provided StepTypeHandler and a function that takes a +mutable reference to a StepTypeContext. This function typically adds constraints to a +step type and defines witness generation.

+
source

pub fn trace<D>(&mut self, def: D)where + D: Fn(&mut TraceContext<F>, TraceArgs) + 'static,

Sets the trace function that builds the witness. The trace function is responsible for +adding step instances defined in step_type_def. The function is entirely left for +the user to implement and is Turing complete. Users typically use external parameters +of type TraceArgs to generate cell values for witness generation, and call the +add function to add step instances with witness values.

+
source

pub fn new_table(&self, table: LookupTableStore<F>) -> LookupTable

source

pub fn pragma_first_step<STH: Into<StepTypeHandler>>(&mut self, step_type: STH)

Enforce the type of the first step by adding a constraint to the circuit. Takes a +StepTypeHandler parameter that represents the step type.

+
source

pub fn pragma_last_step<STH: Into<StepTypeHandler>>(&mut self, step_type: STH)

Enforce the type of the last step by adding a constraint to the circuit. Takes a +StepTypeHandler parameter that represents the step type.

+
source

pub fn pragma_num_steps(&mut self, num_steps: usize)

source

pub fn pragma_disable_q_enable(&mut self)

source§

impl<F: Field + Hash, TraceArgs> CircuitContext<F, TraceArgs>

source

pub fn fixed_gen<D>(&mut self, def: D)where + D: Fn(&mut FixedGenContext<F>) + 'static,

Executes the fixed generation function provided by the user and sets the fixed assignments +for the circuit. The fixed generation function is responsible for assigning fixed values to +fixed columns. It is entirely left for the user to implement and is Turing complete. Users +typically generate cell values and call the assign function to fill the fixed columns.

+

Trait Implementations§

source§

impl<F: Debug, TraceArgs: Debug> Debug for CircuitContext<F, TraceArgs>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<F, TraceArgs> !RefUnwindSafe for CircuitContext<F, TraceArgs>

§

impl<F, TraceArgs> !Send for CircuitContext<F, TraceArgs>

§

impl<F, TraceArgs> !Sync for CircuitContext<F, TraceArgs>

§

impl<F, TraceArgs> Unpin for CircuitContext<F, TraceArgs>where + F: Unpin,

§

impl<F, TraceArgs> !UnwindSafe for CircuitContext<F, TraceArgs>

Blanket Implementations§

source§

impl<T> Any for Twhere + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Conv for T

§

fn conv<T>(self) -> Twhere + Self: Into<T>,

Converts self into T using Into<T>. Read more
§

impl<T> FmtForward for T

§

fn fmt_binary(self) -> FmtBinary<Self>where + Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
§

fn fmt_display(self) -> FmtDisplay<Self>where + Self: Display,

Causes self to use its Display implementation when +Debug-formatted.
§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>where + Self: LowerExp,

Causes self to use its LowerExp implementation when +Debug-formatted.
§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>where + Self: LowerHex,

Causes self to use its LowerHex implementation when +Debug-formatted.
§

fn fmt_octal(self) -> FmtOctal<Self>where + Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
§

fn fmt_pointer(self) -> FmtPointer<Self>where + Self: Pointer,

Causes self to use its Pointer implementation when +Debug-formatted.
§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>where + Self: UpperExp,

Causes self to use its UpperExp implementation when +Debug-formatted.
§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>where + Self: UpperHex,

Causes self to use its UpperHex implementation when +Debug-formatted.
§

fn fmt_list(self) -> FmtList<Self>where + &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
§

impl<T> Pipe for Twhere + T: ?Sized,

§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere + Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere + R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere + R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> Rwhere + Self: Borrow<B>, + B: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
§

fn pipe_borrow_mut<'a, B, R>( + &'a mut self, + func: impl FnOnce(&'a mut B) -> R +) -> Rwhere + Self: BorrowMut<B>, + B: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe +function. Read more
§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> Rwhere + Self: AsRef<U>, + U: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> Rwhere + Self: AsMut<U>, + U: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe +function.
§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> Rwhere + Self: Deref<Target = T>, + T: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.deref() into the pipe function.
§

fn pipe_deref_mut<'a, T, R>( + &'a mut self, + func: impl FnOnce(&'a mut T) -> R +) -> Rwhere + Self: DerefMut<Target = T> + Deref, + T: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe +function.
§

impl<T> Pointable for T

§

const ALIGN: usize = mem::align_of::<T>()

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
§

impl<T> Tap for T

§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Selfwhere + Self: Borrow<B>, + B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere + Self: BorrowMut<B>, + B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Selfwhere + Self: AsRef<R>, + R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere + Self: AsMut<R>, + R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Selfwhere + Self: Deref<Target = T>, + T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Selfwhere + Self: Borrow<B>, + B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere + Self: BorrowMut<B>, + B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release +builds.
§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Selfwhere + Self: AsRef<R>, + R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release +builds.
§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere + Self: AsMut<R>, + R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release +builds.
§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Selfwhere + Self: Deref<Target = T>, + T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release +builds.
§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release +builds.
§

impl<T> TryConv for T

§

fn try_conv<T>(self) -> Result<T, Self::Error>where + Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/docs/apidocs/chiquito/frontend/dsl/struct.StepTypeContext.html b/docs/apidocs/chiquito/frontend/dsl/struct.StepTypeContext.html new file mode 100644 index 00000000..67e2373e --- /dev/null +++ b/docs/apidocs/chiquito/frontend/dsl/struct.StepTypeContext.html @@ -0,0 +1,113 @@ +StepTypeContext in chiquito::frontend::dsl - Rust
pub struct StepTypeContext<F> { /* private fields */ }
Expand description

A generic structure designed to handle the context of a step type definition. The struct +contains a StepType instance and implements methods to build the step type, add components, +and manipulate the step type. F is a generic type representing the field of the step type. +Args is the type of the step instance witness generation arguments.

+

Implementations§

source§

impl<F> StepTypeContext<F>

source

pub fn new(uuid: u128, name: String, tables: LookupTableRegistry<F>) -> Self

source

pub fn internal(&mut self, name: &str) -> Queriable<F>

Adds an internal signal to the step type with the given name and returns a Queriable +instance representing the added signal.

+
source

pub fn constr<C: Into<Constraint<F>>>(&mut self, constraint: C)

DEPRECATED

+
source

pub fn transition<C: Into<Constraint<F>>>(&mut self, constraint: C)

DEPRECATED

+
source

pub fn setup<D>(&mut self, def: D)where + D: Fn(&mut StepTypeSetupContext<'_, F>),

Define step constraints.

+
source

pub fn wg<Args, D>(&mut self, def: D) -> StepTypeWGHandler<F, Args, D>where + D: Fn(&mut StepInstance<F>, Args) + 'static,

Auto Trait Implementations§

§

impl<F> RefUnwindSafe for StepTypeContext<F>where + F: RefUnwindSafe,

§

impl<F> Send for StepTypeContext<F>where + F: Send,

§

impl<F> Sync for StepTypeContext<F>where + F: Send + Sync,

§

impl<F> Unpin for StepTypeContext<F>where + F: Unpin,

§

impl<F> UnwindSafe for StepTypeContext<F>where + F: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for Twhere + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Conv for T

§

fn conv<T>(self) -> Twhere + Self: Into<T>,

Converts self into T using Into<T>. Read more
§

impl<T> FmtForward for T

§

fn fmt_binary(self) -> FmtBinary<Self>where + Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
§

fn fmt_display(self) -> FmtDisplay<Self>where + Self: Display,

Causes self to use its Display implementation when +Debug-formatted.
§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>where + Self: LowerExp,

Causes self to use its LowerExp implementation when +Debug-formatted.
§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>where + Self: LowerHex,

Causes self to use its LowerHex implementation when +Debug-formatted.
§

fn fmt_octal(self) -> FmtOctal<Self>where + Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
§

fn fmt_pointer(self) -> FmtPointer<Self>where + Self: Pointer,

Causes self to use its Pointer implementation when +Debug-formatted.
§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>where + Self: UpperExp,

Causes self to use its UpperExp implementation when +Debug-formatted.
§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>where + Self: UpperHex,

Causes self to use its UpperHex implementation when +Debug-formatted.
§

fn fmt_list(self) -> FmtList<Self>where + &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
§

impl<T> Pipe for Twhere + T: ?Sized,

§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere + Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere + R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere + R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> Rwhere + Self: Borrow<B>, + B: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
§

fn pipe_borrow_mut<'a, B, R>( + &'a mut self, + func: impl FnOnce(&'a mut B) -> R +) -> Rwhere + Self: BorrowMut<B>, + B: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe +function. Read more
§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> Rwhere + Self: AsRef<U>, + U: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> Rwhere + Self: AsMut<U>, + U: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe +function.
§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> Rwhere + Self: Deref<Target = T>, + T: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.deref() into the pipe function.
§

fn pipe_deref_mut<'a, T, R>( + &'a mut self, + func: impl FnOnce(&'a mut T) -> R +) -> Rwhere + Self: DerefMut<Target = T> + Deref, + T: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe +function.
§

impl<T> Pointable for T

§

const ALIGN: usize = mem::align_of::<T>()

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
§

impl<T> Tap for T

§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Selfwhere + Self: Borrow<B>, + B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere + Self: BorrowMut<B>, + B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Selfwhere + Self: AsRef<R>, + R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere + Self: AsMut<R>, + R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Selfwhere + Self: Deref<Target = T>, + T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Selfwhere + Self: Borrow<B>, + B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere + Self: BorrowMut<B>, + B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release +builds.
§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Selfwhere + Self: AsRef<R>, + R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release +builds.
§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere + Self: AsMut<R>, + R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release +builds.
§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Selfwhere + Self: Deref<Target = T>, + T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release +builds.
§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release +builds.
§

impl<T> TryConv for T

§

fn try_conv<T>(self) -> Result<T, Self::Error>where + Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

impl<T> Ungil for Twhere + T: Send,

\ No newline at end of file diff --git a/docs/apidocs/chiquito/frontend/dsl/struct.StepTypeHandler.html b/docs/apidocs/chiquito/frontend/dsl/struct.StepTypeHandler.html new file mode 100644 index 00000000..5fb47be5 --- /dev/null +++ b/docs/apidocs/chiquito/frontend/dsl/struct.StepTypeHandler.html @@ -0,0 +1,107 @@ +StepTypeHandler in chiquito::frontend::dsl - Rust
pub struct StepTypeHandler {
+    pub annotation: &'static str,
+    /* private fields */
+}

Fields§

§annotation: &'static str

Implementations§

source§

impl StepTypeHandler

source

pub fn new_with_id(id: u128, annotation: String) -> Self

source

pub fn uuid(&self) -> u128

source

pub fn next<F>(&self) -> Queriable<F>

Trait Implementations§

source§

impl Clone for StepTypeHandler

source§

fn clone(&self) -> StepTypeHandler

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for StepTypeHandler

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for StepTypeHandler

source§

fn deserialize<D>(deserializer: D) -> Result<StepTypeHandler, D::Error>where + D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl<F, Args, D: Fn(&mut StepInstance<F>, Args) + 'static> From<&StepTypeWGHandler<F, Args, D>> for StepTypeHandler

source§

fn from(h: &StepTypeWGHandler<F, Args, D>) -> Self

Converts to this type from the input type.
source§

impl From<StepTypeHandler> for StepTypeDefInput

source§

fn from(h: StepTypeHandler) -> Self

Converts to this type from the input type.
source§

impl Hash for StepTypeHandler

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)where + H: Hasher, + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl PartialEq<StepTypeHandler> for StepTypeHandler

source§

fn eq(&self, other: &StepTypeHandler) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Copy for StepTypeHandler

source§

impl Eq for StepTypeHandler

source§

impl StructuralEq for StepTypeHandler

source§

impl StructuralPartialEq for StepTypeHandler

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Conv for T

§

fn conv<T>(self) -> Twhere + Self: Into<T>,

Converts self into T using Into<T>. Read more
§

impl<T> FmtForward for T

§

fn fmt_binary(self) -> FmtBinary<Self>where + Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
§

fn fmt_display(self) -> FmtDisplay<Self>where + Self: Display,

Causes self to use its Display implementation when +Debug-formatted.
§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>where + Self: LowerExp,

Causes self to use its LowerExp implementation when +Debug-formatted.
§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>where + Self: LowerHex,

Causes self to use its LowerHex implementation when +Debug-formatted.
§

fn fmt_octal(self) -> FmtOctal<Self>where + Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
§

fn fmt_pointer(self) -> FmtPointer<Self>where + Self: Pointer,

Causes self to use its Pointer implementation when +Debug-formatted.
§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>where + Self: UpperExp,

Causes self to use its UpperExp implementation when +Debug-formatted.
§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>where + Self: UpperHex,

Causes self to use its UpperHex implementation when +Debug-formatted.
§

fn fmt_list(self) -> FmtList<Self>where + &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
§

impl<T> Pipe for Twhere + T: ?Sized,

§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere + Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere + R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere + R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> Rwhere + Self: Borrow<B>, + B: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
§

fn pipe_borrow_mut<'a, B, R>( + &'a mut self, + func: impl FnOnce(&'a mut B) -> R +) -> Rwhere + Self: BorrowMut<B>, + B: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe +function. Read more
§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> Rwhere + Self: AsRef<U>, + U: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> Rwhere + Self: AsMut<U>, + U: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe +function.
§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> Rwhere + Self: Deref<Target = T>, + T: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.deref() into the pipe function.
§

fn pipe_deref_mut<'a, T, R>( + &'a mut self, + func: impl FnOnce(&'a mut T) -> R +) -> Rwhere + Self: DerefMut<Target = T> + Deref, + T: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe +function.
§

impl<T> Pointable for T

§

const ALIGN: usize = mem::align_of::<T>()

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
§

impl<T> Tap for T

§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Selfwhere + Self: Borrow<B>, + B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere + Self: BorrowMut<B>, + B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Selfwhere + Self: AsRef<R>, + R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere + Self: AsMut<R>, + R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Selfwhere + Self: Deref<Target = T>, + T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Selfwhere + Self: Borrow<B>, + B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere + Self: BorrowMut<B>, + B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release +builds.
§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Selfwhere + Self: AsRef<R>, + R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release +builds.
§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere + Self: AsMut<R>, + R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release +builds.
§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Selfwhere + Self: Deref<Target = T>, + T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release +builds.
§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release +builds.
source§

impl<T> ToOwned for Twhere + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
§

impl<T> TryConv for T

§

fn try_conv<T>(self) -> Result<T, Self::Error>where + Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for Twhere + T: for<'de> Deserialize<'de>,

§

impl<T> Ungil for Twhere + T: Send,

\ No newline at end of file diff --git a/docs/apidocs/chiquito/frontend/dsl/struct.StepTypeSetupContext.html b/docs/apidocs/chiquito/frontend/dsl/struct.StepTypeSetupContext.html new file mode 100644 index 00000000..fc05578d --- /dev/null +++ b/docs/apidocs/chiquito/frontend/dsl/struct.StepTypeSetupContext.html @@ -0,0 +1,108 @@ +StepTypeSetupContext in chiquito::frontend::dsl - Rust
pub struct StepTypeSetupContext<'a, F> { /* private fields */ }

Implementations§

source§

impl<'a, F> StepTypeSetupContext<'a, F>

source

pub fn constr<C: Into<Constraint<F>>>(&mut self, constraint: C)

Adds a constraint to the step type. Involves internal signal(s) and forward signals without +SuperRotation only. Chiquito provides syntax sugar for defining complex constraints. +Refer to the cb (constraint builder) module for more information.

+
source

pub fn transition<C: Into<Constraint<F>>>(&mut self, constraint: C)

Adds a transition constraint to the step type. It’s the same as a regular constraint except +that it can involve forward signal(s) with SuperRotation as well. Chiquito provides syntax +sugar for defining complex constraints. Refer to the cb (constraint builder) module +for more information.

+
source§

impl<'a, F: Eq + PartialEq + Hash + Debug + Clone> StepTypeSetupContext<'a, F>

source

pub fn auto(&mut self, signal: Queriable<F>, expr: ASTExpr<F>)

source

pub fn auto_eq(&mut self, signal: Queriable<F>, expr: ASTExpr<F>)

source§

impl<'a, F: Debug + Clone> StepTypeSetupContext<'a, F>

source

pub fn add_lookup<LB: LookupBuilder<F>>(&mut self, lookup_builder: LB)

Adds a lookup to the step type.

+

Auto Trait Implementations§

§

impl<'a, F> RefUnwindSafe for StepTypeSetupContext<'a, F>where + F: RefUnwindSafe,

§

impl<'a, F> Send for StepTypeSetupContext<'a, F>where + F: Send,

§

impl<'a, F> Sync for StepTypeSetupContext<'a, F>where + F: Send + Sync,

§

impl<'a, F> Unpin for StepTypeSetupContext<'a, F>

§

impl<'a, F> !UnwindSafe for StepTypeSetupContext<'a, F>

Blanket Implementations§

source§

impl<T> Any for Twhere + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Conv for T

§

fn conv<T>(self) -> Twhere + Self: Into<T>,

Converts self into T using Into<T>. Read more
§

impl<T> FmtForward for T

§

fn fmt_binary(self) -> FmtBinary<Self>where + Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
§

fn fmt_display(self) -> FmtDisplay<Self>where + Self: Display,

Causes self to use its Display implementation when +Debug-formatted.
§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>where + Self: LowerExp,

Causes self to use its LowerExp implementation when +Debug-formatted.
§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>where + Self: LowerHex,

Causes self to use its LowerHex implementation when +Debug-formatted.
§

fn fmt_octal(self) -> FmtOctal<Self>where + Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
§

fn fmt_pointer(self) -> FmtPointer<Self>where + Self: Pointer,

Causes self to use its Pointer implementation when +Debug-formatted.
§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>where + Self: UpperExp,

Causes self to use its UpperExp implementation when +Debug-formatted.
§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>where + Self: UpperHex,

Causes self to use its UpperHex implementation when +Debug-formatted.
§

fn fmt_list(self) -> FmtList<Self>where + &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
§

impl<T> Pipe for Twhere + T: ?Sized,

§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere + Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere + R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere + R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> Rwhere + Self: Borrow<B>, + B: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
§

fn pipe_borrow_mut<'a, B, R>( + &'a mut self, + func: impl FnOnce(&'a mut B) -> R +) -> Rwhere + Self: BorrowMut<B>, + B: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe +function. Read more
§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> Rwhere + Self: AsRef<U>, + U: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> Rwhere + Self: AsMut<U>, + U: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe +function.
§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> Rwhere + Self: Deref<Target = T>, + T: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.deref() into the pipe function.
§

fn pipe_deref_mut<'a, T, R>( + &'a mut self, + func: impl FnOnce(&'a mut T) -> R +) -> Rwhere + Self: DerefMut<Target = T> + Deref, + T: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe +function.
§

impl<T> Pointable for T

§

const ALIGN: usize = mem::align_of::<T>()

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
§

impl<T> Tap for T

§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Selfwhere + Self: Borrow<B>, + B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere + Self: BorrowMut<B>, + B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Selfwhere + Self: AsRef<R>, + R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere + Self: AsMut<R>, + R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Selfwhere + Self: Deref<Target = T>, + T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Selfwhere + Self: Borrow<B>, + B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere + Self: BorrowMut<B>, + B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release +builds.
§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Selfwhere + Self: AsRef<R>, + R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release +builds.
§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere + Self: AsMut<R>, + R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release +builds.
§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Selfwhere + Self: Deref<Target = T>, + T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release +builds.
§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release +builds.
§

impl<T> TryConv for T

§

fn try_conv<T>(self) -> Result<T, Self::Error>where + Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

impl<T> Ungil for Twhere + T: Send,

\ No newline at end of file diff --git a/docs/apidocs/chiquito/frontend/dsl/struct.StepTypeWGHandler.html b/docs/apidocs/chiquito/frontend/dsl/struct.StepTypeWGHandler.html new file mode 100644 index 00000000..fe04af0c --- /dev/null +++ b/docs/apidocs/chiquito/frontend/dsl/struct.StepTypeWGHandler.html @@ -0,0 +1,115 @@ +StepTypeWGHandler in chiquito::frontend::dsl - Rust
pub struct StepTypeWGHandler<F, Args, D: Fn(&mut StepInstance<F>, Args) + 'static> {
+    pub annotation: &'static str,
+    pub wg: Box<D>,
+    /* private fields */
+}

Fields§

§annotation: &'static str§wg: Box<D>

Implementations§

source§

impl<F, Args, D: Fn(&mut StepInstance<F>, Args) + 'static> StepTypeWGHandler<F, Args, D>

source

pub fn new(id: u128, annotation: &'static str, wg: D) -> Self

source

pub fn uuid(&self) -> u128

Trait Implementations§

source§

impl<F, Args, D: Fn(&mut StepInstance<F>, Args) + 'static> From<&StepTypeWGHandler<F, Args, D>> for StepTypeHandler

source§

fn from(h: &StepTypeWGHandler<F, Args, D>) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

§

impl<F, Args, D> RefUnwindSafe for StepTypeWGHandler<F, Args, D>where + Args: RefUnwindSafe, + D: RefUnwindSafe, + F: RefUnwindSafe,

§

impl<F, Args, D> Send for StepTypeWGHandler<F, Args, D>where + Args: Send, + D: Send, + F: Send,

§

impl<F, Args, D> Sync for StepTypeWGHandler<F, Args, D>where + Args: Sync, + D: Sync, + F: Sync,

§

impl<F, Args, D> Unpin for StepTypeWGHandler<F, Args, D>where + Args: Unpin, + F: Unpin,

§

impl<F, Args, D> UnwindSafe for StepTypeWGHandler<F, Args, D>where + Args: UnwindSafe, + D: UnwindSafe, + F: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for Twhere + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Conv for T

§

fn conv<T>(self) -> Twhere + Self: Into<T>,

Converts self into T using Into<T>. Read more
§

impl<T> FmtForward for T

§

fn fmt_binary(self) -> FmtBinary<Self>where + Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
§

fn fmt_display(self) -> FmtDisplay<Self>where + Self: Display,

Causes self to use its Display implementation when +Debug-formatted.
§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>where + Self: LowerExp,

Causes self to use its LowerExp implementation when +Debug-formatted.
§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>where + Self: LowerHex,

Causes self to use its LowerHex implementation when +Debug-formatted.
§

fn fmt_octal(self) -> FmtOctal<Self>where + Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
§

fn fmt_pointer(self) -> FmtPointer<Self>where + Self: Pointer,

Causes self to use its Pointer implementation when +Debug-formatted.
§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>where + Self: UpperExp,

Causes self to use its UpperExp implementation when +Debug-formatted.
§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>where + Self: UpperHex,

Causes self to use its UpperHex implementation when +Debug-formatted.
§

fn fmt_list(self) -> FmtList<Self>where + &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
§

impl<T> Pipe for Twhere + T: ?Sized,

§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere + Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere + R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere + R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> Rwhere + Self: Borrow<B>, + B: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
§

fn pipe_borrow_mut<'a, B, R>( + &'a mut self, + func: impl FnOnce(&'a mut B) -> R +) -> Rwhere + Self: BorrowMut<B>, + B: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe +function. Read more
§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> Rwhere + Self: AsRef<U>, + U: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> Rwhere + Self: AsMut<U>, + U: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe +function.
§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> Rwhere + Self: Deref<Target = T>, + T: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.deref() into the pipe function.
§

fn pipe_deref_mut<'a, T, R>( + &'a mut self, + func: impl FnOnce(&'a mut T) -> R +) -> Rwhere + Self: DerefMut<Target = T> + Deref, + T: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe +function.
§

impl<T> Pointable for T

§

const ALIGN: usize = mem::align_of::<T>()

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
§

impl<T> Tap for T

§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Selfwhere + Self: Borrow<B>, + B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere + Self: BorrowMut<B>, + B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Selfwhere + Self: AsRef<R>, + R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere + Self: AsMut<R>, + R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Selfwhere + Self: Deref<Target = T>, + T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Selfwhere + Self: Borrow<B>, + B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere + Self: BorrowMut<B>, + B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release +builds.
§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Selfwhere + Self: AsRef<R>, + R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release +builds.
§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere + Self: AsMut<R>, + R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release +builds.
§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Selfwhere + Self: Deref<Target = T>, + T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release +builds.
§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release +builds.
§

impl<T> TryConv for T

§

fn try_conv<T>(self) -> Result<T, Self::Error>where + Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

impl<T> Ungil for Twhere + T: Send,

\ No newline at end of file diff --git a/docs/apidocs/chiquito/frontend/index.html b/docs/apidocs/chiquito/frontend/index.html new file mode 100644 index 00000000..0b54f277 --- /dev/null +++ b/docs/apidocs/chiquito/frontend/index.html @@ -0,0 +1 @@ +chiquito::frontend - Rust

Module chiquito::frontend

source ·

Modules

\ No newline at end of file diff --git a/docs/apidocs/chiquito/frontend/python/constant.CIRCUIT_MAP.html b/docs/apidocs/chiquito/frontend/python/constant.CIRCUIT_MAP.html new file mode 100644 index 00000000..36c63525 --- /dev/null +++ b/docs/apidocs/chiquito/frontend/python/constant.CIRCUIT_MAP.html @@ -0,0 +1 @@ +CIRCUIT_MAP in chiquito::frontend::python - Rust
pub const CIRCUIT_MAP: LocalKey<RefCell<HashMap<u128, (Circuit<Fr, ()>, ChiquitoHalo2<Fr>, Option<AssignmentGenerator<Fr, ()>>)>>>;
\ No newline at end of file diff --git a/docs/apidocs/chiquito/frontend/python/fn.chiquito_ast_map_store.html b/docs/apidocs/chiquito/frontend/python/fn.chiquito_ast_map_store.html new file mode 100644 index 00000000..3bb717c8 --- /dev/null +++ b/docs/apidocs/chiquito/frontend/python/fn.chiquito_ast_map_store.html @@ -0,0 +1 @@ +chiquito_ast_map_store in chiquito::frontend::python - Rust
pub fn chiquito_ast_map_store(ast_json: &str) -> u128
\ No newline at end of file diff --git a/docs/apidocs/chiquito/frontend/python/fn.chiquito_ast_to_halo2.html b/docs/apidocs/chiquito/frontend/python/fn.chiquito_ast_to_halo2.html new file mode 100644 index 00000000..3ae210da --- /dev/null +++ b/docs/apidocs/chiquito/frontend/python/fn.chiquito_ast_to_halo2.html @@ -0,0 +1,5 @@ +chiquito_ast_to_halo2 in chiquito::frontend::python - Rust
pub fn chiquito_ast_to_halo2(ast_json: &str) -> u128
Expand description

Parses JSON into ast::Circuit and compile. Generates a Rust UUID. Inserts tuple of +(ast::Circuit, ChiquitoHalo2, AssignmentGenerator, _) to CIRCUIT_MAP with the Rust UUID +as the key. Return the Rust UUID to Python. The last field of the tuple, TraceWitness, is left +as None, for chiquito_add_witness_to_rust_id to insert.

+
\ No newline at end of file diff --git a/docs/apidocs/chiquito/frontend/python/fn.chiquito_halo2_mock_prover.html b/docs/apidocs/chiquito/frontend/python/fn.chiquito_halo2_mock_prover.html new file mode 100644 index 00000000..e3b8e18e --- /dev/null +++ b/docs/apidocs/chiquito/frontend/python/fn.chiquito_halo2_mock_prover.html @@ -0,0 +1,3 @@ +chiquito_halo2_mock_prover in chiquito::frontend::python - Rust
pub fn chiquito_halo2_mock_prover(witness_json: &str, rust_id: u128, k: usize)
Expand description

Runs MockProver for a single circuit given JSON of TraceWitness and rust_id of the +circuit.

+
\ No newline at end of file diff --git a/docs/apidocs/chiquito/frontend/python/fn.chiquito_super_circuit_halo2_mock_prover.html b/docs/apidocs/chiquito/frontend/python/fn.chiquito_super_circuit_halo2_mock_prover.html new file mode 100644 index 00000000..a5a68078 --- /dev/null +++ b/docs/apidocs/chiquito/frontend/python/fn.chiquito_super_circuit_halo2_mock_prover.html @@ -0,0 +1,9 @@ +chiquito_super_circuit_halo2_mock_prover in chiquito::frontend::python - Rust
pub fn chiquito_super_circuit_halo2_mock_prover(
+    rust_ids: Vec<u128>,
+    super_witness: HashMap<u128, &str>,
+    k: usize
+)
Expand description

Compile a ChiquitoHalo2SuperCircuit object from a list of rust_ids, each corresponding to a +sub-circuit. The ChiquitoHalo2SuperCircuit object is then passed to MockProver for +verification. TraceWitness, if any, should have been inserted to each rust_id prior to +invoking this function.

+
\ No newline at end of file diff --git a/docs/apidocs/chiquito/frontend/python/index.html b/docs/apidocs/chiquito/frontend/python/index.html new file mode 100644 index 00000000..9c83e9f6 --- /dev/null +++ b/docs/apidocs/chiquito/frontend/python/index.html @@ -0,0 +1,8 @@ +chiquito::frontend::python - Rust

Module chiquito::frontend::python

source ·

Constants

Functions

  • Parses JSON into ast::Circuit and compile. Generates a Rust UUID. Inserts tuple of +(ast::Circuit, ChiquitoHalo2, AssignmentGenerator, _) to CIRCUIT_MAP with the Rust UUID +as the key. Return the Rust UUID to Python. The last field of the tuple, TraceWitness, is left +as None, for chiquito_add_witness_to_rust_id to insert.
  • Runs MockProver for a single circuit given JSON of TraceWitness and rust_id of the +circuit.
  • Compile a ChiquitoHalo2SuperCircuit object from a list of rust_ids, each corresponding to a +sub-circuit. The ChiquitoHalo2SuperCircuit object is then passed to MockProver for +verification. TraceWitness, if any, should have been inserted to each rust_id prior to +invoking this function.
\ No newline at end of file diff --git a/docs/apidocs/chiquito/frontend/python/sidebar-items.js b/docs/apidocs/chiquito/frontend/python/sidebar-items.js new file mode 100644 index 00000000..3a2f7233 --- /dev/null +++ b/docs/apidocs/chiquito/frontend/python/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"constant":["CIRCUIT_MAP"],"fn":["chiquito_ast_map_store","chiquito_ast_to_halo2","chiquito_halo2_mock_prover","chiquito_super_circuit_halo2_mock_prover"]}; \ No newline at end of file diff --git a/docs/apidocs/chiquito/frontend/sidebar-items.js b/docs/apidocs/chiquito/frontend/sidebar-items.js new file mode 100644 index 00000000..8094faa2 --- /dev/null +++ b/docs/apidocs/chiquito/frontend/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"mod":["dsl","python"]}; \ No newline at end of file diff --git a/docs/apidocs/chiquito/index.html b/docs/apidocs/chiquito/index.html new file mode 100644 index 00000000..c4f68e4e --- /dev/null +++ b/docs/apidocs/chiquito/index.html @@ -0,0 +1 @@ +chiquito - Rust

Crate chiquito

source ·

Modules

\ No newline at end of file diff --git a/docs/apidocs/chiquito/plonkish/backend/halo2/fn.chiquito2Halo2.html b/docs/apidocs/chiquito/plonkish/backend/halo2/fn.chiquito2Halo2.html new file mode 100644 index 00000000..e49e6bc6 --- /dev/null +++ b/docs/apidocs/chiquito/plonkish/backend/halo2/fn.chiquito2Halo2.html @@ -0,0 +1,3 @@ +chiquito2Halo2 in chiquito::plonkish::backend::halo2 - Rust
pub fn chiquito2Halo2<F: Field + From<u64> + Hash>(
+    circuit: Circuit<F>
+) -> ChiquitoHalo2<F>
\ No newline at end of file diff --git a/docs/apidocs/chiquito/plonkish/backend/halo2/fn.chiquitoSuperCircuit2Halo2.html b/docs/apidocs/chiquito/plonkish/backend/halo2/fn.chiquitoSuperCircuit2Halo2.html new file mode 100644 index 00000000..de280bab --- /dev/null +++ b/docs/apidocs/chiquito/plonkish/backend/halo2/fn.chiquitoSuperCircuit2Halo2.html @@ -0,0 +1,3 @@ +chiquitoSuperCircuit2Halo2 in chiquito::plonkish::backend::halo2 - Rust
pub fn chiquitoSuperCircuit2Halo2<F: Field + From<u64> + Hash, MappingArgs>(
+    super_circuit: &SuperCircuit<F, MappingArgs>
+) -> Vec<ChiquitoHalo2<F>>
\ No newline at end of file diff --git a/docs/apidocs/chiquito/plonkish/backend/halo2/fn.to_halo2_advice.html b/docs/apidocs/chiquito/plonkish/backend/halo2/fn.to_halo2_advice.html new file mode 100644 index 00000000..a92d3447 --- /dev/null +++ b/docs/apidocs/chiquito/plonkish/backend/halo2/fn.to_halo2_advice.html @@ -0,0 +1,4 @@ +to_halo2_advice in chiquito::plonkish::backend::halo2 - Rust
pub fn to_halo2_advice<F: Field>(
+    meta: &mut ConstraintSystem<F>,
+    column: &cColumn
+) -> Column<Advice>
\ No newline at end of file diff --git a/docs/apidocs/chiquito/plonkish/backend/halo2/index.html b/docs/apidocs/chiquito/plonkish/backend/halo2/index.html new file mode 100644 index 00000000..86f7d125 --- /dev/null +++ b/docs/apidocs/chiquito/plonkish/backend/halo2/index.html @@ -0,0 +1 @@ +chiquito::plonkish::backend::halo2 - Rust

Structs

Functions

\ No newline at end of file diff --git a/docs/apidocs/chiquito/plonkish/backend/halo2/sidebar-items.js b/docs/apidocs/chiquito/plonkish/backend/halo2/sidebar-items.js new file mode 100644 index 00000000..ba67f287 --- /dev/null +++ b/docs/apidocs/chiquito/plonkish/backend/halo2/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"fn":["chiquito2Halo2","chiquitoSuperCircuit2Halo2","to_halo2_advice"],"struct":["ChiquitoHalo2","ChiquitoHalo2Circuit","ChiquitoHalo2SuperCircuit"]}; \ No newline at end of file diff --git a/docs/apidocs/chiquito/plonkish/backend/halo2/struct.ChiquitoHalo2.html b/docs/apidocs/chiquito/plonkish/backend/halo2/struct.ChiquitoHalo2.html new file mode 100644 index 00000000..479005f9 --- /dev/null +++ b/docs/apidocs/chiquito/plonkish/backend/halo2/struct.ChiquitoHalo2.html @@ -0,0 +1,108 @@ +ChiquitoHalo2 in chiquito::plonkish::backend::halo2 - Rust
pub struct ChiquitoHalo2<F: Field + From<u64>> {
+    pub debug: bool,
+    /* private fields */
+}

Fields§

§debug: bool

Implementations§

source§

impl<F: Field + From<u64> + Hash> ChiquitoHalo2<F>

source

pub fn new(circuit: Circuit<F>) -> ChiquitoHalo2<F>

source

pub fn configure(&mut self, meta: &mut ConstraintSystem<F>)

source

pub fn configure_sub_circuit(&mut self, meta: &mut ConstraintSystem<F>)

source

pub fn synthesize( + &self, + layouter: &mut impl Layouter<F>, + witness: Option<&Assignments<F>> +)

Trait Implementations§

source§

impl<F: Clone + Field + From<u64>> Clone for ChiquitoHalo2<F>

source§

fn clone(&self) -> ChiquitoHalo2<F>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<F: Debug + Field + From<u64>> Debug for ChiquitoHalo2<F>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<F: Default + Field + From<u64>> Default for ChiquitoHalo2<F>

source§

fn default() -> ChiquitoHalo2<F>

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl<F> RefUnwindSafe for ChiquitoHalo2<F>where + F: RefUnwindSafe,

§

impl<F> Send for ChiquitoHalo2<F>

§

impl<F> Sync for ChiquitoHalo2<F>

§

impl<F> Unpin for ChiquitoHalo2<F>where + F: Unpin,

§

impl<F> UnwindSafe for ChiquitoHalo2<F>where + F: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for Twhere + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Conv for T

§

fn conv<T>(self) -> Twhere + Self: Into<T>,

Converts self into T using Into<T>. Read more
§

impl<T> FmtForward for T

§

fn fmt_binary(self) -> FmtBinary<Self>where + Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
§

fn fmt_display(self) -> FmtDisplay<Self>where + Self: Display,

Causes self to use its Display implementation when +Debug-formatted.
§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>where + Self: LowerExp,

Causes self to use its LowerExp implementation when +Debug-formatted.
§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>where + Self: LowerHex,

Causes self to use its LowerHex implementation when +Debug-formatted.
§

fn fmt_octal(self) -> FmtOctal<Self>where + Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
§

fn fmt_pointer(self) -> FmtPointer<Self>where + Self: Pointer,

Causes self to use its Pointer implementation when +Debug-formatted.
§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>where + Self: UpperExp,

Causes self to use its UpperExp implementation when +Debug-formatted.
§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>where + Self: UpperHex,

Causes self to use its UpperHex implementation when +Debug-formatted.
§

fn fmt_list(self) -> FmtList<Self>where + &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
§

impl<T> Pipe for Twhere + T: ?Sized,

§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere + Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere + R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere + R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> Rwhere + Self: Borrow<B>, + B: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
§

fn pipe_borrow_mut<'a, B, R>( + &'a mut self, + func: impl FnOnce(&'a mut B) -> R +) -> Rwhere + Self: BorrowMut<B>, + B: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe +function. Read more
§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> Rwhere + Self: AsRef<U>, + U: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> Rwhere + Self: AsMut<U>, + U: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe +function.
§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> Rwhere + Self: Deref<Target = T>, + T: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.deref() into the pipe function.
§

fn pipe_deref_mut<'a, T, R>( + &'a mut self, + func: impl FnOnce(&'a mut T) -> R +) -> Rwhere + Self: DerefMut<Target = T> + Deref, + T: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe +function.
§

impl<T> Pointable for T

§

const ALIGN: usize = mem::align_of::<T>()

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
§

impl<T> Tap for T

§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Selfwhere + Self: Borrow<B>, + B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere + Self: BorrowMut<B>, + B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Selfwhere + Self: AsRef<R>, + R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere + Self: AsMut<R>, + R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Selfwhere + Self: Deref<Target = T>, + T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Selfwhere + Self: Borrow<B>, + B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere + Self: BorrowMut<B>, + B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release +builds.
§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Selfwhere + Self: AsRef<R>, + R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release +builds.
§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere + Self: AsMut<R>, + R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release +builds.
§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Selfwhere + Self: Deref<Target = T>, + T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release +builds.
§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release +builds.
source§

impl<T> ToOwned for Twhere + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
§

impl<T> TryConv for T

§

fn try_conv<T>(self) -> Result<T, Self::Error>where + Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

impl<T> Ungil for Twhere + T: Send,

\ No newline at end of file diff --git a/docs/apidocs/chiquito/plonkish/backend/halo2/struct.ChiquitoHalo2Circuit.html b/docs/apidocs/chiquito/plonkish/backend/halo2/struct.ChiquitoHalo2Circuit.html new file mode 100644 index 00000000..3ce98fac --- /dev/null +++ b/docs/apidocs/chiquito/plonkish/backend/halo2/struct.ChiquitoHalo2Circuit.html @@ -0,0 +1,117 @@ +ChiquitoHalo2Circuit in chiquito::plonkish::backend::halo2 - Rust
pub struct ChiquitoHalo2Circuit<F: Field + From<u64>> { /* private fields */ }

Implementations§

source§

impl<F: Field + From<u64> + Hash> ChiquitoHalo2Circuit<F>

source

pub fn new(compiled: ChiquitoHalo2<F>, witness: Option<Assignments<F>>) -> Self

source

pub fn instance(&self) -> Vec<Vec<F>>

Trait Implementations§

source§

impl<F: Field + From<u64> + Hash> Circuit<F> for ChiquitoHalo2Circuit<F>

§

type Config = ChiquitoHalo2<F>

This is a configuration object that stores things like columns.
§

type FloorPlanner = SimpleFloorPlanner

The floor planner used for this circuit. This is an associated type of the +Circuit trait because its behaviour is circuit-critical.
§

type Params = ChiquitoHalo2<F>

Optional circuit configuration parameters. Requires the circuit-params feature.
source§

fn without_witnesses(&self) -> Self

Returns a copy of this circuit with no witness values (i.e. all witnesses set to +None). For most circuits, this will be equal to Self::default().
source§

fn params(&self) -> Self::Params

Returns a reference to the parameters that should be used to configure the circuit. +Requires the circuit-params feature.
source§

fn configure_with_params( + meta: &mut ConstraintSystem<F>, + compiled: Self::Params +) -> Self::Config

The circuit is given an opportunity to describe the exact gate +arrangement, column arrangement, etc. Takes a runtime parameter. The default +implementation calls configure ignoring the _params argument in order to easily support +circuits that don’t use configuration parameters.
source§

fn synthesize( + &self, + compiled: Self::Config, + layouter: impl Layouter<F> +) -> Result<(), Error>

Given the provided cs, synthesize the circuit. The concrete type of +the caller will be different depending on the context, and they may or +may not expect to have a witness present.
source§

fn configure(_: &mut ConstraintSystem<F>) -> Self::Config

The circuit is given an opportunity to describe the exact gate +arrangement, column arrangement, etc.
source§

impl<F: Clone + Field + From<u64>> Clone for ChiquitoHalo2Circuit<F>

source§

fn clone(&self) -> ChiquitoHalo2Circuit<F>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<F: Default + Field + From<u64>> Default for ChiquitoHalo2Circuit<F>

source§

fn default() -> ChiquitoHalo2Circuit<F>

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl<F> RefUnwindSafe for ChiquitoHalo2Circuit<F>where + F: RefUnwindSafe,

§

impl<F> Send for ChiquitoHalo2Circuit<F>

§

impl<F> Sync for ChiquitoHalo2Circuit<F>

§

impl<F> Unpin for ChiquitoHalo2Circuit<F>where + F: Unpin,

§

impl<F> UnwindSafe for ChiquitoHalo2Circuit<F>where + F: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for Twhere + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Conv for T

§

fn conv<T>(self) -> Twhere + Self: Into<T>,

Converts self into T using Into<T>. Read more
§

impl<T> FmtForward for T

§

fn fmt_binary(self) -> FmtBinary<Self>where + Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
§

fn fmt_display(self) -> FmtDisplay<Self>where + Self: Display,

Causes self to use its Display implementation when +Debug-formatted.
§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>where + Self: LowerExp,

Causes self to use its LowerExp implementation when +Debug-formatted.
§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>where + Self: LowerHex,

Causes self to use its LowerHex implementation when +Debug-formatted.
§

fn fmt_octal(self) -> FmtOctal<Self>where + Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
§

fn fmt_pointer(self) -> FmtPointer<Self>where + Self: Pointer,

Causes self to use its Pointer implementation when +Debug-formatted.
§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>where + Self: UpperExp,

Causes self to use its UpperExp implementation when +Debug-formatted.
§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>where + Self: UpperHex,

Causes self to use its UpperHex implementation when +Debug-formatted.
§

fn fmt_list(self) -> FmtList<Self>where + &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
§

impl<T> Pipe for Twhere + T: ?Sized,

§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere + Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere + R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere + R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> Rwhere + Self: Borrow<B>, + B: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
§

fn pipe_borrow_mut<'a, B, R>( + &'a mut self, + func: impl FnOnce(&'a mut B) -> R +) -> Rwhere + Self: BorrowMut<B>, + B: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe +function. Read more
§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> Rwhere + Self: AsRef<U>, + U: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> Rwhere + Self: AsMut<U>, + U: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe +function.
§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> Rwhere + Self: Deref<Target = T>, + T: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.deref() into the pipe function.
§

fn pipe_deref_mut<'a, T, R>( + &'a mut self, + func: impl FnOnce(&'a mut T) -> R +) -> Rwhere + Self: DerefMut<Target = T> + Deref, + T: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe +function.
§

impl<T> Pointable for T

§

const ALIGN: usize = mem::align_of::<T>()

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
§

impl<T> Tap for T

§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Selfwhere + Self: Borrow<B>, + B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere + Self: BorrowMut<B>, + B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Selfwhere + Self: AsRef<R>, + R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere + Self: AsMut<R>, + R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Selfwhere + Self: Deref<Target = T>, + T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Selfwhere + Self: Borrow<B>, + B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere + Self: BorrowMut<B>, + B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release +builds.
§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Selfwhere + Self: AsRef<R>, + R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release +builds.
§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere + Self: AsMut<R>, + R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release +builds.
§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Selfwhere + Self: Deref<Target = T>, + T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release +builds.
§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release +builds.
source§

impl<T> ToOwned for Twhere + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
§

impl<T> TryConv for T

§

fn try_conv<T>(self) -> Result<T, Self::Error>where + Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

impl<T> Ungil for Twhere + T: Send,

\ No newline at end of file diff --git a/docs/apidocs/chiquito/plonkish/backend/halo2/struct.ChiquitoHalo2SuperCircuit.html b/docs/apidocs/chiquito/plonkish/backend/halo2/struct.ChiquitoHalo2SuperCircuit.html new file mode 100644 index 00000000..57c445ad --- /dev/null +++ b/docs/apidocs/chiquito/plonkish/backend/halo2/struct.ChiquitoHalo2SuperCircuit.html @@ -0,0 +1,119 @@ +ChiquitoHalo2SuperCircuit in chiquito::plonkish::backend::halo2 - Rust
pub struct ChiquitoHalo2SuperCircuit<F: Field + From<u64>> { /* private fields */ }

Implementations§

source§

impl<F: Field + From<u64> + Hash> ChiquitoHalo2SuperCircuit<F>

source

pub fn new( + sub_circuits: Vec<ChiquitoHalo2<F>>, + witness: SuperAssignments<F> +) -> Self

source

pub fn instance(&self) -> Vec<Vec<F>>

Trait Implementations§

source§

impl<F: Field + From<u64> + Hash> Circuit<F> for ChiquitoHalo2SuperCircuit<F>

§

type Config = Vec<ChiquitoHalo2<F>, Global>

This is a configuration object that stores things like columns.
§

type FloorPlanner = SimpleFloorPlanner

The floor planner used for this circuit. This is an associated type of the +Circuit trait because its behaviour is circuit-critical.
§

type Params = Vec<ChiquitoHalo2<F>, Global>

Optional circuit configuration parameters. Requires the circuit-params feature.
source§

fn without_witnesses(&self) -> Self

Returns a copy of this circuit with no witness values (i.e. all witnesses set to +None). For most circuits, this will be equal to Self::default().
source§

fn params(&self) -> Self::Params

Returns a reference to the parameters that should be used to configure the circuit. +Requires the circuit-params feature.
source§

fn configure_with_params( + meta: &mut ConstraintSystem<F>, + sub_circuits: Self::Params +) -> Self::Config

The circuit is given an opportunity to describe the exact gate +arrangement, column arrangement, etc. Takes a runtime parameter. The default +implementation calls configure ignoring the _params argument in order to easily support +circuits that don’t use configuration parameters.
source§

fn synthesize( + &self, + sub_circuits: Self::Config, + layouter: impl Layouter<F> +) -> Result<(), Error>

Given the provided cs, synthesize the circuit. The concrete type of +the caller will be different depending on the context, and they may or +may not expect to have a witness present.
source§

fn configure(_: &mut ConstraintSystem<F>) -> Self::Config

The circuit is given an opportunity to describe the exact gate +arrangement, column arrangement, etc.
source§

impl<F: Debug + Field + From<u64>> Debug for ChiquitoHalo2SuperCircuit<F>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<F: Default + Field + From<u64>> Default for ChiquitoHalo2SuperCircuit<F>

source§

fn default() -> ChiquitoHalo2SuperCircuit<F>

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Conv for T

§

fn conv<T>(self) -> Twhere + Self: Into<T>,

Converts self into T using Into<T>. Read more
§

impl<T> FmtForward for T

§

fn fmt_binary(self) -> FmtBinary<Self>where + Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
§

fn fmt_display(self) -> FmtDisplay<Self>where + Self: Display,

Causes self to use its Display implementation when +Debug-formatted.
§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>where + Self: LowerExp,

Causes self to use its LowerExp implementation when +Debug-formatted.
§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>where + Self: LowerHex,

Causes self to use its LowerHex implementation when +Debug-formatted.
§

fn fmt_octal(self) -> FmtOctal<Self>where + Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
§

fn fmt_pointer(self) -> FmtPointer<Self>where + Self: Pointer,

Causes self to use its Pointer implementation when +Debug-formatted.
§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>where + Self: UpperExp,

Causes self to use its UpperExp implementation when +Debug-formatted.
§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>where + Self: UpperHex,

Causes self to use its UpperHex implementation when +Debug-formatted.
§

fn fmt_list(self) -> FmtList<Self>where + &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
§

impl<T> Pipe for Twhere + T: ?Sized,

§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere + Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere + R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere + R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> Rwhere + Self: Borrow<B>, + B: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
§

fn pipe_borrow_mut<'a, B, R>( + &'a mut self, + func: impl FnOnce(&'a mut B) -> R +) -> Rwhere + Self: BorrowMut<B>, + B: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe +function. Read more
§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> Rwhere + Self: AsRef<U>, + U: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> Rwhere + Self: AsMut<U>, + U: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe +function.
§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> Rwhere + Self: Deref<Target = T>, + T: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.deref() into the pipe function.
§

fn pipe_deref_mut<'a, T, R>( + &'a mut self, + func: impl FnOnce(&'a mut T) -> R +) -> Rwhere + Self: DerefMut<Target = T> + Deref, + T: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe +function.
§

impl<T> Pointable for T

§

const ALIGN: usize = mem::align_of::<T>()

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
§

impl<T> Tap for T

§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Selfwhere + Self: Borrow<B>, + B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere + Self: BorrowMut<B>, + B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Selfwhere + Self: AsRef<R>, + R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere + Self: AsMut<R>, + R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Selfwhere + Self: Deref<Target = T>, + T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Selfwhere + Self: Borrow<B>, + B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere + Self: BorrowMut<B>, + B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release +builds.
§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Selfwhere + Self: AsRef<R>, + R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release +builds.
§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere + Self: AsMut<R>, + R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release +builds.
§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Selfwhere + Self: Deref<Target = T>, + T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release +builds.
§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release +builds.
§

impl<T> TryConv for T

§

fn try_conv<T>(self) -> Result<T, Self::Error>where + Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

impl<T> Ungil for Twhere + T: Send,

\ No newline at end of file diff --git a/docs/apidocs/chiquito/plonkish/backend/index.html b/docs/apidocs/chiquito/plonkish/backend/index.html new file mode 100644 index 00000000..36a688fc --- /dev/null +++ b/docs/apidocs/chiquito/plonkish/backend/index.html @@ -0,0 +1 @@ +chiquito::plonkish::backend - Rust

Module chiquito::plonkish::backend

source ·

Modules

\ No newline at end of file diff --git a/docs/apidocs/chiquito/plonkish/backend/plaf/fn.chiquito2Plaf.html b/docs/apidocs/chiquito/plonkish/backend/plaf/fn.chiquito2Plaf.html new file mode 100644 index 00000000..fdea2d92 --- /dev/null +++ b/docs/apidocs/chiquito/plonkish/backend/plaf/fn.chiquito2Plaf.html @@ -0,0 +1,5 @@ +chiquito2Plaf in chiquito::plonkish::backend::plaf - Rust
pub fn chiquito2Plaf<F: PrimeField<Repr = [u8; 32]>>(
+    circuit: cCircuit<F>,
+    k: u32,
+    debug: bool
+) -> (Plaf, ChiquitoPlafWitGen)
\ No newline at end of file diff --git a/docs/apidocs/chiquito/plonkish/backend/plaf/index.html b/docs/apidocs/chiquito/plonkish/backend/plaf/index.html new file mode 100644 index 00000000..d205ccfd --- /dev/null +++ b/docs/apidocs/chiquito/plonkish/backend/plaf/index.html @@ -0,0 +1 @@ +chiquito::plonkish::backend::plaf - Rust

Module chiquito::plonkish::backend::plaf

source ·

Structs

Functions

\ No newline at end of file diff --git a/docs/apidocs/chiquito/plonkish/backend/plaf/sidebar-items.js b/docs/apidocs/chiquito/plonkish/backend/plaf/sidebar-items.js new file mode 100644 index 00000000..a25a58ce --- /dev/null +++ b/docs/apidocs/chiquito/plonkish/backend/plaf/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"fn":["chiquito2Plaf"],"struct":["ChiquitoPlaf","ChiquitoPlafWitGen"]}; \ No newline at end of file diff --git a/docs/apidocs/chiquito/plonkish/backend/plaf/struct.ChiquitoPlaf.html b/docs/apidocs/chiquito/plonkish/backend/plaf/struct.ChiquitoPlaf.html new file mode 100644 index 00000000..f9426253 --- /dev/null +++ b/docs/apidocs/chiquito/plonkish/backend/plaf/struct.ChiquitoPlaf.html @@ -0,0 +1,101 @@ +ChiquitoPlaf in chiquito::plonkish::backend::plaf - Rust
pub struct ChiquitoPlaf<F: PrimeField> { /* private fields */ }

Implementations§

source§

impl<F: PrimeField<Repr = [u8; 32]>> ChiquitoPlaf<F>

source

pub fn new(circuit: cCircuit<F>, debug: bool) -> ChiquitoPlaf<F>

source

pub fn get_plaf(&mut self, k: u32) -> Plaf

Trait Implementations§

source§

impl<F: Clone + PrimeField> Clone for ChiquitoPlaf<F>

source§

fn clone(&self) -> ChiquitoPlaf<F>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<F: Debug + PrimeField> Debug for ChiquitoPlaf<F>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<F> RefUnwindSafe for ChiquitoPlaf<F>where + F: RefUnwindSafe,

§

impl<F> Send for ChiquitoPlaf<F>

§

impl<F> Sync for ChiquitoPlaf<F>

§

impl<F> Unpin for ChiquitoPlaf<F>where + F: Unpin,

§

impl<F> UnwindSafe for ChiquitoPlaf<F>where + F: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for Twhere + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Conv for T

§

fn conv<T>(self) -> Twhere + Self: Into<T>,

Converts self into T using Into<T>. Read more
§

impl<T> FmtForward for T

§

fn fmt_binary(self) -> FmtBinary<Self>where + Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
§

fn fmt_display(self) -> FmtDisplay<Self>where + Self: Display,

Causes self to use its Display implementation when +Debug-formatted.
§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>where + Self: LowerExp,

Causes self to use its LowerExp implementation when +Debug-formatted.
§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>where + Self: LowerHex,

Causes self to use its LowerHex implementation when +Debug-formatted.
§

fn fmt_octal(self) -> FmtOctal<Self>where + Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
§

fn fmt_pointer(self) -> FmtPointer<Self>where + Self: Pointer,

Causes self to use its Pointer implementation when +Debug-formatted.
§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>where + Self: UpperExp,

Causes self to use its UpperExp implementation when +Debug-formatted.
§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>where + Self: UpperHex,

Causes self to use its UpperHex implementation when +Debug-formatted.
§

fn fmt_list(self) -> FmtList<Self>where + &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
§

impl<T> Pipe for Twhere + T: ?Sized,

§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere + Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere + R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere + R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> Rwhere + Self: Borrow<B>, + B: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
§

fn pipe_borrow_mut<'a, B, R>( + &'a mut self, + func: impl FnOnce(&'a mut B) -> R +) -> Rwhere + Self: BorrowMut<B>, + B: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe +function. Read more
§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> Rwhere + Self: AsRef<U>, + U: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> Rwhere + Self: AsMut<U>, + U: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe +function.
§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> Rwhere + Self: Deref<Target = T>, + T: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.deref() into the pipe function.
§

fn pipe_deref_mut<'a, T, R>( + &'a mut self, + func: impl FnOnce(&'a mut T) -> R +) -> Rwhere + Self: DerefMut<Target = T> + Deref, + T: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe +function.
§

impl<T> Pointable for T

§

const ALIGN: usize = mem::align_of::<T>()

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
§

impl<T> Tap for T

§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Selfwhere + Self: Borrow<B>, + B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere + Self: BorrowMut<B>, + B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Selfwhere + Self: AsRef<R>, + R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere + Self: AsMut<R>, + R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Selfwhere + Self: Deref<Target = T>, + T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Selfwhere + Self: Borrow<B>, + B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere + Self: BorrowMut<B>, + B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release +builds.
§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Selfwhere + Self: AsRef<R>, + R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release +builds.
§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere + Self: AsMut<R>, + R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release +builds.
§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Selfwhere + Self: Deref<Target = T>, + T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release +builds.
§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release +builds.
source§

impl<T> ToOwned for Twhere + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
§

impl<T> TryConv for T

§

fn try_conv<T>(self) -> Result<T, Self::Error>where + Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

impl<T> Ungil for Twhere + T: Send,

\ No newline at end of file diff --git a/docs/apidocs/chiquito/plonkish/backend/plaf/struct.ChiquitoPlafWitGen.html b/docs/apidocs/chiquito/plonkish/backend/plaf/struct.ChiquitoPlafWitGen.html new file mode 100644 index 00000000..6b9f5e1e --- /dev/null +++ b/docs/apidocs/chiquito/plonkish/backend/plaf/struct.ChiquitoPlafWitGen.html @@ -0,0 +1,100 @@ +ChiquitoPlafWitGen in chiquito::plonkish::backend::plaf - Rust
pub struct ChiquitoPlafWitGen { /* private fields */ }

Implementations§

source§

impl ChiquitoPlafWitGen

source

pub fn generate<F: PrimeField<Repr = [u8; 32]> + Hash>( + &self, + witness: Option<Assignments<F>> +) -> pWitness

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Conv for T

§

fn conv<T>(self) -> Twhere + Self: Into<T>,

Converts self into T using Into<T>. Read more
§

impl<T> FmtForward for T

§

fn fmt_binary(self) -> FmtBinary<Self>where + Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
§

fn fmt_display(self) -> FmtDisplay<Self>where + Self: Display,

Causes self to use its Display implementation when +Debug-formatted.
§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>where + Self: LowerExp,

Causes self to use its LowerExp implementation when +Debug-formatted.
§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>where + Self: LowerHex,

Causes self to use its LowerHex implementation when +Debug-formatted.
§

fn fmt_octal(self) -> FmtOctal<Self>where + Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
§

fn fmt_pointer(self) -> FmtPointer<Self>where + Self: Pointer,

Causes self to use its Pointer implementation when +Debug-formatted.
§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>where + Self: UpperExp,

Causes self to use its UpperExp implementation when +Debug-formatted.
§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>where + Self: UpperHex,

Causes self to use its UpperHex implementation when +Debug-formatted.
§

fn fmt_list(self) -> FmtList<Self>where + &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
§

impl<T> Pipe for Twhere + T: ?Sized,

§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere + Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere + R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere + R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> Rwhere + Self: Borrow<B>, + B: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
§

fn pipe_borrow_mut<'a, B, R>( + &'a mut self, + func: impl FnOnce(&'a mut B) -> R +) -> Rwhere + Self: BorrowMut<B>, + B: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe +function. Read more
§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> Rwhere + Self: AsRef<U>, + U: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> Rwhere + Self: AsMut<U>, + U: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe +function.
§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> Rwhere + Self: Deref<Target = T>, + T: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.deref() into the pipe function.
§

fn pipe_deref_mut<'a, T, R>( + &'a mut self, + func: impl FnOnce(&'a mut T) -> R +) -> Rwhere + Self: DerefMut<Target = T> + Deref, + T: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe +function.
§

impl<T> Pointable for T

§

const ALIGN: usize = mem::align_of::<T>()

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
§

impl<T> Tap for T

§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Selfwhere + Self: Borrow<B>, + B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere + Self: BorrowMut<B>, + B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Selfwhere + Self: AsRef<R>, + R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere + Self: AsMut<R>, + R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Selfwhere + Self: Deref<Target = T>, + T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Selfwhere + Self: Borrow<B>, + B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere + Self: BorrowMut<B>, + B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release +builds.
§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Selfwhere + Self: AsRef<R>, + R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release +builds.
§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere + Self: AsMut<R>, + R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release +builds.
§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Selfwhere + Self: Deref<Target = T>, + T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release +builds.
§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release +builds.
§

impl<T> TryConv for T

§

fn try_conv<T>(self) -> Result<T, Self::Error>where + Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

impl<T> Ungil for Twhere + T: Send,

\ No newline at end of file diff --git a/docs/apidocs/chiquito/plonkish/backend/sidebar-items.js b/docs/apidocs/chiquito/plonkish/backend/sidebar-items.js new file mode 100644 index 00000000..587b3419 --- /dev/null +++ b/docs/apidocs/chiquito/plonkish/backend/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"mod":["halo2","plaf"]}; \ No newline at end of file diff --git a/docs/apidocs/chiquito/plonkish/compiler/cell_manager/index.html b/docs/apidocs/chiquito/plonkish/compiler/cell_manager/index.html new file mode 100644 index 00000000..88061ffa --- /dev/null +++ b/docs/apidocs/chiquito/plonkish/compiler/cell_manager/index.html @@ -0,0 +1 @@ +chiquito::plonkish::compiler::cell_manager - Rust

Structs

Traits

\ No newline at end of file diff --git a/docs/apidocs/chiquito/plonkish/compiler/cell_manager/sidebar-items.js b/docs/apidocs/chiquito/plonkish/compiler/cell_manager/sidebar-items.js new file mode 100644 index 00000000..597ef562 --- /dev/null +++ b/docs/apidocs/chiquito/plonkish/compiler/cell_manager/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"struct":["MaxWidthCellManager","Placement","SignalPlacement","SingleRowCellManager","StepPlacement"],"trait":["CellManager"]}; \ No newline at end of file diff --git a/docs/apidocs/chiquito/plonkish/compiler/cell_manager/struct.MaxWidthCellManager.html b/docs/apidocs/chiquito/plonkish/compiler/cell_manager/struct.MaxWidthCellManager.html new file mode 100644 index 00000000..82898761 --- /dev/null +++ b/docs/apidocs/chiquito/plonkish/compiler/cell_manager/struct.MaxWidthCellManager.html @@ -0,0 +1,98 @@ +MaxWidthCellManager in chiquito::plonkish::compiler::cell_manager - Rust
pub struct MaxWidthCellManager { /* private fields */ }

Implementations§

source§

impl MaxWidthCellManager

source

pub fn new(max_width: usize, same_height: bool) -> Self

Trait Implementations§

source§

impl CellManager for MaxWidthCellManager

source§

fn place<F>(&self, unit: &mut CompilationUnit<F>)

source§

impl Clone for MaxWidthCellManager

source§

fn clone(&self) -> MaxWidthCellManager

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for MaxWidthCellManager

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for MaxWidthCellManager

source§

fn default() -> MaxWidthCellManager

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Conv for T

§

fn conv<T>(self) -> Twhere + Self: Into<T>,

Converts self into T using Into<T>. Read more
§

impl<T> FmtForward for T

§

fn fmt_binary(self) -> FmtBinary<Self>where + Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
§

fn fmt_display(self) -> FmtDisplay<Self>where + Self: Display,

Causes self to use its Display implementation when +Debug-formatted.
§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>where + Self: LowerExp,

Causes self to use its LowerExp implementation when +Debug-formatted.
§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>where + Self: LowerHex,

Causes self to use its LowerHex implementation when +Debug-formatted.
§

fn fmt_octal(self) -> FmtOctal<Self>where + Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
§

fn fmt_pointer(self) -> FmtPointer<Self>where + Self: Pointer,

Causes self to use its Pointer implementation when +Debug-formatted.
§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>where + Self: UpperExp,

Causes self to use its UpperExp implementation when +Debug-formatted.
§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>where + Self: UpperHex,

Causes self to use its UpperHex implementation when +Debug-formatted.
§

fn fmt_list(self) -> FmtList<Self>where + &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
§

impl<T> Pipe for Twhere + T: ?Sized,

§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere + Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere + R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere + R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> Rwhere + Self: Borrow<B>, + B: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
§

fn pipe_borrow_mut<'a, B, R>( + &'a mut self, + func: impl FnOnce(&'a mut B) -> R +) -> Rwhere + Self: BorrowMut<B>, + B: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe +function. Read more
§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> Rwhere + Self: AsRef<U>, + U: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> Rwhere + Self: AsMut<U>, + U: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe +function.
§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> Rwhere + Self: Deref<Target = T>, + T: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.deref() into the pipe function.
§

fn pipe_deref_mut<'a, T, R>( + &'a mut self, + func: impl FnOnce(&'a mut T) -> R +) -> Rwhere + Self: DerefMut<Target = T> + Deref, + T: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe +function.
§

impl<T> Pointable for T

§

const ALIGN: usize = mem::align_of::<T>()

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
§

impl<T> Tap for T

§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Selfwhere + Self: Borrow<B>, + B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere + Self: BorrowMut<B>, + B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Selfwhere + Self: AsRef<R>, + R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere + Self: AsMut<R>, + R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Selfwhere + Self: Deref<Target = T>, + T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Selfwhere + Self: Borrow<B>, + B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere + Self: BorrowMut<B>, + B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release +builds.
§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Selfwhere + Self: AsRef<R>, + R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release +builds.
§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere + Self: AsMut<R>, + R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release +builds.
§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Selfwhere + Self: Deref<Target = T>, + T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release +builds.
§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release +builds.
source§

impl<T> ToOwned for Twhere + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
§

impl<T> TryConv for T

§

fn try_conv<T>(self) -> Result<T, Self::Error>where + Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

impl<T> Ungil for Twhere + T: Send,

\ No newline at end of file diff --git a/docs/apidocs/chiquito/plonkish/compiler/cell_manager/struct.Placement.html b/docs/apidocs/chiquito/plonkish/compiler/cell_manager/struct.Placement.html new file mode 100644 index 00000000..d4a3fda7 --- /dev/null +++ b/docs/apidocs/chiquito/plonkish/compiler/cell_manager/struct.Placement.html @@ -0,0 +1,118 @@ +Placement in chiquito::plonkish::compiler::cell_manager - Rust
pub struct Placement {
+    pub forward: HashMap<ForwardSignal, SignalPlacement>,
+    pub shared: HashMap<SharedSignal, SignalPlacement>,
+    pub fixed: HashMap<FixedSignal, SignalPlacement>,
+    pub steps: HashMap<StepTypeUUID, StepPlacement>,
+    pub columns: Vec<Column>,
+    pub base_height: u32,
+}

Fields§

§forward: HashMap<ForwardSignal, SignalPlacement>§shared: HashMap<SharedSignal, SignalPlacement>§fixed: HashMap<FixedSignal, SignalPlacement>§steps: HashMap<StepTypeUUID, StepPlacement>§columns: Vec<Column>§base_height: u32

Implementations§

source§

impl Placement

source

pub fn get_forward_placement( + &self, + forward: &ForwardSignal +) -> Option<SignalPlacement>

source

pub fn get_shared_placement( + &self, + shared: &SharedSignal +) -> Option<SignalPlacement>

source

pub fn get_fixed_placement( + &self, + fixed: &FixedSignal +) -> Option<SignalPlacement>

source

pub fn find_internal_signal_placement( + &self, + step_uuid: StepTypeUUID, + signal: &InternalSignal +) -> SignalPlacement

source

pub fn step_height(&self, step_uuid: StepTypeUUID) -> u32

source

pub fn first_step_height(&self) -> u32

source

pub fn same_height(&self) -> bool

Trait Implementations§

source§

impl Clone for Placement

source§

fn clone(&self) -> Placement

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Placement

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for Placement

source§

fn default() -> Placement

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Conv for T

§

fn conv<T>(self) -> Twhere + Self: Into<T>,

Converts self into T using Into<T>. Read more
§

impl<T> FmtForward for T

§

fn fmt_binary(self) -> FmtBinary<Self>where + Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
§

fn fmt_display(self) -> FmtDisplay<Self>where + Self: Display,

Causes self to use its Display implementation when +Debug-formatted.
§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>where + Self: LowerExp,

Causes self to use its LowerExp implementation when +Debug-formatted.
§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>where + Self: LowerHex,

Causes self to use its LowerHex implementation when +Debug-formatted.
§

fn fmt_octal(self) -> FmtOctal<Self>where + Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
§

fn fmt_pointer(self) -> FmtPointer<Self>where + Self: Pointer,

Causes self to use its Pointer implementation when +Debug-formatted.
§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>where + Self: UpperExp,

Causes self to use its UpperExp implementation when +Debug-formatted.
§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>where + Self: UpperHex,

Causes self to use its UpperHex implementation when +Debug-formatted.
§

fn fmt_list(self) -> FmtList<Self>where + &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
§

impl<T> Pipe for Twhere + T: ?Sized,

§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere + Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere + R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere + R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> Rwhere + Self: Borrow<B>, + B: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
§

fn pipe_borrow_mut<'a, B, R>( + &'a mut self, + func: impl FnOnce(&'a mut B) -> R +) -> Rwhere + Self: BorrowMut<B>, + B: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe +function. Read more
§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> Rwhere + Self: AsRef<U>, + U: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> Rwhere + Self: AsMut<U>, + U: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe +function.
§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> Rwhere + Self: Deref<Target = T>, + T: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.deref() into the pipe function.
§

fn pipe_deref_mut<'a, T, R>( + &'a mut self, + func: impl FnOnce(&'a mut T) -> R +) -> Rwhere + Self: DerefMut<Target = T> + Deref, + T: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe +function.
§

impl<T> Pointable for T

§

const ALIGN: usize = mem::align_of::<T>()

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
§

impl<T> Tap for T

§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Selfwhere + Self: Borrow<B>, + B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere + Self: BorrowMut<B>, + B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Selfwhere + Self: AsRef<R>, + R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere + Self: AsMut<R>, + R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Selfwhere + Self: Deref<Target = T>, + T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Selfwhere + Self: Borrow<B>, + B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere + Self: BorrowMut<B>, + B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release +builds.
§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Selfwhere + Self: AsRef<R>, + R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release +builds.
§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere + Self: AsMut<R>, + R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release +builds.
§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Selfwhere + Self: Deref<Target = T>, + T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release +builds.
§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release +builds.
source§

impl<T> ToOwned for Twhere + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
§

impl<T> TryConv for T

§

fn try_conv<T>(self) -> Result<T, Self::Error>where + Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

impl<T> Ungil for Twhere + T: Send,

\ No newline at end of file diff --git a/docs/apidocs/chiquito/plonkish/compiler/cell_manager/struct.SignalPlacement.html b/docs/apidocs/chiquito/plonkish/compiler/cell_manager/struct.SignalPlacement.html new file mode 100644 index 00000000..3f72704f --- /dev/null +++ b/docs/apidocs/chiquito/plonkish/compiler/cell_manager/struct.SignalPlacement.html @@ -0,0 +1,101 @@ +SignalPlacement in chiquito::plonkish::compiler::cell_manager - Rust
pub struct SignalPlacement {
+    pub column: Column,
+    pub rotation: i32,
+}

Fields§

§column: Column§rotation: i32

Implementations§

source§

impl SignalPlacement

source

pub fn new(column: Column, rotation: i32) -> Self

Trait Implementations§

source§

impl Clone for SignalPlacement

source§

fn clone(&self) -> SignalPlacement

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for SignalPlacement

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl From<(Column, i32)> for SignalPlacement

source§

fn from((column, rotation): (Column, i32)) -> Self

Converts to this type from the input type.
source§

impl From<SignalPlacement> for (Column, i32)

source§

fn from(placement: SignalPlacement) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Conv for T

§

fn conv<T>(self) -> Twhere + Self: Into<T>,

Converts self into T using Into<T>. Read more
§

impl<T> FmtForward for T

§

fn fmt_binary(self) -> FmtBinary<Self>where + Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
§

fn fmt_display(self) -> FmtDisplay<Self>where + Self: Display,

Causes self to use its Display implementation when +Debug-formatted.
§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>where + Self: LowerExp,

Causes self to use its LowerExp implementation when +Debug-formatted.
§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>where + Self: LowerHex,

Causes self to use its LowerHex implementation when +Debug-formatted.
§

fn fmt_octal(self) -> FmtOctal<Self>where + Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
§

fn fmt_pointer(self) -> FmtPointer<Self>where + Self: Pointer,

Causes self to use its Pointer implementation when +Debug-formatted.
§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>where + Self: UpperExp,

Causes self to use its UpperExp implementation when +Debug-formatted.
§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>where + Self: UpperHex,

Causes self to use its UpperHex implementation when +Debug-formatted.
§

fn fmt_list(self) -> FmtList<Self>where + &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
§

impl<T> Pipe for Twhere + T: ?Sized,

§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere + Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere + R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere + R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> Rwhere + Self: Borrow<B>, + B: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
§

fn pipe_borrow_mut<'a, B, R>( + &'a mut self, + func: impl FnOnce(&'a mut B) -> R +) -> Rwhere + Self: BorrowMut<B>, + B: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe +function. Read more
§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> Rwhere + Self: AsRef<U>, + U: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> Rwhere + Self: AsMut<U>, + U: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe +function.
§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> Rwhere + Self: Deref<Target = T>, + T: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.deref() into the pipe function.
§

fn pipe_deref_mut<'a, T, R>( + &'a mut self, + func: impl FnOnce(&'a mut T) -> R +) -> Rwhere + Self: DerefMut<Target = T> + Deref, + T: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe +function.
§

impl<T> Pointable for T

§

const ALIGN: usize = mem::align_of::<T>()

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
§

impl<T> Tap for T

§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Selfwhere + Self: Borrow<B>, + B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere + Self: BorrowMut<B>, + B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Selfwhere + Self: AsRef<R>, + R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere + Self: AsMut<R>, + R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Selfwhere + Self: Deref<Target = T>, + T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Selfwhere + Self: Borrow<B>, + B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere + Self: BorrowMut<B>, + B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release +builds.
§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Selfwhere + Self: AsRef<R>, + R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release +builds.
§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere + Self: AsMut<R>, + R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release +builds.
§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Selfwhere + Self: Deref<Target = T>, + T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release +builds.
§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release +builds.
source§

impl<T> ToOwned for Twhere + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
§

impl<T> TryConv for T

§

fn try_conv<T>(self) -> Result<T, Self::Error>where + Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

impl<T> Ungil for Twhere + T: Send,

\ No newline at end of file diff --git a/docs/apidocs/chiquito/plonkish/compiler/cell_manager/struct.SingleRowCellManager.html b/docs/apidocs/chiquito/plonkish/compiler/cell_manager/struct.SingleRowCellManager.html new file mode 100644 index 00000000..aad90a04 --- /dev/null +++ b/docs/apidocs/chiquito/plonkish/compiler/cell_manager/struct.SingleRowCellManager.html @@ -0,0 +1,98 @@ +SingleRowCellManager in chiquito::plonkish::compiler::cell_manager - Rust
pub struct SingleRowCellManager {}

Trait Implementations§

source§

impl CellManager for SingleRowCellManager

source§

fn place<F>(&self, unit: &mut CompilationUnit<F>)

source§

impl Clone for SingleRowCellManager

source§

fn clone(&self) -> SingleRowCellManager

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for SingleRowCellManager

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for SingleRowCellManager

source§

fn default() -> SingleRowCellManager

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Conv for T

§

fn conv<T>(self) -> Twhere + Self: Into<T>,

Converts self into T using Into<T>. Read more
§

impl<T> FmtForward for T

§

fn fmt_binary(self) -> FmtBinary<Self>where + Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
§

fn fmt_display(self) -> FmtDisplay<Self>where + Self: Display,

Causes self to use its Display implementation when +Debug-formatted.
§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>where + Self: LowerExp,

Causes self to use its LowerExp implementation when +Debug-formatted.
§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>where + Self: LowerHex,

Causes self to use its LowerHex implementation when +Debug-formatted.
§

fn fmt_octal(self) -> FmtOctal<Self>where + Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
§

fn fmt_pointer(self) -> FmtPointer<Self>where + Self: Pointer,

Causes self to use its Pointer implementation when +Debug-formatted.
§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>where + Self: UpperExp,

Causes self to use its UpperExp implementation when +Debug-formatted.
§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>where + Self: UpperHex,

Causes self to use its UpperHex implementation when +Debug-formatted.
§

fn fmt_list(self) -> FmtList<Self>where + &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
§

impl<T> Pipe for Twhere + T: ?Sized,

§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere + Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere + R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere + R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> Rwhere + Self: Borrow<B>, + B: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
§

fn pipe_borrow_mut<'a, B, R>( + &'a mut self, + func: impl FnOnce(&'a mut B) -> R +) -> Rwhere + Self: BorrowMut<B>, + B: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe +function. Read more
§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> Rwhere + Self: AsRef<U>, + U: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> Rwhere + Self: AsMut<U>, + U: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe +function.
§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> Rwhere + Self: Deref<Target = T>, + T: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.deref() into the pipe function.
§

fn pipe_deref_mut<'a, T, R>( + &'a mut self, + func: impl FnOnce(&'a mut T) -> R +) -> Rwhere + Self: DerefMut<Target = T> + Deref, + T: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe +function.
§

impl<T> Pointable for T

§

const ALIGN: usize = mem::align_of::<T>()

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
§

impl<T> Tap for T

§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Selfwhere + Self: Borrow<B>, + B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere + Self: BorrowMut<B>, + B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Selfwhere + Self: AsRef<R>, + R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere + Self: AsMut<R>, + R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Selfwhere + Self: Deref<Target = T>, + T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Selfwhere + Self: Borrow<B>, + B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere + Self: BorrowMut<B>, + B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release +builds.
§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Selfwhere + Self: AsRef<R>, + R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release +builds.
§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere + Self: AsMut<R>, + R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release +builds.
§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Selfwhere + Self: Deref<Target = T>, + T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release +builds.
§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release +builds.
source§

impl<T> ToOwned for Twhere + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
§

impl<T> TryConv for T

§

fn try_conv<T>(self) -> Result<T, Self::Error>where + Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

impl<T> Ungil for Twhere + T: Send,

\ No newline at end of file diff --git a/docs/apidocs/chiquito/plonkish/compiler/cell_manager/struct.StepPlacement.html b/docs/apidocs/chiquito/plonkish/compiler/cell_manager/struct.StepPlacement.html new file mode 100644 index 00000000..e7b21bb0 --- /dev/null +++ b/docs/apidocs/chiquito/plonkish/compiler/cell_manager/struct.StepPlacement.html @@ -0,0 +1,98 @@ +StepPlacement in chiquito::plonkish::compiler::cell_manager - Rust
pub struct StepPlacement { /* private fields */ }

Trait Implementations§

source§

impl Clone for StepPlacement

source§

fn clone(&self) -> StepPlacement

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for StepPlacement

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Conv for T

§

fn conv<T>(self) -> Twhere + Self: Into<T>,

Converts self into T using Into<T>. Read more
§

impl<T> FmtForward for T

§

fn fmt_binary(self) -> FmtBinary<Self>where + Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
§

fn fmt_display(self) -> FmtDisplay<Self>where + Self: Display,

Causes self to use its Display implementation when +Debug-formatted.
§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>where + Self: LowerExp,

Causes self to use its LowerExp implementation when +Debug-formatted.
§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>where + Self: LowerHex,

Causes self to use its LowerHex implementation when +Debug-formatted.
§

fn fmt_octal(self) -> FmtOctal<Self>where + Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
§

fn fmt_pointer(self) -> FmtPointer<Self>where + Self: Pointer,

Causes self to use its Pointer implementation when +Debug-formatted.
§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>where + Self: UpperExp,

Causes self to use its UpperExp implementation when +Debug-formatted.
§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>where + Self: UpperHex,

Causes self to use its UpperHex implementation when +Debug-formatted.
§

fn fmt_list(self) -> FmtList<Self>where + &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
§

impl<T> Pipe for Twhere + T: ?Sized,

§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere + Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere + R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere + R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> Rwhere + Self: Borrow<B>, + B: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
§

fn pipe_borrow_mut<'a, B, R>( + &'a mut self, + func: impl FnOnce(&'a mut B) -> R +) -> Rwhere + Self: BorrowMut<B>, + B: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe +function. Read more
§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> Rwhere + Self: AsRef<U>, + U: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> Rwhere + Self: AsMut<U>, + U: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe +function.
§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> Rwhere + Self: Deref<Target = T>, + T: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.deref() into the pipe function.
§

fn pipe_deref_mut<'a, T, R>( + &'a mut self, + func: impl FnOnce(&'a mut T) -> R +) -> Rwhere + Self: DerefMut<Target = T> + Deref, + T: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe +function.
§

impl<T> Pointable for T

§

const ALIGN: usize = mem::align_of::<T>()

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
§

impl<T> Tap for T

§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Selfwhere + Self: Borrow<B>, + B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere + Self: BorrowMut<B>, + B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Selfwhere + Self: AsRef<R>, + R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere + Self: AsMut<R>, + R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Selfwhere + Self: Deref<Target = T>, + T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Selfwhere + Self: Borrow<B>, + B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere + Self: BorrowMut<B>, + B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release +builds.
§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Selfwhere + Self: AsRef<R>, + R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release +builds.
§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere + Self: AsMut<R>, + R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release +builds.
§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Selfwhere + Self: Deref<Target = T>, + T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release +builds.
§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release +builds.
source§

impl<T> ToOwned for Twhere + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
§

impl<T> TryConv for T

§

fn try_conv<T>(self) -> Result<T, Self::Error>where + Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

impl<T> Ungil for Twhere + T: Send,

\ No newline at end of file diff --git a/docs/apidocs/chiquito/plonkish/compiler/cell_manager/trait.CellManager.html b/docs/apidocs/chiquito/plonkish/compiler/cell_manager/trait.CellManager.html new file mode 100644 index 00000000..739ca0cc --- /dev/null +++ b/docs/apidocs/chiquito/plonkish/compiler/cell_manager/trait.CellManager.html @@ -0,0 +1,4 @@ +CellManager in chiquito::plonkish::compiler::cell_manager - Rust
pub trait CellManager: Clone {
+    // Required method
+    fn place<F>(&self, unit: &mut CompilationUnit<F>);
+}

Required Methods§

source

fn place<F>(&self, unit: &mut CompilationUnit<F>)

Implementors§

\ No newline at end of file diff --git a/docs/apidocs/chiquito/plonkish/compiler/fn.compile.html b/docs/apidocs/chiquito/plonkish/compiler/fn.compile.html new file mode 100644 index 00000000..e1ed5e45 --- /dev/null +++ b/docs/apidocs/chiquito/plonkish/compiler/fn.compile.html @@ -0,0 +1,4 @@ +compile in chiquito::plonkish::compiler - Rust
pub fn compile<F: Field + Hash + Clone, CM: CellManager, SSB: StepSelectorBuilder, TraceArgs>(
+    config: CompilerConfig<CM, SSB>,
+    ast: &astCircuit<F, TraceArgs>
+) -> (Circuit<F>, Option<AssignmentGenerator<F, TraceArgs>>)
\ No newline at end of file diff --git a/docs/apidocs/chiquito/plonkish/compiler/fn.compile_phase1.html b/docs/apidocs/chiquito/plonkish/compiler/fn.compile_phase1.html new file mode 100644 index 00000000..1648c99f --- /dev/null +++ b/docs/apidocs/chiquito/plonkish/compiler/fn.compile_phase1.html @@ -0,0 +1,4 @@ +compile_phase1 in chiquito::plonkish::compiler - Rust
pub fn compile_phase1<F: Field + Hash + Clone, CM: CellManager, SSB: StepSelectorBuilder, TraceArgs>(
+    config: CompilerConfig<CM, SSB>,
+    ast: &astCircuit<F, TraceArgs>
+) -> (CompilationUnit<F>, Option<AssignmentGenerator<F, TraceArgs>>)
\ No newline at end of file diff --git a/docs/apidocs/chiquito/plonkish/compiler/fn.compile_phase2.html b/docs/apidocs/chiquito/plonkish/compiler/fn.compile_phase2.html new file mode 100644 index 00000000..151be6cf --- /dev/null +++ b/docs/apidocs/chiquito/plonkish/compiler/fn.compile_phase2.html @@ -0,0 +1 @@ +compile_phase2 in chiquito::plonkish::compiler - Rust
pub fn compile_phase2<F: Field + Clone>(unit: &mut CompilationUnit<F>)
\ No newline at end of file diff --git a/docs/apidocs/chiquito/plonkish/compiler/fn.config.html b/docs/apidocs/chiquito/plonkish/compiler/fn.config.html new file mode 100644 index 00000000..146885d5 --- /dev/null +++ b/docs/apidocs/chiquito/plonkish/compiler/fn.config.html @@ -0,0 +1,4 @@ +config in chiquito::plonkish::compiler - Rust

Function chiquito::plonkish::compiler::config

source ·
pub fn config<CM: CellManager, SSB: StepSelectorBuilder>(
+    cell_manager: CM,
+    step_selector_builder: SSB
+) -> CompilerConfig<CM, SSB>
\ No newline at end of file diff --git a/docs/apidocs/chiquito/plonkish/compiler/index.html b/docs/apidocs/chiquito/plonkish/compiler/index.html new file mode 100644 index 00000000..019a59ac --- /dev/null +++ b/docs/apidocs/chiquito/plonkish/compiler/index.html @@ -0,0 +1 @@ +chiquito::plonkish::compiler - Rust

Module chiquito::plonkish::compiler

source ·

Modules

Structs

Functions

\ No newline at end of file diff --git a/docs/apidocs/chiquito/plonkish/compiler/sidebar-items.js b/docs/apidocs/chiquito/plonkish/compiler/sidebar-items.js new file mode 100644 index 00000000..a5a62433 --- /dev/null +++ b/docs/apidocs/chiquito/plonkish/compiler/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"fn":["compile","compile_phase1","compile_phase2","config"],"mod":["cell_manager","step_selector"],"struct":["CompilerConfig"]}; \ No newline at end of file diff --git a/docs/apidocs/chiquito/plonkish/compiler/step_selector/index.html b/docs/apidocs/chiquito/plonkish/compiler/step_selector/index.html new file mode 100644 index 00000000..576f1c48 --- /dev/null +++ b/docs/apidocs/chiquito/plonkish/compiler/step_selector/index.html @@ -0,0 +1 @@ +chiquito::plonkish::compiler::step_selector - Rust

Structs

Traits

Type Definitions

\ No newline at end of file diff --git a/docs/apidocs/chiquito/plonkish/compiler/step_selector/sidebar-items.js b/docs/apidocs/chiquito/plonkish/compiler/step_selector/sidebar-items.js new file mode 100644 index 00000000..44a87c5b --- /dev/null +++ b/docs/apidocs/chiquito/plonkish/compiler/step_selector/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"struct":["LogNSelectorBuilder","SimpleStepSelectorBuilder","StepSelector","TwoStepsSelectorBuilder"],"trait":["StepSelectorBuilder"],"type":["SelectorAssignment"]}; \ No newline at end of file diff --git a/docs/apidocs/chiquito/plonkish/compiler/step_selector/struct.LogNSelectorBuilder.html b/docs/apidocs/chiquito/plonkish/compiler/step_selector/struct.LogNSelectorBuilder.html new file mode 100644 index 00000000..dd0bdaf4 --- /dev/null +++ b/docs/apidocs/chiquito/plonkish/compiler/step_selector/struct.LogNSelectorBuilder.html @@ -0,0 +1,98 @@ +LogNSelectorBuilder in chiquito::plonkish::compiler::step_selector - Rust
pub struct LogNSelectorBuilder {}

Trait Implementations§

source§

impl Clone for LogNSelectorBuilder

source§

fn clone(&self) -> LogNSelectorBuilder

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for LogNSelectorBuilder

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for LogNSelectorBuilder

source§

fn default() -> LogNSelectorBuilder

Returns the “default value” for a type. Read more
source§

impl StepSelectorBuilder for LogNSelectorBuilder

source§

fn build<F: Field>(&self, unit: &mut CompilationUnit<F>)

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Conv for T

§

fn conv<T>(self) -> Twhere + Self: Into<T>,

Converts self into T using Into<T>. Read more
§

impl<T> FmtForward for T

§

fn fmt_binary(self) -> FmtBinary<Self>where + Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
§

fn fmt_display(self) -> FmtDisplay<Self>where + Self: Display,

Causes self to use its Display implementation when +Debug-formatted.
§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>where + Self: LowerExp,

Causes self to use its LowerExp implementation when +Debug-formatted.
§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>where + Self: LowerHex,

Causes self to use its LowerHex implementation when +Debug-formatted.
§

fn fmt_octal(self) -> FmtOctal<Self>where + Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
§

fn fmt_pointer(self) -> FmtPointer<Self>where + Self: Pointer,

Causes self to use its Pointer implementation when +Debug-formatted.
§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>where + Self: UpperExp,

Causes self to use its UpperExp implementation when +Debug-formatted.
§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>where + Self: UpperHex,

Causes self to use its UpperHex implementation when +Debug-formatted.
§

fn fmt_list(self) -> FmtList<Self>where + &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
§

impl<T> Pipe for Twhere + T: ?Sized,

§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere + Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere + R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere + R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> Rwhere + Self: Borrow<B>, + B: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
§

fn pipe_borrow_mut<'a, B, R>( + &'a mut self, + func: impl FnOnce(&'a mut B) -> R +) -> Rwhere + Self: BorrowMut<B>, + B: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe +function. Read more
§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> Rwhere + Self: AsRef<U>, + U: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> Rwhere + Self: AsMut<U>, + U: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe +function.
§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> Rwhere + Self: Deref<Target = T>, + T: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.deref() into the pipe function.
§

fn pipe_deref_mut<'a, T, R>( + &'a mut self, + func: impl FnOnce(&'a mut T) -> R +) -> Rwhere + Self: DerefMut<Target = T> + Deref, + T: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe +function.
§

impl<T> Pointable for T

§

const ALIGN: usize = mem::align_of::<T>()

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
§

impl<T> Tap for T

§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Selfwhere + Self: Borrow<B>, + B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere + Self: BorrowMut<B>, + B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Selfwhere + Self: AsRef<R>, + R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere + Self: AsMut<R>, + R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Selfwhere + Self: Deref<Target = T>, + T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Selfwhere + Self: Borrow<B>, + B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere + Self: BorrowMut<B>, + B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release +builds.
§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Selfwhere + Self: AsRef<R>, + R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release +builds.
§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere + Self: AsMut<R>, + R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release +builds.
§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Selfwhere + Self: Deref<Target = T>, + T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release +builds.
§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release +builds.
source§

impl<T> ToOwned for Twhere + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
§

impl<T> TryConv for T

§

fn try_conv<T>(self) -> Result<T, Self::Error>where + Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

impl<T> Ungil for Twhere + T: Send,

\ No newline at end of file diff --git a/docs/apidocs/chiquito/plonkish/compiler/step_selector/struct.SimpleStepSelectorBuilder.html b/docs/apidocs/chiquito/plonkish/compiler/step_selector/struct.SimpleStepSelectorBuilder.html new file mode 100644 index 00000000..e63a2970 --- /dev/null +++ b/docs/apidocs/chiquito/plonkish/compiler/step_selector/struct.SimpleStepSelectorBuilder.html @@ -0,0 +1,98 @@ +SimpleStepSelectorBuilder in chiquito::plonkish::compiler::step_selector - Rust
pub struct SimpleStepSelectorBuilder {}

Trait Implementations§

source§

impl Clone for SimpleStepSelectorBuilder

source§

fn clone(&self) -> SimpleStepSelectorBuilder

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for SimpleStepSelectorBuilder

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for SimpleStepSelectorBuilder

source§

fn default() -> SimpleStepSelectorBuilder

Returns the “default value” for a type. Read more
source§

impl StepSelectorBuilder for SimpleStepSelectorBuilder

source§

fn build<F: Field>(&self, unit: &mut CompilationUnit<F>)

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Conv for T

§

fn conv<T>(self) -> Twhere + Self: Into<T>,

Converts self into T using Into<T>. Read more
§

impl<T> FmtForward for T

§

fn fmt_binary(self) -> FmtBinary<Self>where + Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
§

fn fmt_display(self) -> FmtDisplay<Self>where + Self: Display,

Causes self to use its Display implementation when +Debug-formatted.
§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>where + Self: LowerExp,

Causes self to use its LowerExp implementation when +Debug-formatted.
§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>where + Self: LowerHex,

Causes self to use its LowerHex implementation when +Debug-formatted.
§

fn fmt_octal(self) -> FmtOctal<Self>where + Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
§

fn fmt_pointer(self) -> FmtPointer<Self>where + Self: Pointer,

Causes self to use its Pointer implementation when +Debug-formatted.
§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>where + Self: UpperExp,

Causes self to use its UpperExp implementation when +Debug-formatted.
§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>where + Self: UpperHex,

Causes self to use its UpperHex implementation when +Debug-formatted.
§

fn fmt_list(self) -> FmtList<Self>where + &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
§

impl<T> Pipe for Twhere + T: ?Sized,

§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere + Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere + R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere + R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> Rwhere + Self: Borrow<B>, + B: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
§

fn pipe_borrow_mut<'a, B, R>( + &'a mut self, + func: impl FnOnce(&'a mut B) -> R +) -> Rwhere + Self: BorrowMut<B>, + B: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe +function. Read more
§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> Rwhere + Self: AsRef<U>, + U: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> Rwhere + Self: AsMut<U>, + U: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe +function.
§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> Rwhere + Self: Deref<Target = T>, + T: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.deref() into the pipe function.
§

fn pipe_deref_mut<'a, T, R>( + &'a mut self, + func: impl FnOnce(&'a mut T) -> R +) -> Rwhere + Self: DerefMut<Target = T> + Deref, + T: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe +function.
§

impl<T> Pointable for T

§

const ALIGN: usize = mem::align_of::<T>()

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
§

impl<T> Tap for T

§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Selfwhere + Self: Borrow<B>, + B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere + Self: BorrowMut<B>, + B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Selfwhere + Self: AsRef<R>, + R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere + Self: AsMut<R>, + R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Selfwhere + Self: Deref<Target = T>, + T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Selfwhere + Self: Borrow<B>, + B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere + Self: BorrowMut<B>, + B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release +builds.
§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Selfwhere + Self: AsRef<R>, + R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release +builds.
§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere + Self: AsMut<R>, + R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release +builds.
§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Selfwhere + Self: Deref<Target = T>, + T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release +builds.
§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release +builds.
source§

impl<T> ToOwned for Twhere + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
§

impl<T> TryConv for T

§

fn try_conv<T>(self) -> Result<T, Self::Error>where + Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

impl<T> Ungil for Twhere + T: Send,

\ No newline at end of file diff --git a/docs/apidocs/chiquito/plonkish/compiler/step_selector/struct.StepSelector.html b/docs/apidocs/chiquito/plonkish/compiler/step_selector/struct.StepSelector.html new file mode 100644 index 00000000..a33c6b61 --- /dev/null +++ b/docs/apidocs/chiquito/plonkish/compiler/step_selector/struct.StepSelector.html @@ -0,0 +1,119 @@ +StepSelector in chiquito::plonkish::compiler::step_selector - Rust
pub struct StepSelector<F> {
+    pub selector_expr: HashMap<StepTypeUUID, PolyExpr<F>>,
+    pub selector_expr_not: HashMap<StepTypeUUID, PolyExpr<F>>,
+    pub selector_assignment: HashMap<StepTypeUUID, Vec<SelectorAssignment<F>>>,
+    pub columns: Vec<Column>,
+}

Fields§

§selector_expr: HashMap<StepTypeUUID, PolyExpr<F>>§selector_expr_not: HashMap<StepTypeUUID, PolyExpr<F>>§selector_assignment: HashMap<StepTypeUUID, Vec<SelectorAssignment<F>>>§columns: Vec<Column>

Implementations§

source§

impl<F: Clone> StepSelector<F>

source

pub fn select( + &self, + step_uuid: StepTypeUUID, + constraint: &PolyExpr<F> +) -> PolyExpr<F>

source

pub fn next_expr( + &self, + step_uuid: StepTypeUUID, + step_height: u32 +) -> PolyExpr<F>

source

pub fn unselect(&self, step_uuid: StepTypeUUID) -> PolyExpr<F>

source

pub fn get_selector_assignment( + &self, + step_uuid: StepTypeUUID +) -> Vec<SelectorAssignment<F>>

Trait Implementations§

source§

impl<F: Clone> Clone for StepSelector<F>

source§

fn clone(&self) -> StepSelector<F>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<F: Debug> Debug for StepSelector<F>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<F> Default for StepSelector<F>

source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl<F> RefUnwindSafe for StepSelector<F>where + F: RefUnwindSafe,

§

impl<F> Send for StepSelector<F>where + F: Send,

§

impl<F> Sync for StepSelector<F>where + F: Sync,

§

impl<F> Unpin for StepSelector<F>where + F: Unpin,

§

impl<F> UnwindSafe for StepSelector<F>where + F: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for Twhere + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Conv for T

§

fn conv<T>(self) -> Twhere + Self: Into<T>,

Converts self into T using Into<T>. Read more
§

impl<T> FmtForward for T

§

fn fmt_binary(self) -> FmtBinary<Self>where + Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
§

fn fmt_display(self) -> FmtDisplay<Self>where + Self: Display,

Causes self to use its Display implementation when +Debug-formatted.
§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>where + Self: LowerExp,

Causes self to use its LowerExp implementation when +Debug-formatted.
§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>where + Self: LowerHex,

Causes self to use its LowerHex implementation when +Debug-formatted.
§

fn fmt_octal(self) -> FmtOctal<Self>where + Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
§

fn fmt_pointer(self) -> FmtPointer<Self>where + Self: Pointer,

Causes self to use its Pointer implementation when +Debug-formatted.
§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>where + Self: UpperExp,

Causes self to use its UpperExp implementation when +Debug-formatted.
§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>where + Self: UpperHex,

Causes self to use its UpperHex implementation when +Debug-formatted.
§

fn fmt_list(self) -> FmtList<Self>where + &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
§

impl<T> Pipe for Twhere + T: ?Sized,

§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere + Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere + R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere + R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> Rwhere + Self: Borrow<B>, + B: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
§

fn pipe_borrow_mut<'a, B, R>( + &'a mut self, + func: impl FnOnce(&'a mut B) -> R +) -> Rwhere + Self: BorrowMut<B>, + B: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe +function. Read more
§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> Rwhere + Self: AsRef<U>, + U: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> Rwhere + Self: AsMut<U>, + U: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe +function.
§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> Rwhere + Self: Deref<Target = T>, + T: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.deref() into the pipe function.
§

fn pipe_deref_mut<'a, T, R>( + &'a mut self, + func: impl FnOnce(&'a mut T) -> R +) -> Rwhere + Self: DerefMut<Target = T> + Deref, + T: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe +function.
§

impl<T> Pointable for T

§

const ALIGN: usize = mem::align_of::<T>()

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
§

impl<T> Tap for T

§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Selfwhere + Self: Borrow<B>, + B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere + Self: BorrowMut<B>, + B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Selfwhere + Self: AsRef<R>, + R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere + Self: AsMut<R>, + R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Selfwhere + Self: Deref<Target = T>, + T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Selfwhere + Self: Borrow<B>, + B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere + Self: BorrowMut<B>, + B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release +builds.
§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Selfwhere + Self: AsRef<R>, + R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release +builds.
§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere + Self: AsMut<R>, + R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release +builds.
§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Selfwhere + Self: Deref<Target = T>, + T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release +builds.
§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release +builds.
source§

impl<T> ToOwned for Twhere + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
§

impl<T> TryConv for T

§

fn try_conv<T>(self) -> Result<T, Self::Error>where + Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

impl<T> Ungil for Twhere + T: Send,

\ No newline at end of file diff --git a/docs/apidocs/chiquito/plonkish/compiler/step_selector/struct.TwoStepsSelectorBuilder.html b/docs/apidocs/chiquito/plonkish/compiler/step_selector/struct.TwoStepsSelectorBuilder.html new file mode 100644 index 00000000..31d03d4b --- /dev/null +++ b/docs/apidocs/chiquito/plonkish/compiler/step_selector/struct.TwoStepsSelectorBuilder.html @@ -0,0 +1,101 @@ +TwoStepsSelectorBuilder in chiquito::plonkish::compiler::step_selector - Rust
pub struct TwoStepsSelectorBuilder {
+    pub halo2_column: Option<Halo2Column<Advice>>,
+    pub hint_one: Option<String>,
+}

Fields§

§halo2_column: Option<Halo2Column<Advice>>§hint_one: Option<String>

Trait Implementations§

source§

impl Clone for TwoStepsSelectorBuilder

source§

fn clone(&self) -> TwoStepsSelectorBuilder

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for TwoStepsSelectorBuilder

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for TwoStepsSelectorBuilder

source§

fn default() -> TwoStepsSelectorBuilder

Returns the “default value” for a type. Read more
source§

impl StepSelectorBuilder for TwoStepsSelectorBuilder

source§

fn build<F: Field>(&self, unit: &mut CompilationUnit<F>)

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Conv for T

§

fn conv<T>(self) -> Twhere + Self: Into<T>,

Converts self into T using Into<T>. Read more
§

impl<T> FmtForward for T

§

fn fmt_binary(self) -> FmtBinary<Self>where + Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
§

fn fmt_display(self) -> FmtDisplay<Self>where + Self: Display,

Causes self to use its Display implementation when +Debug-formatted.
§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>where + Self: LowerExp,

Causes self to use its LowerExp implementation when +Debug-formatted.
§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>where + Self: LowerHex,

Causes self to use its LowerHex implementation when +Debug-formatted.
§

fn fmt_octal(self) -> FmtOctal<Self>where + Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
§

fn fmt_pointer(self) -> FmtPointer<Self>where + Self: Pointer,

Causes self to use its Pointer implementation when +Debug-formatted.
§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>where + Self: UpperExp,

Causes self to use its UpperExp implementation when +Debug-formatted.
§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>where + Self: UpperHex,

Causes self to use its UpperHex implementation when +Debug-formatted.
§

fn fmt_list(self) -> FmtList<Self>where + &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
§

impl<T> Pipe for Twhere + T: ?Sized,

§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere + Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere + R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere + R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> Rwhere + Self: Borrow<B>, + B: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
§

fn pipe_borrow_mut<'a, B, R>( + &'a mut self, + func: impl FnOnce(&'a mut B) -> R +) -> Rwhere + Self: BorrowMut<B>, + B: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe +function. Read more
§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> Rwhere + Self: AsRef<U>, + U: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> Rwhere + Self: AsMut<U>, + U: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe +function.
§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> Rwhere + Self: Deref<Target = T>, + T: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.deref() into the pipe function.
§

fn pipe_deref_mut<'a, T, R>( + &'a mut self, + func: impl FnOnce(&'a mut T) -> R +) -> Rwhere + Self: DerefMut<Target = T> + Deref, + T: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe +function.
§

impl<T> Pointable for T

§

const ALIGN: usize = mem::align_of::<T>()

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
§

impl<T> Tap for T

§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Selfwhere + Self: Borrow<B>, + B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere + Self: BorrowMut<B>, + B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Selfwhere + Self: AsRef<R>, + R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere + Self: AsMut<R>, + R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Selfwhere + Self: Deref<Target = T>, + T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Selfwhere + Self: Borrow<B>, + B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere + Self: BorrowMut<B>, + B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release +builds.
§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Selfwhere + Self: AsRef<R>, + R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release +builds.
§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere + Self: AsMut<R>, + R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release +builds.
§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Selfwhere + Self: Deref<Target = T>, + T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release +builds.
§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release +builds.
source§

impl<T> ToOwned for Twhere + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
§

impl<T> TryConv for T

§

fn try_conv<T>(self) -> Result<T, Self::Error>where + Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

impl<T> Ungil for Twhere + T: Send,

\ No newline at end of file diff --git a/docs/apidocs/chiquito/plonkish/compiler/step_selector/trait.StepSelectorBuilder.html b/docs/apidocs/chiquito/plonkish/compiler/step_selector/trait.StepSelectorBuilder.html new file mode 100644 index 00000000..953e3276 --- /dev/null +++ b/docs/apidocs/chiquito/plonkish/compiler/step_selector/trait.StepSelectorBuilder.html @@ -0,0 +1,4 @@ +StepSelectorBuilder in chiquito::plonkish::compiler::step_selector - Rust
pub trait StepSelectorBuilder: Clone {
+    // Required method
+    fn build<F: Field>(&self, unit: &mut CompilationUnit<F>);
+}

Required Methods§

source

fn build<F: Field>(&self, unit: &mut CompilationUnit<F>)

Implementors§

\ No newline at end of file diff --git a/docs/apidocs/chiquito/plonkish/compiler/step_selector/type.SelectorAssignment.html b/docs/apidocs/chiquito/plonkish/compiler/step_selector/type.SelectorAssignment.html new file mode 100644 index 00000000..fdcfc368 --- /dev/null +++ b/docs/apidocs/chiquito/plonkish/compiler/step_selector/type.SelectorAssignment.html @@ -0,0 +1 @@ +SelectorAssignment in chiquito::plonkish::compiler::step_selector - Rust
pub type SelectorAssignment<F> = (PolyExpr<F>, F);
\ No newline at end of file diff --git a/docs/apidocs/chiquito/plonkish/compiler/struct.CompilerConfig.html b/docs/apidocs/chiquito/plonkish/compiler/struct.CompilerConfig.html new file mode 100644 index 00000000..5a5da71a --- /dev/null +++ b/docs/apidocs/chiquito/plonkish/compiler/struct.CompilerConfig.html @@ -0,0 +1,108 @@ +CompilerConfig in chiquito::plonkish::compiler - Rust
pub struct CompilerConfig<CM: CellManager, SSB: StepSelectorBuilder> { /* private fields */ }

Trait Implementations§

source§

impl<CM: Clone + CellManager, SSB: Clone + StepSelectorBuilder> Clone for CompilerConfig<CM, SSB>

source§

fn clone(&self) -> CompilerConfig<CM, SSB>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more

Auto Trait Implementations§

§

impl<CM, SSB> RefUnwindSafe for CompilerConfig<CM, SSB>where + CM: RefUnwindSafe, + SSB: RefUnwindSafe,

§

impl<CM, SSB> Send for CompilerConfig<CM, SSB>where + CM: Send, + SSB: Send,

§

impl<CM, SSB> Sync for CompilerConfig<CM, SSB>where + CM: Sync, + SSB: Sync,

§

impl<CM, SSB> Unpin for CompilerConfig<CM, SSB>where + CM: Unpin, + SSB: Unpin,

§

impl<CM, SSB> UnwindSafe for CompilerConfig<CM, SSB>where + CM: UnwindSafe, + SSB: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for Twhere + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Conv for T

§

fn conv<T>(self) -> Twhere + Self: Into<T>,

Converts self into T using Into<T>. Read more
§

impl<T> FmtForward for T

§

fn fmt_binary(self) -> FmtBinary<Self>where + Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
§

fn fmt_display(self) -> FmtDisplay<Self>where + Self: Display,

Causes self to use its Display implementation when +Debug-formatted.
§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>where + Self: LowerExp,

Causes self to use its LowerExp implementation when +Debug-formatted.
§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>where + Self: LowerHex,

Causes self to use its LowerHex implementation when +Debug-formatted.
§

fn fmt_octal(self) -> FmtOctal<Self>where + Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
§

fn fmt_pointer(self) -> FmtPointer<Self>where + Self: Pointer,

Causes self to use its Pointer implementation when +Debug-formatted.
§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>where + Self: UpperExp,

Causes self to use its UpperExp implementation when +Debug-formatted.
§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>where + Self: UpperHex,

Causes self to use its UpperHex implementation when +Debug-formatted.
§

fn fmt_list(self) -> FmtList<Self>where + &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
§

impl<T> Pipe for Twhere + T: ?Sized,

§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere + Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere + R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere + R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> Rwhere + Self: Borrow<B>, + B: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
§

fn pipe_borrow_mut<'a, B, R>( + &'a mut self, + func: impl FnOnce(&'a mut B) -> R +) -> Rwhere + Self: BorrowMut<B>, + B: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe +function. Read more
§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> Rwhere + Self: AsRef<U>, + U: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> Rwhere + Self: AsMut<U>, + U: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe +function.
§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> Rwhere + Self: Deref<Target = T>, + T: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.deref() into the pipe function.
§

fn pipe_deref_mut<'a, T, R>( + &'a mut self, + func: impl FnOnce(&'a mut T) -> R +) -> Rwhere + Self: DerefMut<Target = T> + Deref, + T: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe +function.
§

impl<T> Pointable for T

§

const ALIGN: usize = mem::align_of::<T>()

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
§

impl<T> Tap for T

§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Selfwhere + Self: Borrow<B>, + B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere + Self: BorrowMut<B>, + B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Selfwhere + Self: AsRef<R>, + R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere + Self: AsMut<R>, + R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Selfwhere + Self: Deref<Target = T>, + T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Selfwhere + Self: Borrow<B>, + B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere + Self: BorrowMut<B>, + B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release +builds.
§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Selfwhere + Self: AsRef<R>, + R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release +builds.
§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere + Self: AsMut<R>, + R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release +builds.
§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Selfwhere + Self: Deref<Target = T>, + T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release +builds.
§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release +builds.
source§

impl<T> ToOwned for Twhere + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
§

impl<T> TryConv for T

§

fn try_conv<T>(self) -> Result<T, Self::Error>where + Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

impl<T> Ungil for Twhere + T: Send,

\ No newline at end of file diff --git a/docs/apidocs/chiquito/plonkish/index.html b/docs/apidocs/chiquito/plonkish/index.html new file mode 100644 index 00000000..8fce56cd --- /dev/null +++ b/docs/apidocs/chiquito/plonkish/index.html @@ -0,0 +1 @@ +chiquito::plonkish - Rust

Module chiquito::plonkish

source ·

Modules

\ No newline at end of file diff --git a/docs/apidocs/chiquito/plonkish/ir/assignments/index.html b/docs/apidocs/chiquito/plonkish/ir/assignments/index.html new file mode 100644 index 00000000..94a96c45 --- /dev/null +++ b/docs/apidocs/chiquito/plonkish/ir/assignments/index.html @@ -0,0 +1 @@ +chiquito::plonkish::ir::assignments - Rust

Structs

\ No newline at end of file diff --git a/docs/apidocs/chiquito/plonkish/ir/assignments/sidebar-items.js b/docs/apidocs/chiquito/plonkish/ir/assignments/sidebar-items.js new file mode 100644 index 00000000..15ffbaed --- /dev/null +++ b/docs/apidocs/chiquito/plonkish/ir/assignments/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"struct":["AssignmentGenerator","Assignments"]}; \ No newline at end of file diff --git a/docs/apidocs/chiquito/plonkish/ir/assignments/struct.AssignmentGenerator.html b/docs/apidocs/chiquito/plonkish/ir/assignments/struct.AssignmentGenerator.html new file mode 100644 index 00000000..a8823670 --- /dev/null +++ b/docs/apidocs/chiquito/plonkish/ir/assignments/struct.AssignmentGenerator.html @@ -0,0 +1,106 @@ +AssignmentGenerator in chiquito::plonkish::ir::assignments - Rust
pub struct AssignmentGenerator<F, TraceArgs> { /* private fields */ }

Implementations§

source§

impl<F: Field + Hash, TraceArgs> AssignmentGenerator<F, TraceArgs>

source

pub fn new( + columns: Vec<Column>, + placement: Placement, + selector: StepSelector<F>, + trace_gen: TraceGenerator<F, TraceArgs>, + auto_trace_gen: AutoTraceGenerator<F>, + num_rows: usize, + ir_id: u128 +) -> Self

source

pub fn empty(ir_id: u128) -> Self

source

pub fn generate(&self, args: TraceArgs) -> Assignments<F>

source

pub fn generate_with_witness(&self, witness: TraceWitness<F>) -> Assignments<F>

source

pub fn uuid(&self) -> u128

Trait Implementations§

source§

impl<F: Clone, TraceArgs> Clone for AssignmentGenerator<F, TraceArgs>

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<F: Clone, TraceArgs> Default for AssignmentGenerator<F, TraceArgs>

source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl<F, TraceArgs> !RefUnwindSafe for AssignmentGenerator<F, TraceArgs>

§

impl<F, TraceArgs> !Send for AssignmentGenerator<F, TraceArgs>

§

impl<F, TraceArgs> !Sync for AssignmentGenerator<F, TraceArgs>

§

impl<F, TraceArgs> Unpin for AssignmentGenerator<F, TraceArgs>where + F: Unpin,

§

impl<F, TraceArgs> !UnwindSafe for AssignmentGenerator<F, TraceArgs>

Blanket Implementations§

source§

impl<T> Any for Twhere + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Conv for T

§

fn conv<T>(self) -> Twhere + Self: Into<T>,

Converts self into T using Into<T>. Read more
§

impl<T> FmtForward for T

§

fn fmt_binary(self) -> FmtBinary<Self>where + Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
§

fn fmt_display(self) -> FmtDisplay<Self>where + Self: Display,

Causes self to use its Display implementation when +Debug-formatted.
§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>where + Self: LowerExp,

Causes self to use its LowerExp implementation when +Debug-formatted.
§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>where + Self: LowerHex,

Causes self to use its LowerHex implementation when +Debug-formatted.
§

fn fmt_octal(self) -> FmtOctal<Self>where + Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
§

fn fmt_pointer(self) -> FmtPointer<Self>where + Self: Pointer,

Causes self to use its Pointer implementation when +Debug-formatted.
§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>where + Self: UpperExp,

Causes self to use its UpperExp implementation when +Debug-formatted.
§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>where + Self: UpperHex,

Causes self to use its UpperHex implementation when +Debug-formatted.
§

fn fmt_list(self) -> FmtList<Self>where + &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
§

impl<T> Pipe for Twhere + T: ?Sized,

§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere + Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere + R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere + R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> Rwhere + Self: Borrow<B>, + B: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
§

fn pipe_borrow_mut<'a, B, R>( + &'a mut self, + func: impl FnOnce(&'a mut B) -> R +) -> Rwhere + Self: BorrowMut<B>, + B: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe +function. Read more
§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> Rwhere + Self: AsRef<U>, + U: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> Rwhere + Self: AsMut<U>, + U: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe +function.
§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> Rwhere + Self: Deref<Target = T>, + T: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.deref() into the pipe function.
§

fn pipe_deref_mut<'a, T, R>( + &'a mut self, + func: impl FnOnce(&'a mut T) -> R +) -> Rwhere + Self: DerefMut<Target = T> + Deref, + T: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe +function.
§

impl<T> Pointable for T

§

const ALIGN: usize = mem::align_of::<T>()

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
§

impl<T> Tap for T

§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Selfwhere + Self: Borrow<B>, + B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere + Self: BorrowMut<B>, + B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Selfwhere + Self: AsRef<R>, + R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere + Self: AsMut<R>, + R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Selfwhere + Self: Deref<Target = T>, + T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Selfwhere + Self: Borrow<B>, + B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere + Self: BorrowMut<B>, + B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release +builds.
§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Selfwhere + Self: AsRef<R>, + R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release +builds.
§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere + Self: AsMut<R>, + R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release +builds.
§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Selfwhere + Self: Deref<Target = T>, + T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release +builds.
§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release +builds.
source§

impl<T> ToOwned for Twhere + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
§

impl<T> TryConv for T

§

fn try_conv<T>(self) -> Result<T, Self::Error>where + Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/docs/apidocs/chiquito/plonkish/ir/assignments/struct.Assignments.html b/docs/apidocs/chiquito/plonkish/ir/assignments/struct.Assignments.html new file mode 100644 index 00000000..fcd20f33 --- /dev/null +++ b/docs/apidocs/chiquito/plonkish/ir/assignments/struct.Assignments.html @@ -0,0 +1,609 @@ +Assignments in chiquito::plonkish::ir::assignments - Rust
pub struct Assignments<F>(pub HashMap<Column, Vec<F>>);

Tuple Fields§

§0: HashMap<Column, Vec<F>>

Methods from Deref<Target = HashMap<Column, Vec<F>>>§

1.0.0 · source

pub fn capacity(&self) -> usize

Returns the number of elements the map can hold without reallocating.

+

This number is a lower bound; the HashMap<K, V> might be able to hold +more, but is guaranteed to be able to hold at least this many.

+
Examples
+
use std::collections::HashMap;
+let map: HashMap<i32, i32> = HashMap::with_capacity(100);
+assert!(map.capacity() >= 100);
+
1.0.0 · source

pub fn keys(&self) -> Keys<'_, K, V>

An iterator visiting all keys in arbitrary order. +The iterator element type is &'a K.

+
Examples
+
use std::collections::HashMap;
+
+let map = HashMap::from([
+    ("a", 1),
+    ("b", 2),
+    ("c", 3),
+]);
+
+for key in map.keys() {
+    println!("{key}");
+}
+
Performance
+

In the current implementation, iterating over keys takes O(capacity) time +instead of O(len) because it internally visits empty buckets too.

+
1.0.0 · source

pub fn values(&self) -> Values<'_, K, V>

An iterator visiting all values in arbitrary order. +The iterator element type is &'a V.

+
Examples
+
use std::collections::HashMap;
+
+let map = HashMap::from([
+    ("a", 1),
+    ("b", 2),
+    ("c", 3),
+]);
+
+for val in map.values() {
+    println!("{val}");
+}
+
Performance
+

In the current implementation, iterating over values takes O(capacity) time +instead of O(len) because it internally visits empty buckets too.

+
1.10.0 · source

pub fn values_mut(&mut self) -> ValuesMut<'_, K, V>

An iterator visiting all values mutably in arbitrary order. +The iterator element type is &'a mut V.

+
Examples
+
use std::collections::HashMap;
+
+let mut map = HashMap::from([
+    ("a", 1),
+    ("b", 2),
+    ("c", 3),
+]);
+
+for val in map.values_mut() {
+    *val = *val + 10;
+}
+
+for val in map.values() {
+    println!("{val}");
+}
+
Performance
+

In the current implementation, iterating over values takes O(capacity) time +instead of O(len) because it internally visits empty buckets too.

+
1.0.0 · source

pub fn iter(&self) -> Iter<'_, K, V>

An iterator visiting all key-value pairs in arbitrary order. +The iterator element type is (&'a K, &'a V).

+
Examples
+
use std::collections::HashMap;
+
+let map = HashMap::from([
+    ("a", 1),
+    ("b", 2),
+    ("c", 3),
+]);
+
+for (key, val) in map.iter() {
+    println!("key: {key} val: {val}");
+}
+
Performance
+

In the current implementation, iterating over map takes O(capacity) time +instead of O(len) because it internally visits empty buckets too.

+
1.0.0 · source

pub fn iter_mut(&mut self) -> IterMut<'_, K, V>

An iterator visiting all key-value pairs in arbitrary order, +with mutable references to the values. +The iterator element type is (&'a K, &'a mut V).

+
Examples
+
use std::collections::HashMap;
+
+let mut map = HashMap::from([
+    ("a", 1),
+    ("b", 2),
+    ("c", 3),
+]);
+
+// Update all values
+for (_, val) in map.iter_mut() {
+    *val *= 2;
+}
+
+for (key, val) in &map {
+    println!("key: {key} val: {val}");
+}
+
Performance
+

In the current implementation, iterating over map takes O(capacity) time +instead of O(len) because it internally visits empty buckets too.

+
1.0.0 · source

pub fn len(&self) -> usize

Returns the number of elements in the map.

+
Examples
+
use std::collections::HashMap;
+
+let mut a = HashMap::new();
+assert_eq!(a.len(), 0);
+a.insert(1, "a");
+assert_eq!(a.len(), 1);
+
1.0.0 · source

pub fn is_empty(&self) -> bool

Returns true if the map contains no elements.

+
Examples
+
use std::collections::HashMap;
+
+let mut a = HashMap::new();
+assert!(a.is_empty());
+a.insert(1, "a");
+assert!(!a.is_empty());
+
1.6.0 · source

pub fn drain(&mut self) -> Drain<'_, K, V>

Clears the map, returning all key-value pairs as an iterator. Keeps the +allocated memory for reuse.

+

If the returned iterator is dropped before being fully consumed, it +drops the remaining key-value pairs. The returned iterator keeps a +mutable borrow on the map to optimize its implementation.

+
Examples
+
use std::collections::HashMap;
+
+let mut a = HashMap::new();
+a.insert(1, "a");
+a.insert(2, "b");
+
+for (k, v) in a.drain().take(1) {
+    assert!(k == 1 || k == 2);
+    assert!(v == "a" || v == "b");
+}
+
+assert!(a.is_empty());
+
source

pub fn drain_filter<F>(&mut self, pred: F) -> DrainFilter<'_, K, V, F>where + F: FnMut(&K, &mut V) -> bool,

🔬This is a nightly-only experimental API. (hash_drain_filter)

Creates an iterator which uses a closure to determine if an element should be removed.

+

If the closure returns true, the element is removed from the map and yielded. +If the closure returns false, or panics, the element remains in the map and will not be +yielded.

+

Note that drain_filter lets you mutate every value in the filter closure, regardless of +whether you choose to keep or remove it.

+

If the iterator is only partially consumed or not consumed at all, each of the remaining +elements will still be subjected to the closure and removed and dropped if it returns true.

+

It is unspecified how many more elements will be subjected to the closure +if a panic occurs in the closure, or a panic occurs while dropping an element, +or if the DrainFilter value is leaked.

+
Examples
+

Splitting a map into even and odd keys, reusing the original map:

+ +
#![feature(hash_drain_filter)]
+use std::collections::HashMap;
+
+let mut map: HashMap<i32, i32> = (0..8).map(|x| (x, x)).collect();
+let drained: HashMap<i32, i32> = map.drain_filter(|k, _v| k % 2 == 0).collect();
+
+let mut evens = drained.keys().copied().collect::<Vec<_>>();
+let mut odds = map.keys().copied().collect::<Vec<_>>();
+evens.sort();
+odds.sort();
+
+assert_eq!(evens, vec![0, 2, 4, 6]);
+assert_eq!(odds, vec![1, 3, 5, 7]);
+
1.18.0 · source

pub fn retain<F>(&mut self, f: F)where + F: FnMut(&K, &mut V) -> bool,

Retains only the elements specified by the predicate.

+

In other words, remove all pairs (k, v) for which f(&k, &mut v) returns false. +The elements are visited in unsorted (and unspecified) order.

+
Examples
+
use std::collections::HashMap;
+
+let mut map: HashMap<i32, i32> = (0..8).map(|x| (x, x*10)).collect();
+map.retain(|&k, _| k % 2 == 0);
+assert_eq!(map.len(), 4);
+
Performance
+

In the current implementation, this operation takes O(capacity) time +instead of O(len) because it internally visits empty buckets too.

+
1.0.0 · source

pub fn clear(&mut self)

Clears the map, removing all key-value pairs. Keeps the allocated memory +for reuse.

+
Examples
+
use std::collections::HashMap;
+
+let mut a = HashMap::new();
+a.insert(1, "a");
+a.clear();
+assert!(a.is_empty());
+
1.9.0 · source

pub fn hasher(&self) -> &S

Returns a reference to the map’s BuildHasher.

+
Examples
+
use std::collections::HashMap;
+use std::collections::hash_map::RandomState;
+
+let hasher = RandomState::new();
+let map: HashMap<i32, i32> = HashMap::with_hasher(hasher);
+let hasher: &RandomState = map.hasher();
+
1.0.0 · source

pub fn reserve(&mut self, additional: usize)

Reserves capacity for at least additional more elements to be inserted +in the HashMap. The collection may reserve more space to speculatively +avoid frequent reallocations. After calling reserve, +capacity will be greater than or equal to self.len() + additional. +Does nothing if capacity is already sufficient.

+
Panics
+

Panics if the new allocation size overflows usize.

+
Examples
+
use std::collections::HashMap;
+let mut map: HashMap<&str, i32> = HashMap::new();
+map.reserve(10);
+
1.57.0 · source

pub fn try_reserve(&mut self, additional: usize) -> Result<(), TryReserveError>

Tries to reserve capacity for at least additional more elements to be inserted +in the HashMap. The collection may reserve more space to speculatively +avoid frequent reallocations. After calling try_reserve, +capacity will be greater than or equal to self.len() + additional if +it returns Ok(()). +Does nothing if capacity is already sufficient.

+
Errors
+

If the capacity overflows, or the allocator reports a failure, then an error +is returned.

+
Examples
+
use std::collections::HashMap;
+
+let mut map: HashMap<&str, isize> = HashMap::new();
+map.try_reserve(10).expect("why is the test harness OOMing on a handful of bytes?");
+
1.0.0 · source

pub fn shrink_to_fit(&mut self)

Shrinks the capacity of the map as much as possible. It will drop +down as much as possible while maintaining the internal rules +and possibly leaving some space in accordance with the resize policy.

+
Examples
+
use std::collections::HashMap;
+
+let mut map: HashMap<i32, i32> = HashMap::with_capacity(100);
+map.insert(1, 2);
+map.insert(3, 4);
+assert!(map.capacity() >= 100);
+map.shrink_to_fit();
+assert!(map.capacity() >= 2);
+
1.56.0 · source

pub fn shrink_to(&mut self, min_capacity: usize)

Shrinks the capacity of the map with a lower limit. It will drop +down no lower than the supplied limit while maintaining the internal rules +and possibly leaving some space in accordance with the resize policy.

+

If the current capacity is less than the lower limit, this is a no-op.

+
Examples
+
use std::collections::HashMap;
+
+let mut map: HashMap<i32, i32> = HashMap::with_capacity(100);
+map.insert(1, 2);
+map.insert(3, 4);
+assert!(map.capacity() >= 100);
+map.shrink_to(10);
+assert!(map.capacity() >= 10);
+map.shrink_to(0);
+assert!(map.capacity() >= 2);
+
1.0.0 · source

pub fn entry(&mut self, key: K) -> Entry<'_, K, V>

Gets the given key’s corresponding entry in the map for in-place manipulation.

+
Examples
+
use std::collections::HashMap;
+
+let mut letters = HashMap::new();
+
+for ch in "a short treatise on fungi".chars() {
+    letters.entry(ch).and_modify(|counter| *counter += 1).or_insert(1);
+}
+
+assert_eq!(letters[&'s'], 2);
+assert_eq!(letters[&'t'], 3);
+assert_eq!(letters[&'u'], 1);
+assert_eq!(letters.get(&'y'), None);
+
1.0.0 · source

pub fn get<Q>(&self, k: &Q) -> Option<&V>where + K: Borrow<Q>, + Q: Hash + Eq + ?Sized,

Returns a reference to the value corresponding to the key.

+

The key may be any borrowed form of the map’s key type, but +Hash and Eq on the borrowed form must match those for +the key type.

+
Examples
+
use std::collections::HashMap;
+
+let mut map = HashMap::new();
+map.insert(1, "a");
+assert_eq!(map.get(&1), Some(&"a"));
+assert_eq!(map.get(&2), None);
+
1.40.0 · source

pub fn get_key_value<Q>(&self, k: &Q) -> Option<(&K, &V)>where + K: Borrow<Q>, + Q: Hash + Eq + ?Sized,

Returns the key-value pair corresponding to the supplied key.

+

The supplied key may be any borrowed form of the map’s key type, but +Hash and Eq on the borrowed form must match those for +the key type.

+
Examples
+
use std::collections::HashMap;
+
+let mut map = HashMap::new();
+map.insert(1, "a");
+assert_eq!(map.get_key_value(&1), Some((&1, &"a")));
+assert_eq!(map.get_key_value(&2), None);
+
source

pub fn get_many_mut<Q, const N: usize>( + &mut self, + ks: [&Q; N] +) -> Option<[&mut V; N]>where + K: Borrow<Q>, + Q: Hash + Eq + ?Sized,

🔬This is a nightly-only experimental API. (map_many_mut)

Attempts to get mutable references to N values in the map at once.

+

Returns an array of length N with the results of each query. For soundness, at most one +mutable reference will be returned to any value. None will be returned if any of the +keys are duplicates or missing.

+
Examples
+
#![feature(map_many_mut)]
+use std::collections::HashMap;
+
+let mut libraries = HashMap::new();
+libraries.insert("Bodleian Library".to_string(), 1602);
+libraries.insert("Athenæum".to_string(), 1807);
+libraries.insert("Herzogin-Anna-Amalia-Bibliothek".to_string(), 1691);
+libraries.insert("Library of Congress".to_string(), 1800);
+
+let got = libraries.get_many_mut([
+    "Athenæum",
+    "Library of Congress",
+]);
+assert_eq!(
+    got,
+    Some([
+        &mut 1807,
+        &mut 1800,
+    ]),
+);
+
+// Missing keys result in None
+let got = libraries.get_many_mut([
+    "Athenæum",
+    "New York Public Library",
+]);
+assert_eq!(got, None);
+
+// Duplicate keys result in None
+let got = libraries.get_many_mut([
+    "Athenæum",
+    "Athenæum",
+]);
+assert_eq!(got, None);
+
source

pub unsafe fn get_many_unchecked_mut<Q, const N: usize>( + &mut self, + ks: [&Q; N] +) -> Option<[&mut V; N]>where + K: Borrow<Q>, + Q: Hash + Eq + ?Sized,

🔬This is a nightly-only experimental API. (map_many_mut)

Attempts to get mutable references to N values in the map at once, without validating that +the values are unique.

+

Returns an array of length N with the results of each query. None will be returned if +any of the keys are missing.

+

For a safe alternative see get_many_mut.

+
Safety
+

Calling this method with overlapping keys is undefined behavior even if the resulting +references are not used.

+
Examples
+
#![feature(map_many_mut)]
+use std::collections::HashMap;
+
+let mut libraries = HashMap::new();
+libraries.insert("Bodleian Library".to_string(), 1602);
+libraries.insert("Athenæum".to_string(), 1807);
+libraries.insert("Herzogin-Anna-Amalia-Bibliothek".to_string(), 1691);
+libraries.insert("Library of Congress".to_string(), 1800);
+
+let got = libraries.get_many_mut([
+    "Athenæum",
+    "Library of Congress",
+]);
+assert_eq!(
+    got,
+    Some([
+        &mut 1807,
+        &mut 1800,
+    ]),
+);
+
+// Missing keys result in None
+let got = libraries.get_many_mut([
+    "Athenæum",
+    "New York Public Library",
+]);
+assert_eq!(got, None);
+
1.0.0 · source

pub fn contains_key<Q>(&self, k: &Q) -> boolwhere + K: Borrow<Q>, + Q: Hash + Eq + ?Sized,

Returns true if the map contains a value for the specified key.

+

The key may be any borrowed form of the map’s key type, but +Hash and Eq on the borrowed form must match those for +the key type.

+
Examples
+
use std::collections::HashMap;
+
+let mut map = HashMap::new();
+map.insert(1, "a");
+assert_eq!(map.contains_key(&1), true);
+assert_eq!(map.contains_key(&2), false);
+
1.0.0 · source

pub fn get_mut<Q>(&mut self, k: &Q) -> Option<&mut V>where + K: Borrow<Q>, + Q: Hash + Eq + ?Sized,

Returns a mutable reference to the value corresponding to the key.

+

The key may be any borrowed form of the map’s key type, but +Hash and Eq on the borrowed form must match those for +the key type.

+
Examples
+
use std::collections::HashMap;
+
+let mut map = HashMap::new();
+map.insert(1, "a");
+if let Some(x) = map.get_mut(&1) {
+    *x = "b";
+}
+assert_eq!(map[&1], "b");
+
1.0.0 · source

pub fn insert(&mut self, k: K, v: V) -> Option<V>

Inserts a key-value pair into the map.

+

If the map did not have this key present, None is returned.

+

If the map did have this key present, the value is updated, and the old +value is returned. The key is not updated, though; this matters for +types that can be == without being identical. See the module-level +documentation for more.

+
Examples
+
use std::collections::HashMap;
+
+let mut map = HashMap::new();
+assert_eq!(map.insert(37, "a"), None);
+assert_eq!(map.is_empty(), false);
+
+map.insert(37, "b");
+assert_eq!(map.insert(37, "c"), Some("b"));
+assert_eq!(map[&37], "c");
+
source

pub fn try_insert( + &mut self, + key: K, + value: V +) -> Result<&mut V, OccupiedError<'_, K, V>>

🔬This is a nightly-only experimental API. (map_try_insert)

Tries to insert a key-value pair into the map, and returns +a mutable reference to the value in the entry.

+

If the map already had this key present, nothing is updated, and +an error containing the occupied entry and the value is returned.

+
Examples
+

Basic usage:

+ +
#![feature(map_try_insert)]
+
+use std::collections::HashMap;
+
+let mut map = HashMap::new();
+assert_eq!(map.try_insert(37, "a").unwrap(), &"a");
+
+let err = map.try_insert(37, "b").unwrap_err();
+assert_eq!(err.entry.key(), &37);
+assert_eq!(err.entry.get(), &"a");
+assert_eq!(err.value, "b");
+
1.0.0 · source

pub fn remove<Q>(&mut self, k: &Q) -> Option<V>where + K: Borrow<Q>, + Q: Hash + Eq + ?Sized,

Removes a key from the map, returning the value at the key if the key +was previously in the map.

+

The key may be any borrowed form of the map’s key type, but +Hash and Eq on the borrowed form must match those for +the key type.

+
Examples
+
use std::collections::HashMap;
+
+let mut map = HashMap::new();
+map.insert(1, "a");
+assert_eq!(map.remove(&1), Some("a"));
+assert_eq!(map.remove(&1), None);
+
1.27.0 · source

pub fn remove_entry<Q>(&mut self, k: &Q) -> Option<(K, V)>where + K: Borrow<Q>, + Q: Hash + Eq + ?Sized,

Removes a key from the map, returning the stored key and value if the +key was previously in the map.

+

The key may be any borrowed form of the map’s key type, but +Hash and Eq on the borrowed form must match those for +the key type.

+
Examples
+
use std::collections::HashMap;
+
+let mut map = HashMap::new();
+map.insert(1, "a");
+assert_eq!(map.remove_entry(&1), Some((1, "a")));
+assert_eq!(map.remove(&1), None);
+
source

pub fn raw_entry_mut(&mut self) -> RawEntryBuilderMut<'_, K, V, S>

🔬This is a nightly-only experimental API. (hash_raw_entry)

Creates a raw entry builder for the HashMap.

+

Raw entries provide the lowest level of control for searching and +manipulating a map. They must be manually initialized with a hash and +then manually searched. After this, insertions into a vacant entry +still require an owned key to be provided.

+

Raw entries are useful for such exotic situations as:

+
    +
  • Hash memoization
  • +
  • Deferring the creation of an owned key until it is known to be required
  • +
  • Using a search key that doesn’t work with the Borrow trait
  • +
  • Using custom comparison logic without newtype wrappers
  • +
+

Because raw entries provide much more low-level control, it’s much easier +to put the HashMap into an inconsistent state which, while memory-safe, +will cause the map to produce seemingly random results. Higher-level and +more foolproof APIs like entry should be preferred when possible.

+

In particular, the hash used to initialized the raw entry must still be +consistent with the hash of the key that is ultimately stored in the entry. +This is because implementations of HashMap may need to recompute hashes +when resizing, at which point only the keys are available.

+

Raw entries give mutable access to the keys. This must not be used +to modify how the key would compare or hash, as the map will not re-evaluate +where the key should go, meaning the keys may become “lost” if their +location does not reflect their state. For instance, if you change a key +so that the map now contains keys which compare equal, search may start +acting erratically, with two keys randomly masking each other. Implementations +are free to assume this doesn’t happen (within the limits of memory-safety).

+
source

pub fn raw_entry(&self) -> RawEntryBuilder<'_, K, V, S>

🔬This is a nightly-only experimental API. (hash_raw_entry)

Creates a raw immutable entry builder for the HashMap.

+

Raw entries provide the lowest level of control for searching and +manipulating a map. They must be manually initialized with a hash and +then manually searched.

+

This is useful for

+
    +
  • Hash memoization
  • +
  • Using a search key that doesn’t work with the Borrow trait
  • +
  • Using custom comparison logic without newtype wrappers
  • +
+

Unless you are in such a situation, higher-level and more foolproof APIs like +get should be preferred.

+

Immutable raw entries have very limited use; you might instead want raw_entry_mut.

+

Trait Implementations§

source§

impl<F: Clone> Clone for Assignments<F>

source§

fn clone(&self) -> Assignments<F>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<F: Debug> Debug for Assignments<F>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<F> Default for Assignments<F>

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl<F> Deref for Assignments<F>

§

type Target = HashMap<Column, Vec<F, Global>, RandomState>

The resulting type after dereferencing.
source§

fn deref(&self) -> &Self::Target

Dereferences the value.
source§

impl<F> DerefMut for Assignments<F>

source§

fn deref_mut(&mut self) -> &mut Self::Target

Mutably dereferences the value.
source§

impl<F: Debug> Display for Assignments<F>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<F> RefUnwindSafe for Assignments<F>where + F: RefUnwindSafe,

§

impl<F> Send for Assignments<F>where + F: Send,

§

impl<F> Sync for Assignments<F>where + F: Sync,

§

impl<F> Unpin for Assignments<F>where + F: Unpin,

§

impl<F> UnwindSafe for Assignments<F>where + F: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for Twhere + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Conv for T

§

fn conv<T>(self) -> Twhere + Self: Into<T>,

Converts self into T using Into<T>. Read more
§

impl<T> FmtForward for T

§

fn fmt_binary(self) -> FmtBinary<Self>where + Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
§

fn fmt_display(self) -> FmtDisplay<Self>where + Self: Display,

Causes self to use its Display implementation when +Debug-formatted.
§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>where + Self: LowerExp,

Causes self to use its LowerExp implementation when +Debug-formatted.
§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>where + Self: LowerHex,

Causes self to use its LowerHex implementation when +Debug-formatted.
§

fn fmt_octal(self) -> FmtOctal<Self>where + Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
§

fn fmt_pointer(self) -> FmtPointer<Self>where + Self: Pointer,

Causes self to use its Pointer implementation when +Debug-formatted.
§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>where + Self: UpperExp,

Causes self to use its UpperExp implementation when +Debug-formatted.
§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>where + Self: UpperHex,

Causes self to use its UpperHex implementation when +Debug-formatted.
§

fn fmt_list(self) -> FmtList<Self>where + &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
§

impl<T> Pipe for Twhere + T: ?Sized,

§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere + Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere + R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere + R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> Rwhere + Self: Borrow<B>, + B: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
§

fn pipe_borrow_mut<'a, B, R>( + &'a mut self, + func: impl FnOnce(&'a mut B) -> R +) -> Rwhere + Self: BorrowMut<B>, + B: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe +function. Read more
§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> Rwhere + Self: AsRef<U>, + U: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> Rwhere + Self: AsMut<U>, + U: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe +function.
§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> Rwhere + Self: Deref<Target = T>, + T: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.deref() into the pipe function.
§

fn pipe_deref_mut<'a, T, R>( + &'a mut self, + func: impl FnOnce(&'a mut T) -> R +) -> Rwhere + Self: DerefMut<Target = T> + Deref, + T: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe +function.
§

impl<T> Pointable for T

§

const ALIGN: usize = mem::align_of::<T>()

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
§

impl<T> Tap for T

§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Selfwhere + Self: Borrow<B>, + B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere + Self: BorrowMut<B>, + B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Selfwhere + Self: AsRef<R>, + R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere + Self: AsMut<R>, + R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Selfwhere + Self: Deref<Target = T>, + T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Selfwhere + Self: Borrow<B>, + B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere + Self: BorrowMut<B>, + B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release +builds.
§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Selfwhere + Self: AsRef<R>, + R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release +builds.
§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere + Self: AsMut<R>, + R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release +builds.
§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Selfwhere + Self: Deref<Target = T>, + T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release +builds.
§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release +builds.
source§

impl<T> ToOwned for Twhere + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for Twhere + T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
§

impl<T> TryConv for T

§

fn try_conv<T>(self) -> Result<T, Self::Error>where + Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

impl<T> Ungil for Twhere + T: Send,

\ No newline at end of file diff --git a/docs/apidocs/chiquito/plonkish/ir/enum.ColumnType.html b/docs/apidocs/chiquito/plonkish/ir/enum.ColumnType.html new file mode 100644 index 00000000..deda9dda --- /dev/null +++ b/docs/apidocs/chiquito/plonkish/ir/enum.ColumnType.html @@ -0,0 +1,105 @@ +ColumnType in chiquito::plonkish::ir - Rust
pub enum ColumnType {
+    Advice,
+    Fixed,
+    Halo2Advice,
+    Halo2Fixed,
+}

Variants§

§

Advice

§

Fixed

§

Halo2Advice

§

Halo2Fixed

Trait Implementations§

source§

impl Clone for ColumnType

source§

fn clone(&self) -> ColumnType

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for ColumnType

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Hash for ColumnType

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)where + H: Hasher, + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Conv for T

§

fn conv<T>(self) -> Twhere + Self: Into<T>,

Converts self into T using Into<T>. Read more
§

impl<T> FmtForward for T

§

fn fmt_binary(self) -> FmtBinary<Self>where + Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
§

fn fmt_display(self) -> FmtDisplay<Self>where + Self: Display,

Causes self to use its Display implementation when +Debug-formatted.
§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>where + Self: LowerExp,

Causes self to use its LowerExp implementation when +Debug-formatted.
§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>where + Self: LowerHex,

Causes self to use its LowerHex implementation when +Debug-formatted.
§

fn fmt_octal(self) -> FmtOctal<Self>where + Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
§

fn fmt_pointer(self) -> FmtPointer<Self>where + Self: Pointer,

Causes self to use its Pointer implementation when +Debug-formatted.
§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>where + Self: UpperExp,

Causes self to use its UpperExp implementation when +Debug-formatted.
§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>where + Self: UpperHex,

Causes self to use its UpperHex implementation when +Debug-formatted.
§

fn fmt_list(self) -> FmtList<Self>where + &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
§

impl<T> Pipe for Twhere + T: ?Sized,

§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere + Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere + R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere + R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> Rwhere + Self: Borrow<B>, + B: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
§

fn pipe_borrow_mut<'a, B, R>( + &'a mut self, + func: impl FnOnce(&'a mut B) -> R +) -> Rwhere + Self: BorrowMut<B>, + B: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe +function. Read more
§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> Rwhere + Self: AsRef<U>, + U: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> Rwhere + Self: AsMut<U>, + U: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe +function.
§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> Rwhere + Self: Deref<Target = T>, + T: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.deref() into the pipe function.
§

fn pipe_deref_mut<'a, T, R>( + &'a mut self, + func: impl FnOnce(&'a mut T) -> R +) -> Rwhere + Self: DerefMut<Target = T> + Deref, + T: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe +function.
§

impl<T> Pointable for T

§

const ALIGN: usize = mem::align_of::<T>()

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
§

impl<T> Tap for T

§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Selfwhere + Self: Borrow<B>, + B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere + Self: BorrowMut<B>, + B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Selfwhere + Self: AsRef<R>, + R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere + Self: AsMut<R>, + R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Selfwhere + Self: Deref<Target = T>, + T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Selfwhere + Self: Borrow<B>, + B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere + Self: BorrowMut<B>, + B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release +builds.
§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Selfwhere + Self: AsRef<R>, + R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release +builds.
§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere + Self: AsMut<R>, + R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release +builds.
§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Selfwhere + Self: Deref<Target = T>, + T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release +builds.
§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release +builds.
source§

impl<T> ToOwned for Twhere + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
§

impl<T> TryConv for T

§

fn try_conv<T>(self) -> Result<T, Self::Error>where + Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

impl<T> Ungil for Twhere + T: Send,

\ No newline at end of file diff --git a/docs/apidocs/chiquito/plonkish/ir/index.html b/docs/apidocs/chiquito/plonkish/ir/index.html new file mode 100644 index 00000000..42db45df --- /dev/null +++ b/docs/apidocs/chiquito/plonkish/ir/index.html @@ -0,0 +1 @@ +chiquito::plonkish::ir - Rust

Module chiquito::plonkish::ir

source ·

Modules

Structs

Enums

Type Definitions

\ No newline at end of file diff --git a/docs/apidocs/chiquito/plonkish/ir/query/index.html b/docs/apidocs/chiquito/plonkish/ir/query/index.html new file mode 100644 index 00000000..695c210d --- /dev/null +++ b/docs/apidocs/chiquito/plonkish/ir/query/index.html @@ -0,0 +1 @@ +chiquito::plonkish::ir::query - Rust

Module chiquito::plonkish::ir::query

source ·

Type Definitions

\ No newline at end of file diff --git a/docs/apidocs/chiquito/plonkish/ir/query/sidebar-items.js b/docs/apidocs/chiquito/plonkish/ir/query/sidebar-items.js new file mode 100644 index 00000000..f7e32361 --- /dev/null +++ b/docs/apidocs/chiquito/plonkish/ir/query/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"type":["Queriable"]}; \ No newline at end of file diff --git a/docs/apidocs/chiquito/plonkish/ir/query/type.Queriable.html b/docs/apidocs/chiquito/plonkish/ir/query/type.Queriable.html new file mode 100644 index 00000000..f92d2bd9 --- /dev/null +++ b/docs/apidocs/chiquito/plonkish/ir/query/type.Queriable.html @@ -0,0 +1 @@ +Queriable in chiquito::plonkish::ir::query - Rust

Type Definition chiquito::plonkish::ir::query::Queriable

source ·
pub type Queriable = (Column, i32, String);
\ No newline at end of file diff --git a/docs/apidocs/chiquito/plonkish/ir/sc/index.html b/docs/apidocs/chiquito/plonkish/ir/sc/index.html new file mode 100644 index 00000000..fc55615f --- /dev/null +++ b/docs/apidocs/chiquito/plonkish/ir/sc/index.html @@ -0,0 +1 @@ +chiquito::plonkish::ir::sc - Rust

Module chiquito::plonkish::ir::sc

source ·

Structs

Type Definitions

\ No newline at end of file diff --git a/docs/apidocs/chiquito/plonkish/ir/sc/sidebar-items.js b/docs/apidocs/chiquito/plonkish/ir/sc/sidebar-items.js new file mode 100644 index 00000000..cbbe0df8 --- /dev/null +++ b/docs/apidocs/chiquito/plonkish/ir/sc/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"struct":["MappingContext","MappingGenerator","SuperCircuit"],"type":["Mapping","SuperAssignments"]}; \ No newline at end of file diff --git a/docs/apidocs/chiquito/plonkish/ir/sc/struct.MappingContext.html b/docs/apidocs/chiquito/plonkish/ir/sc/struct.MappingContext.html new file mode 100644 index 00000000..40c6bee6 --- /dev/null +++ b/docs/apidocs/chiquito/plonkish/ir/sc/struct.MappingContext.html @@ -0,0 +1,110 @@ +MappingContext in chiquito::plonkish::ir::sc - Rust
pub struct MappingContext<F> { /* private fields */ }

Implementations§

source§

impl<F: Field + Hash> MappingContext<F>

source

pub fn map<TraceArgs>( + &mut self, + gen: &AssignmentGenerator<F, TraceArgs>, + args: TraceArgs +)

source

pub fn map_with_witness<TraceArgs>( + &mut self, + gen: &AssignmentGenerator<F, TraceArgs>, + witness: TraceWitness<F> +)

source

pub fn get_super_assignments(self) -> SuperAssignments<F>

Trait Implementations§

source§

impl<F> Default for MappingContext<F>

source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl<F> RefUnwindSafe for MappingContext<F>where + F: RefUnwindSafe,

§

impl<F> Send for MappingContext<F>where + F: Send,

§

impl<F> Sync for MappingContext<F>where + F: Sync,

§

impl<F> Unpin for MappingContext<F>where + F: Unpin,

§

impl<F> UnwindSafe for MappingContext<F>where + F: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for Twhere + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Conv for T

§

fn conv<T>(self) -> Twhere + Self: Into<T>,

Converts self into T using Into<T>. Read more
§

impl<T> FmtForward for T

§

fn fmt_binary(self) -> FmtBinary<Self>where + Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
§

fn fmt_display(self) -> FmtDisplay<Self>where + Self: Display,

Causes self to use its Display implementation when +Debug-formatted.
§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>where + Self: LowerExp,

Causes self to use its LowerExp implementation when +Debug-formatted.
§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>where + Self: LowerHex,

Causes self to use its LowerHex implementation when +Debug-formatted.
§

fn fmt_octal(self) -> FmtOctal<Self>where + Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
§

fn fmt_pointer(self) -> FmtPointer<Self>where + Self: Pointer,

Causes self to use its Pointer implementation when +Debug-formatted.
§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>where + Self: UpperExp,

Causes self to use its UpperExp implementation when +Debug-formatted.
§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>where + Self: UpperHex,

Causes self to use its UpperHex implementation when +Debug-formatted.
§

fn fmt_list(self) -> FmtList<Self>where + &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
§

impl<T> Pipe for Twhere + T: ?Sized,

§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere + Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere + R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere + R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> Rwhere + Self: Borrow<B>, + B: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
§

fn pipe_borrow_mut<'a, B, R>( + &'a mut self, + func: impl FnOnce(&'a mut B) -> R +) -> Rwhere + Self: BorrowMut<B>, + B: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe +function. Read more
§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> Rwhere + Self: AsRef<U>, + U: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> Rwhere + Self: AsMut<U>, + U: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe +function.
§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> Rwhere + Self: Deref<Target = T>, + T: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.deref() into the pipe function.
§

fn pipe_deref_mut<'a, T, R>( + &'a mut self, + func: impl FnOnce(&'a mut T) -> R +) -> Rwhere + Self: DerefMut<Target = T> + Deref, + T: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe +function.
§

impl<T> Pointable for T

§

const ALIGN: usize = mem::align_of::<T>()

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
§

impl<T> Tap for T

§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Selfwhere + Self: Borrow<B>, + B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere + Self: BorrowMut<B>, + B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Selfwhere + Self: AsRef<R>, + R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere + Self: AsMut<R>, + R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Selfwhere + Self: Deref<Target = T>, + T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Selfwhere + Self: Borrow<B>, + B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere + Self: BorrowMut<B>, + B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release +builds.
§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Selfwhere + Self: AsRef<R>, + R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release +builds.
§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere + Self: AsMut<R>, + R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release +builds.
§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Selfwhere + Self: Deref<Target = T>, + T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release +builds.
§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release +builds.
§

impl<T> TryConv for T

§

fn try_conv<T>(self) -> Result<T, Self::Error>where + Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

impl<T> Ungil for Twhere + T: Send,

\ No newline at end of file diff --git a/docs/apidocs/chiquito/plonkish/ir/sc/struct.MappingGenerator.html b/docs/apidocs/chiquito/plonkish/ir/sc/struct.MappingGenerator.html new file mode 100644 index 00000000..1ac895db --- /dev/null +++ b/docs/apidocs/chiquito/plonkish/ir/sc/struct.MappingGenerator.html @@ -0,0 +1,97 @@ +MappingGenerator in chiquito::plonkish::ir::sc - Rust
pub struct MappingGenerator<F, MappingArgs> { /* private fields */ }

Implementations§

source§

impl<F: Field + Hash, MappingArgs> MappingGenerator<F, MappingArgs>

source

pub fn new(mapping: Rc<Mapping<F, MappingArgs>>) -> Self

source

pub fn generate(&self, args: MappingArgs) -> SuperAssignments<F>

Trait Implementations§

source§

impl<F, MappingArgs> Clone for MappingGenerator<F, MappingArgs>

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<F, MappingArgs> Default for MappingGenerator<F, MappingArgs>

source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl<F, MappingArgs> !RefUnwindSafe for MappingGenerator<F, MappingArgs>

§

impl<F, MappingArgs> !Send for MappingGenerator<F, MappingArgs>

§

impl<F, MappingArgs> !Sync for MappingGenerator<F, MappingArgs>

§

impl<F, MappingArgs> Unpin for MappingGenerator<F, MappingArgs>

§

impl<F, MappingArgs> !UnwindSafe for MappingGenerator<F, MappingArgs>

Blanket Implementations§

source§

impl<T> Any for Twhere + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Conv for T

§

fn conv<T>(self) -> Twhere + Self: Into<T>,

Converts self into T using Into<T>. Read more
§

impl<T> FmtForward for T

§

fn fmt_binary(self) -> FmtBinary<Self>where + Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
§

fn fmt_display(self) -> FmtDisplay<Self>where + Self: Display,

Causes self to use its Display implementation when +Debug-formatted.
§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>where + Self: LowerExp,

Causes self to use its LowerExp implementation when +Debug-formatted.
§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>where + Self: LowerHex,

Causes self to use its LowerHex implementation when +Debug-formatted.
§

fn fmt_octal(self) -> FmtOctal<Self>where + Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
§

fn fmt_pointer(self) -> FmtPointer<Self>where + Self: Pointer,

Causes self to use its Pointer implementation when +Debug-formatted.
§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>where + Self: UpperExp,

Causes self to use its UpperExp implementation when +Debug-formatted.
§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>where + Self: UpperHex,

Causes self to use its UpperHex implementation when +Debug-formatted.
§

fn fmt_list(self) -> FmtList<Self>where + &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
§

impl<T> Pipe for Twhere + T: ?Sized,

§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere + Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere + R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere + R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> Rwhere + Self: Borrow<B>, + B: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
§

fn pipe_borrow_mut<'a, B, R>( + &'a mut self, + func: impl FnOnce(&'a mut B) -> R +) -> Rwhere + Self: BorrowMut<B>, + B: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe +function. Read more
§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> Rwhere + Self: AsRef<U>, + U: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> Rwhere + Self: AsMut<U>, + U: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe +function.
§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> Rwhere + Self: Deref<Target = T>, + T: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.deref() into the pipe function.
§

fn pipe_deref_mut<'a, T, R>( + &'a mut self, + func: impl FnOnce(&'a mut T) -> R +) -> Rwhere + Self: DerefMut<Target = T> + Deref, + T: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe +function.
§

impl<T> Pointable for T

§

const ALIGN: usize = mem::align_of::<T>()

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
§

impl<T> Tap for T

§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Selfwhere + Self: Borrow<B>, + B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere + Self: BorrowMut<B>, + B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Selfwhere + Self: AsRef<R>, + R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere + Self: AsMut<R>, + R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Selfwhere + Self: Deref<Target = T>, + T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Selfwhere + Self: Borrow<B>, + B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere + Self: BorrowMut<B>, + B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release +builds.
§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Selfwhere + Self: AsRef<R>, + R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release +builds.
§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere + Self: AsMut<R>, + R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release +builds.
§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Selfwhere + Self: Deref<Target = T>, + T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release +builds.
§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release +builds.
source§

impl<T> ToOwned for Twhere + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
§

impl<T> TryConv for T

§

fn try_conv<T>(self) -> Result<T, Self::Error>where + Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/docs/apidocs/chiquito/plonkish/ir/sc/struct.SuperCircuit.html b/docs/apidocs/chiquito/plonkish/ir/sc/struct.SuperCircuit.html new file mode 100644 index 00000000..ce9e8dbe --- /dev/null +++ b/docs/apidocs/chiquito/plonkish/ir/sc/struct.SuperCircuit.html @@ -0,0 +1,100 @@ +SuperCircuit in chiquito::plonkish::ir::sc - Rust
pub struct SuperCircuit<F, MappingArgs> { /* private fields */ }

Implementations§

source§

impl<F, MappingArgs> SuperCircuit<F, MappingArgs>

source

pub fn add_sub_circuit(&mut self, sub_circuit: Circuit<F>)

source

pub fn get_mapping(&self) -> MappingGenerator<F, MappingArgs>

source§

impl<F: Field + Hash, MappingArgs> SuperCircuit<F, MappingArgs>

source

pub fn set_mapping<M: Fn(&mut MappingContext<F>, MappingArgs) + 'static>( + &mut self, + mapping: M +)

source§

impl<F: Clone, MappingArgs> SuperCircuit<F, MappingArgs>

source

pub fn get_sub_circuits(&self) -> Vec<Circuit<F>>

Trait Implementations§

source§

impl<F, MappingArgs> Default for SuperCircuit<F, MappingArgs>

source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl<F, MappingArgs> !RefUnwindSafe for SuperCircuit<F, MappingArgs>

§

impl<F, MappingArgs> !Send for SuperCircuit<F, MappingArgs>

§

impl<F, MappingArgs> !Sync for SuperCircuit<F, MappingArgs>

§

impl<F, MappingArgs> Unpin for SuperCircuit<F, MappingArgs>where + F: Unpin,

§

impl<F, MappingArgs> !UnwindSafe for SuperCircuit<F, MappingArgs>

Blanket Implementations§

source§

impl<T> Any for Twhere + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Conv for T

§

fn conv<T>(self) -> Twhere + Self: Into<T>,

Converts self into T using Into<T>. Read more
§

impl<T> FmtForward for T

§

fn fmt_binary(self) -> FmtBinary<Self>where + Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
§

fn fmt_display(self) -> FmtDisplay<Self>where + Self: Display,

Causes self to use its Display implementation when +Debug-formatted.
§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>where + Self: LowerExp,

Causes self to use its LowerExp implementation when +Debug-formatted.
§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>where + Self: LowerHex,

Causes self to use its LowerHex implementation when +Debug-formatted.
§

fn fmt_octal(self) -> FmtOctal<Self>where + Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
§

fn fmt_pointer(self) -> FmtPointer<Self>where + Self: Pointer,

Causes self to use its Pointer implementation when +Debug-formatted.
§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>where + Self: UpperExp,

Causes self to use its UpperExp implementation when +Debug-formatted.
§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>where + Self: UpperHex,

Causes self to use its UpperHex implementation when +Debug-formatted.
§

fn fmt_list(self) -> FmtList<Self>where + &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
§

impl<T> Pipe for Twhere + T: ?Sized,

§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere + Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere + R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere + R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> Rwhere + Self: Borrow<B>, + B: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
§

fn pipe_borrow_mut<'a, B, R>( + &'a mut self, + func: impl FnOnce(&'a mut B) -> R +) -> Rwhere + Self: BorrowMut<B>, + B: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe +function. Read more
§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> Rwhere + Self: AsRef<U>, + U: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> Rwhere + Self: AsMut<U>, + U: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe +function.
§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> Rwhere + Self: Deref<Target = T>, + T: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.deref() into the pipe function.
§

fn pipe_deref_mut<'a, T, R>( + &'a mut self, + func: impl FnOnce(&'a mut T) -> R +) -> Rwhere + Self: DerefMut<Target = T> + Deref, + T: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe +function.
§

impl<T> Pointable for T

§

const ALIGN: usize = mem::align_of::<T>()

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
§

impl<T> Tap for T

§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Selfwhere + Self: Borrow<B>, + B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere + Self: BorrowMut<B>, + B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Selfwhere + Self: AsRef<R>, + R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere + Self: AsMut<R>, + R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Selfwhere + Self: Deref<Target = T>, + T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Selfwhere + Self: Borrow<B>, + B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere + Self: BorrowMut<B>, + B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release +builds.
§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Selfwhere + Self: AsRef<R>, + R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release +builds.
§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere + Self: AsMut<R>, + R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release +builds.
§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Selfwhere + Self: Deref<Target = T>, + T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release +builds.
§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release +builds.
§

impl<T> TryConv for T

§

fn try_conv<T>(self) -> Result<T, Self::Error>where + Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/docs/apidocs/chiquito/plonkish/ir/sc/type.Mapping.html b/docs/apidocs/chiquito/plonkish/ir/sc/type.Mapping.html new file mode 100644 index 00000000..ad622cad --- /dev/null +++ b/docs/apidocs/chiquito/plonkish/ir/sc/type.Mapping.html @@ -0,0 +1 @@ +Mapping in chiquito::plonkish::ir::sc - Rust

Type Definition chiquito::plonkish::ir::sc::Mapping

source ·
pub type Mapping<F, MappingArgs> = dyn Fn(&mut MappingContext<F>, MappingArgs) + 'static;
\ No newline at end of file diff --git a/docs/apidocs/chiquito/plonkish/ir/sc/type.SuperAssignments.html b/docs/apidocs/chiquito/plonkish/ir/sc/type.SuperAssignments.html new file mode 100644 index 00000000..67e02a44 --- /dev/null +++ b/docs/apidocs/chiquito/plonkish/ir/sc/type.SuperAssignments.html @@ -0,0 +1 @@ +SuperAssignments in chiquito::plonkish::ir::sc - Rust

Type Definition chiquito::plonkish::ir::sc::SuperAssignments

source ·
pub type SuperAssignments<F> = HashMap<u128, Assignments<F>>;
\ No newline at end of file diff --git a/docs/apidocs/chiquito/plonkish/ir/sidebar-items.js b/docs/apidocs/chiquito/plonkish/ir/sidebar-items.js new file mode 100644 index 00000000..088c1138 --- /dev/null +++ b/docs/apidocs/chiquito/plonkish/ir/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"enum":["ColumnType"],"mod":["assignments","query","sc"],"struct":["Circuit","Column","Poly","PolyLookup"],"type":["PolyExpr"]}; \ No newline at end of file diff --git a/docs/apidocs/chiquito/plonkish/ir/struct.Circuit.html b/docs/apidocs/chiquito/plonkish/ir/struct.Circuit.html new file mode 100644 index 00000000..8101d18e --- /dev/null +++ b/docs/apidocs/chiquito/plonkish/ir/struct.Circuit.html @@ -0,0 +1,111 @@ +Circuit in chiquito::plonkish::ir - Rust

Struct chiquito::plonkish::ir::Circuit

source ·
pub struct Circuit<F> {
+    pub columns: Vec<Column>,
+    pub exposed: Vec<(Column, i32)>,
+    pub polys: Vec<Poly<F>>,
+    pub lookups: Vec<PolyLookup<F>>,
+    pub fixed_assignments: Assignments<F>,
+    pub id: u128,
+    pub ast_id: u128,
+}

Fields§

§columns: Vec<Column>§exposed: Vec<(Column, i32)>§polys: Vec<Poly<F>>§lookups: Vec<PolyLookup<F>>§fixed_assignments: Assignments<F>§id: u128§ast_id: u128

Trait Implementations§

source§

impl<F: Clone> Clone for Circuit<F>

source§

fn clone(&self) -> Circuit<F>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<F: Debug> Debug for Circuit<F>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<F: Default> Default for Circuit<F>

source§

fn default() -> Circuit<F>

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl<F> RefUnwindSafe for Circuit<F>where + F: RefUnwindSafe,

§

impl<F> Send for Circuit<F>where + F: Send,

§

impl<F> Sync for Circuit<F>where + F: Sync,

§

impl<F> Unpin for Circuit<F>where + F: Unpin,

§

impl<F> UnwindSafe for Circuit<F>where + F: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for Twhere + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Conv for T

§

fn conv<T>(self) -> Twhere + Self: Into<T>,

Converts self into T using Into<T>. Read more
§

impl<T> FmtForward for T

§

fn fmt_binary(self) -> FmtBinary<Self>where + Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
§

fn fmt_display(self) -> FmtDisplay<Self>where + Self: Display,

Causes self to use its Display implementation when +Debug-formatted.
§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>where + Self: LowerExp,

Causes self to use its LowerExp implementation when +Debug-formatted.
§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>where + Self: LowerHex,

Causes self to use its LowerHex implementation when +Debug-formatted.
§

fn fmt_octal(self) -> FmtOctal<Self>where + Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
§

fn fmt_pointer(self) -> FmtPointer<Self>where + Self: Pointer,

Causes self to use its Pointer implementation when +Debug-formatted.
§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>where + Self: UpperExp,

Causes self to use its UpperExp implementation when +Debug-formatted.
§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>where + Self: UpperHex,

Causes self to use its UpperHex implementation when +Debug-formatted.
§

fn fmt_list(self) -> FmtList<Self>where + &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
§

impl<T> Pipe for Twhere + T: ?Sized,

§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere + Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere + R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere + R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> Rwhere + Self: Borrow<B>, + B: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
§

fn pipe_borrow_mut<'a, B, R>( + &'a mut self, + func: impl FnOnce(&'a mut B) -> R +) -> Rwhere + Self: BorrowMut<B>, + B: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe +function. Read more
§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> Rwhere + Self: AsRef<U>, + U: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> Rwhere + Self: AsMut<U>, + U: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe +function.
§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> Rwhere + Self: Deref<Target = T>, + T: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.deref() into the pipe function.
§

fn pipe_deref_mut<'a, T, R>( + &'a mut self, + func: impl FnOnce(&'a mut T) -> R +) -> Rwhere + Self: DerefMut<Target = T> + Deref, + T: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe +function.
§

impl<T> Pointable for T

§

const ALIGN: usize = mem::align_of::<T>()

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
§

impl<T> Tap for T

§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Selfwhere + Self: Borrow<B>, + B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere + Self: BorrowMut<B>, + B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Selfwhere + Self: AsRef<R>, + R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere + Self: AsMut<R>, + R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Selfwhere + Self: Deref<Target = T>, + T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Selfwhere + Self: Borrow<B>, + B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere + Self: BorrowMut<B>, + B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release +builds.
§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Selfwhere + Self: AsRef<R>, + R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release +builds.
§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere + Self: AsMut<R>, + R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release +builds.
§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Selfwhere + Self: Deref<Target = T>, + T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release +builds.
§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release +builds.
source§

impl<T> ToOwned for Twhere + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
§

impl<T> TryConv for T

§

fn try_conv<T>(self) -> Result<T, Self::Error>where + Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

impl<T> Ungil for Twhere + T: Send,

\ No newline at end of file diff --git a/docs/apidocs/chiquito/plonkish/ir/struct.Column.html b/docs/apidocs/chiquito/plonkish/ir/struct.Column.html new file mode 100644 index 00000000..701fd3d0 --- /dev/null +++ b/docs/apidocs/chiquito/plonkish/ir/struct.Column.html @@ -0,0 +1,119 @@ +Column in chiquito::plonkish::ir - Rust

Struct chiquito::plonkish::ir::Column

source ·
pub struct Column {
+    pub annotation: String,
+    pub ctype: ColumnType,
+    pub halo2_advice: Option<ImportedHalo2Advice>,
+    pub halo2_fixed: Option<ImportedHalo2Fixed>,
+    pub phase: usize,
+    /* private fields */
+}

Fields§

§annotation: String§ctype: ColumnType§halo2_advice: Option<ImportedHalo2Advice>§halo2_fixed: Option<ImportedHalo2Fixed>§phase: usize

Implementations§

source§

impl Column

source

pub fn advice<A: Into<String>>(annotation: A, phase: usize) -> Column

source

pub fn fixed<A: Into<String>>(annotation: A) -> Column

source

pub fn new_halo2_advice<A: Into<String>>( + annotation: A, + halo2_advice: ImportedHalo2Advice +) -> Column

source

pub fn new_halo2_fixed<A: Into<String>>( + annotation: A, + halo2_fixed: ImportedHalo2Fixed +) -> Column

source

pub fn uuid(&self) -> u128

source

pub fn query<F, A: Into<String>>( + &self, + rotation: i32, + annotation: A +) -> PolyExpr<F>

Trait Implementations§

source§

impl Clone for Column

source§

fn clone(&self) -> Column

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Column

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Hash for Column

source§

fn hash<H: Hasher>(&self, state: &mut H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)where + H: Hasher, + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl PartialEq<Column> for Column

source§

fn eq(&self, other: &Self) -> bool

This method tests for self and other values to be equal, and is used +by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason.
source§

impl Eq for Column

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Conv for T

§

fn conv<T>(self) -> Twhere + Self: Into<T>,

Converts self into T using Into<T>. Read more
§

impl<T> FmtForward for T

§

fn fmt_binary(self) -> FmtBinary<Self>where + Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
§

fn fmt_display(self) -> FmtDisplay<Self>where + Self: Display,

Causes self to use its Display implementation when +Debug-formatted.
§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>where + Self: LowerExp,

Causes self to use its LowerExp implementation when +Debug-formatted.
§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>where + Self: LowerHex,

Causes self to use its LowerHex implementation when +Debug-formatted.
§

fn fmt_octal(self) -> FmtOctal<Self>where + Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
§

fn fmt_pointer(self) -> FmtPointer<Self>where + Self: Pointer,

Causes self to use its Pointer implementation when +Debug-formatted.
§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>where + Self: UpperExp,

Causes self to use its UpperExp implementation when +Debug-formatted.
§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>where + Self: UpperHex,

Causes self to use its UpperHex implementation when +Debug-formatted.
§

fn fmt_list(self) -> FmtList<Self>where + &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
§

impl<T> Pipe for Twhere + T: ?Sized,

§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere + Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere + R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere + R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> Rwhere + Self: Borrow<B>, + B: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
§

fn pipe_borrow_mut<'a, B, R>( + &'a mut self, + func: impl FnOnce(&'a mut B) -> R +) -> Rwhere + Self: BorrowMut<B>, + B: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe +function. Read more
§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> Rwhere + Self: AsRef<U>, + U: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> Rwhere + Self: AsMut<U>, + U: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe +function.
§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> Rwhere + Self: Deref<Target = T>, + T: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.deref() into the pipe function.
§

fn pipe_deref_mut<'a, T, R>( + &'a mut self, + func: impl FnOnce(&'a mut T) -> R +) -> Rwhere + Self: DerefMut<Target = T> + Deref, + T: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe +function.
§

impl<T> Pointable for T

§

const ALIGN: usize = mem::align_of::<T>()

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
§

impl<T> Tap for T

§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Selfwhere + Self: Borrow<B>, + B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere + Self: BorrowMut<B>, + B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Selfwhere + Self: AsRef<R>, + R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere + Self: AsMut<R>, + R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Selfwhere + Self: Deref<Target = T>, + T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Selfwhere + Self: Borrow<B>, + B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere + Self: BorrowMut<B>, + B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release +builds.
§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Selfwhere + Self: AsRef<R>, + R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release +builds.
§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere + Self: AsMut<R>, + R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release +builds.
§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Selfwhere + Self: Deref<Target = T>, + T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release +builds.
§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release +builds.
source§

impl<T> ToOwned for Twhere + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
§

impl<T> TryConv for T

§

fn try_conv<T>(self) -> Result<T, Self::Error>where + Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

impl<T> Ungil for Twhere + T: Send,

\ No newline at end of file diff --git a/docs/apidocs/chiquito/plonkish/ir/struct.Poly.html b/docs/apidocs/chiquito/plonkish/ir/struct.Poly.html new file mode 100644 index 00000000..5925b3bf --- /dev/null +++ b/docs/apidocs/chiquito/plonkish/ir/struct.Poly.html @@ -0,0 +1,106 @@ +Poly in chiquito::plonkish::ir - Rust

Struct chiquito::plonkish::ir::Poly

source ·
pub struct Poly<F> {
+    pub annotation: String,
+    pub expr: PolyExpr<F>,
+}

Fields§

§annotation: String§expr: PolyExpr<F>

Trait Implementations§

source§

impl<F: Clone> Clone for Poly<F>

source§

fn clone(&self) -> Poly<F>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<F: Debug> Debug for Poly<F>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<F> RefUnwindSafe for Poly<F>where + F: RefUnwindSafe,

§

impl<F> Send for Poly<F>where + F: Send,

§

impl<F> Sync for Poly<F>where + F: Sync,

§

impl<F> Unpin for Poly<F>where + F: Unpin,

§

impl<F> UnwindSafe for Poly<F>where + F: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for Twhere + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Conv for T

§

fn conv<T>(self) -> Twhere + Self: Into<T>,

Converts self into T using Into<T>. Read more
§

impl<T> FmtForward for T

§

fn fmt_binary(self) -> FmtBinary<Self>where + Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
§

fn fmt_display(self) -> FmtDisplay<Self>where + Self: Display,

Causes self to use its Display implementation when +Debug-formatted.
§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>where + Self: LowerExp,

Causes self to use its LowerExp implementation when +Debug-formatted.
§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>where + Self: LowerHex,

Causes self to use its LowerHex implementation when +Debug-formatted.
§

fn fmt_octal(self) -> FmtOctal<Self>where + Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
§

fn fmt_pointer(self) -> FmtPointer<Self>where + Self: Pointer,

Causes self to use its Pointer implementation when +Debug-formatted.
§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>where + Self: UpperExp,

Causes self to use its UpperExp implementation when +Debug-formatted.
§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>where + Self: UpperHex,

Causes self to use its UpperHex implementation when +Debug-formatted.
§

fn fmt_list(self) -> FmtList<Self>where + &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
§

impl<T> Pipe for Twhere + T: ?Sized,

§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere + Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere + R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere + R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> Rwhere + Self: Borrow<B>, + B: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
§

fn pipe_borrow_mut<'a, B, R>( + &'a mut self, + func: impl FnOnce(&'a mut B) -> R +) -> Rwhere + Self: BorrowMut<B>, + B: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe +function. Read more
§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> Rwhere + Self: AsRef<U>, + U: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> Rwhere + Self: AsMut<U>, + U: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe +function.
§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> Rwhere + Self: Deref<Target = T>, + T: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.deref() into the pipe function.
§

fn pipe_deref_mut<'a, T, R>( + &'a mut self, + func: impl FnOnce(&'a mut T) -> R +) -> Rwhere + Self: DerefMut<Target = T> + Deref, + T: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe +function.
§

impl<T> Pointable for T

§

const ALIGN: usize = mem::align_of::<T>()

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
§

impl<T> Tap for T

§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Selfwhere + Self: Borrow<B>, + B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere + Self: BorrowMut<B>, + B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Selfwhere + Self: AsRef<R>, + R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere + Self: AsMut<R>, + R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Selfwhere + Self: Deref<Target = T>, + T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Selfwhere + Self: Borrow<B>, + B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere + Self: BorrowMut<B>, + B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release +builds.
§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Selfwhere + Self: AsRef<R>, + R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release +builds.
§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere + Self: AsMut<R>, + R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release +builds.
§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Selfwhere + Self: Deref<Target = T>, + T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release +builds.
§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release +builds.
source§

impl<T> ToOwned for Twhere + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
§

impl<T> TryConv for T

§

fn try_conv<T>(self) -> Result<T, Self::Error>where + Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

impl<T> Ungil for Twhere + T: Send,

\ No newline at end of file diff --git a/docs/apidocs/chiquito/plonkish/ir/struct.PolyLookup.html b/docs/apidocs/chiquito/plonkish/ir/struct.PolyLookup.html new file mode 100644 index 00000000..768425c6 --- /dev/null +++ b/docs/apidocs/chiquito/plonkish/ir/struct.PolyLookup.html @@ -0,0 +1,106 @@ +PolyLookup in chiquito::plonkish::ir - Rust
pub struct PolyLookup<F> {
+    pub annotation: String,
+    pub exprs: Vec<(PolyExpr<F>, PolyExpr<F>)>,
+}

Fields§

§annotation: String§exprs: Vec<(PolyExpr<F>, PolyExpr<F>)>

Trait Implementations§

source§

impl<F: Clone> Clone for PolyLookup<F>

source§

fn clone(&self) -> PolyLookup<F>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<F: Debug> Debug for PolyLookup<F>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<F> RefUnwindSafe for PolyLookup<F>where + F: RefUnwindSafe,

§

impl<F> Send for PolyLookup<F>where + F: Send,

§

impl<F> Sync for PolyLookup<F>where + F: Sync,

§

impl<F> Unpin for PolyLookup<F>where + F: Unpin,

§

impl<F> UnwindSafe for PolyLookup<F>where + F: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for Twhere + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Conv for T

§

fn conv<T>(self) -> Twhere + Self: Into<T>,

Converts self into T using Into<T>. Read more
§

impl<T> FmtForward for T

§

fn fmt_binary(self) -> FmtBinary<Self>where + Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
§

fn fmt_display(self) -> FmtDisplay<Self>where + Self: Display,

Causes self to use its Display implementation when +Debug-formatted.
§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>where + Self: LowerExp,

Causes self to use its LowerExp implementation when +Debug-formatted.
§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>where + Self: LowerHex,

Causes self to use its LowerHex implementation when +Debug-formatted.
§

fn fmt_octal(self) -> FmtOctal<Self>where + Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
§

fn fmt_pointer(self) -> FmtPointer<Self>where + Self: Pointer,

Causes self to use its Pointer implementation when +Debug-formatted.
§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>where + Self: UpperExp,

Causes self to use its UpperExp implementation when +Debug-formatted.
§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>where + Self: UpperHex,

Causes self to use its UpperHex implementation when +Debug-formatted.
§

fn fmt_list(self) -> FmtList<Self>where + &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
§

impl<T> Pipe for Twhere + T: ?Sized,

§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere + Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere + R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere + R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> Rwhere + Self: Borrow<B>, + B: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
§

fn pipe_borrow_mut<'a, B, R>( + &'a mut self, + func: impl FnOnce(&'a mut B) -> R +) -> Rwhere + Self: BorrowMut<B>, + B: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe +function. Read more
§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> Rwhere + Self: AsRef<U>, + U: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> Rwhere + Self: AsMut<U>, + U: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe +function.
§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> Rwhere + Self: Deref<Target = T>, + T: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.deref() into the pipe function.
§

fn pipe_deref_mut<'a, T, R>( + &'a mut self, + func: impl FnOnce(&'a mut T) -> R +) -> Rwhere + Self: DerefMut<Target = T> + Deref, + T: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe +function.
§

impl<T> Pointable for T

§

const ALIGN: usize = mem::align_of::<T>()

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
§

impl<T> Tap for T

§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Selfwhere + Self: Borrow<B>, + B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere + Self: BorrowMut<B>, + B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Selfwhere + Self: AsRef<R>, + R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere + Self: AsMut<R>, + R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Selfwhere + Self: Deref<Target = T>, + T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Selfwhere + Self: Borrow<B>, + B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere + Self: BorrowMut<B>, + B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release +builds.
§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Selfwhere + Self: AsRef<R>, + R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release +builds.
§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere + Self: AsMut<R>, + R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release +builds.
§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Selfwhere + Self: Deref<Target = T>, + T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release +builds.
§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release +builds.
source§

impl<T> ToOwned for Twhere + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
§

impl<T> TryConv for T

§

fn try_conv<T>(self) -> Result<T, Self::Error>where + Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

impl<T> Ungil for Twhere + T: Send,

\ No newline at end of file diff --git a/docs/apidocs/chiquito/plonkish/ir/type.PolyExpr.html b/docs/apidocs/chiquito/plonkish/ir/type.PolyExpr.html new file mode 100644 index 00000000..ba33161d --- /dev/null +++ b/docs/apidocs/chiquito/plonkish/ir/type.PolyExpr.html @@ -0,0 +1 @@ +PolyExpr in chiquito::plonkish::ir - Rust

Type Definition chiquito::plonkish::ir::PolyExpr

source ·
pub type PolyExpr<F> = Expr<F, Queriable>;

Implementations§

source§

impl<F: Clone> PolyExpr<F>

source

pub fn rotate(&self, rot: i32) -> PolyExpr<F>

\ No newline at end of file diff --git a/docs/apidocs/chiquito/plonkish/sidebar-items.js b/docs/apidocs/chiquito/plonkish/sidebar-items.js new file mode 100644 index 00000000..f25fa7b4 --- /dev/null +++ b/docs/apidocs/chiquito/plonkish/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"mod":["backend","compiler","ir"]}; \ No newline at end of file diff --git a/docs/apidocs/chiquito/poly/enum.Expr.html b/docs/apidocs/chiquito/poly/enum.Expr.html new file mode 100644 index 00000000..d95be62d --- /dev/null +++ b/docs/apidocs/chiquito/poly/enum.Expr.html @@ -0,0 +1,118 @@ +Expr in chiquito::poly - Rust

Enum chiquito::poly::Expr

source ·
pub enum Expr<F, V> {
+    Const(F),
+    Sum(Vec<Expr<F, V>>),
+    Mul(Vec<Expr<F, V>>),
+    Neg(Box<Expr<F, V>>),
+    Pow(Box<Expr<F, V>>, u32),
+    Query(V),
+    Halo2Expr(Expression<F>),
+}

Variants§

§

Const(F)

§

Sum(Vec<Expr<F, V>>)

§

Mul(Vec<Expr<F, V>>)

§

Neg(Box<Expr<F, V>>)

§

Pow(Box<Expr<F, V>>, u32)

§

Query(V)

§

Halo2Expr(Expression<F>)

Implementations§

source§

impl<F: Clone> Expr<F, (Column, i32, String)>

source

pub fn rotate(&self, rot: i32) -> PolyExpr<F>

source§

impl<F: Field + Hash, V: Eq + PartialEq + Hash> Expr<F, V>

source

pub fn eval(&self, assignments: &VarAssignments<F, V>) -> Option<F>

Trait Implementations§

source§

impl<F, V, RHS: Into<Expr<F, V>>> Add<RHS> for Expr<F, V>

§

type Output = Expr<F, V>

The resulting type after applying the + operator.
source§

fn add(self, rhs: RHS) -> Self

Performs the + operation. Read more
source§

impl<F: Clone, V: Clone> Clone for Expr<F, V>

source§

fn clone(&self) -> Expr<F, V>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<F: Debug, V: Debug> Debug for Expr<F, V>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for Expr<Fr, Queriable<Fr>>

source§

fn deserialize<D>(deserializer: D) -> Result<Expr<Fr, Queriable<Fr>>, D::Error>where + D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl<F: Debug> From<Expr<F, Queriable<F>>> for Constraint<F>

source§

fn from(expr: ASTExpr<F>) -> Self

Converts to this type from the input type.
source§

impl<F, V> From<Expression<F>> for Expr<F, V>

source§

fn from(value: Expression<F>) -> Self

Converts to this type from the input type.
source§

impl<F: From<u64>, V> From<bool> for Expr<F, V>

source§

fn from(value: bool) -> Self

Converts to this type from the input type.
source§

impl<F: Field + From<u64>, V> From<i32> for Expr<F, V>

source§

fn from(value: i32) -> Self

Converts to this type from the input type.
source§

impl<F: From<u64>, V> From<u32> for Expr<F, V>

source§

fn from(value: u32) -> Self

Converts to this type from the input type.
source§

impl<F: From<u64>, V> From<u64> for Expr<F, V>

source§

fn from(value: u64) -> Self

Converts to this type from the input type.
source§

impl<F: From<u64>, V> From<u8> for Expr<F, V>

source§

fn from(value: u8) -> Self

Converts to this type from the input type.
source§

impl<F: From<u64>, V> From<usize> for Expr<F, V>

source§

fn from(value: usize) -> Self

Converts to this type from the input type.
source§

impl<F, V, RHS: Into<Expr<F, V>>> Mul<RHS> for Expr<F, V>

§

type Output = Expr<F, V>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: RHS) -> Self

Performs the * operation. Read more
source§

impl<F, V> Neg for Expr<F, V>

§

type Output = Expr<F, V>

The resulting type after applying the - operator.
source§

fn neg(self) -> Self

Performs the unary - operation. Read more
source§

impl<F, V, RHS: Into<Expr<F, V>>> Sub<RHS> for Expr<F, V>

§

type Output = Expr<F, V>

The resulting type after applying the - operator.
source§

fn sub(self, rhs: RHS) -> Self

Performs the - operation. Read more
source§

impl<F: Clone, V: Clone> ToExpr<F, V> for Expr<F, V>

source§

fn expr(&self) -> Expr<F, V>

Auto Trait Implementations§

§

impl<F, V> RefUnwindSafe for Expr<F, V>where + F: RefUnwindSafe, + V: RefUnwindSafe,

§

impl<F, V> Send for Expr<F, V>where + F: Send, + V: Send,

§

impl<F, V> Sync for Expr<F, V>where + F: Sync, + V: Sync,

§

impl<F, V> Unpin for Expr<F, V>where + F: Unpin, + V: Unpin,

§

impl<F, V> UnwindSafe for Expr<F, V>where + F: UnwindSafe, + V: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for Twhere + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Conv for T

§

fn conv<T>(self) -> Twhere + Self: Into<T>,

Converts self into T using Into<T>. Read more
§

impl<T> FmtForward for T

§

fn fmt_binary(self) -> FmtBinary<Self>where + Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
§

fn fmt_display(self) -> FmtDisplay<Self>where + Self: Display,

Causes self to use its Display implementation when +Debug-formatted.
§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>where + Self: LowerExp,

Causes self to use its LowerExp implementation when +Debug-formatted.
§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>where + Self: LowerHex,

Causes self to use its LowerHex implementation when +Debug-formatted.
§

fn fmt_octal(self) -> FmtOctal<Self>where + Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
§

fn fmt_pointer(self) -> FmtPointer<Self>where + Self: Pointer,

Causes self to use its Pointer implementation when +Debug-formatted.
§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>where + Self: UpperExp,

Causes self to use its UpperExp implementation when +Debug-formatted.
§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>where + Self: UpperHex,

Causes self to use its UpperHex implementation when +Debug-formatted.
§

fn fmt_list(self) -> FmtList<Self>where + &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
§

impl<T> Pipe for Twhere + T: ?Sized,

§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere + Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere + R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere + R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> Rwhere + Self: Borrow<B>, + B: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
§

fn pipe_borrow_mut<'a, B, R>( + &'a mut self, + func: impl FnOnce(&'a mut B) -> R +) -> Rwhere + Self: BorrowMut<B>, + B: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe +function. Read more
§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> Rwhere + Self: AsRef<U>, + U: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> Rwhere + Self: AsMut<U>, + U: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe +function.
§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> Rwhere + Self: Deref<Target = T>, + T: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.deref() into the pipe function.
§

fn pipe_deref_mut<'a, T, R>( + &'a mut self, + func: impl FnOnce(&'a mut T) -> R +) -> Rwhere + Self: DerefMut<Target = T> + Deref, + T: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe +function.
§

impl<T> Pointable for T

§

const ALIGN: usize = mem::align_of::<T>()

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
§

impl<T> Tap for T

§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Selfwhere + Self: Borrow<B>, + B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere + Self: BorrowMut<B>, + B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Selfwhere + Self: AsRef<R>, + R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere + Self: AsMut<R>, + R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Selfwhere + Self: Deref<Target = T>, + T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Selfwhere + Self: Borrow<B>, + B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere + Self: BorrowMut<B>, + B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release +builds.
§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Selfwhere + Self: AsRef<R>, + R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release +builds.
§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere + Self: AsMut<R>, + R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release +builds.
§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Selfwhere + Self: Deref<Target = T>, + T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release +builds.
§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release +builds.
source§

impl<T> ToOwned for Twhere + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
§

impl<T> TryConv for T

§

fn try_conv<T>(self) -> Result<T, Self::Error>where + Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for Twhere + T: for<'de> Deserialize<'de>,

§

impl<T> Ungil for Twhere + T: Send,

\ No newline at end of file diff --git a/docs/apidocs/chiquito/poly/index.html b/docs/apidocs/chiquito/poly/index.html new file mode 100644 index 00000000..adc5fcd0 --- /dev/null +++ b/docs/apidocs/chiquito/poly/index.html @@ -0,0 +1 @@ +chiquito::poly - Rust

Module chiquito::poly

source ·

Enums

Traits

Type Definitions

\ No newline at end of file diff --git a/docs/apidocs/chiquito/poly/sidebar-items.js b/docs/apidocs/chiquito/poly/sidebar-items.js new file mode 100644 index 00000000..5824d217 --- /dev/null +++ b/docs/apidocs/chiquito/poly/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"enum":["Expr"],"trait":["ToExpr","ToField"],"type":["VarAssignments"]}; \ No newline at end of file diff --git a/docs/apidocs/chiquito/poly/trait.ToExpr.html b/docs/apidocs/chiquito/poly/trait.ToExpr.html new file mode 100644 index 00000000..3e39f421 --- /dev/null +++ b/docs/apidocs/chiquito/poly/trait.ToExpr.html @@ -0,0 +1,4 @@ +ToExpr in chiquito::poly - Rust

Trait chiquito::poly::ToExpr

source ·
pub trait ToExpr<F, V> {
+    // Required method
+    fn expr(&self) -> Expr<F, V>;
+}

Required Methods§

source

fn expr(&self) -> Expr<F, V>

Implementations on Foreign Types§

source§

impl<F: From<u64>, V> ToExpr<F, V> for usize

source§

fn expr(&self) -> Expr<F, V>

source§

impl<F: From<u64>, V> ToExpr<F, V> for u32

source§

fn expr(&self) -> Expr<F, V>

source§

impl<F: Field + From<u64>, V> ToExpr<F, V> for i32

source§

fn expr(&self) -> Expr<F, V>

source§

impl<F: From<u64>, V> ToExpr<F, V> for u8

source§

fn expr(&self) -> Expr<F, V>

source§

impl<F: From<u64>, V> ToExpr<F, V> for bool

source§

fn expr(&self) -> Expr<F, V>

source§

impl<F: From<u64>, V> ToExpr<F, V> for u64

source§

fn expr(&self) -> Expr<F, V>

Implementors§

source§

impl<F: Clone> ToExpr<F, Queriable<F>> for Queriable<F>

source§

impl<F: Clone, V: Clone> ToExpr<F, V> for Expr<F, V>

\ No newline at end of file diff --git a/docs/apidocs/chiquito/poly/trait.ToField.html b/docs/apidocs/chiquito/poly/trait.ToField.html new file mode 100644 index 00000000..62a6efa5 --- /dev/null +++ b/docs/apidocs/chiquito/poly/trait.ToField.html @@ -0,0 +1,4 @@ +ToField in chiquito::poly - Rust

Trait chiquito::poly::ToField

source ·
pub trait ToField<F> {
+    // Required method
+    fn field(&self) -> F;
+}

Required Methods§

source

fn field(&self) -> F

Implementations on Foreign Types§

source§

impl<F: From<u64>> ToField<F> for bool

source§

fn field(&self) -> F

source§

impl<F: From<u64>> ToField<F> for u8

source§

fn field(&self) -> F

source§

impl<F: From<u64>> ToField<F> for usize

source§

fn field(&self) -> F

source§

impl<F: Field + From<u64>> ToField<F> for i32

source§

fn field(&self) -> F

source§

impl<F: From<u64>> ToField<F> for u32

source§

fn field(&self) -> F

source§

impl<F: From<u64>> ToField<F> for u64

source§

fn field(&self) -> F

Implementors§

\ No newline at end of file diff --git a/docs/apidocs/chiquito/poly/type.VarAssignments.html b/docs/apidocs/chiquito/poly/type.VarAssignments.html new file mode 100644 index 00000000..f8d002da --- /dev/null +++ b/docs/apidocs/chiquito/poly/type.VarAssignments.html @@ -0,0 +1 @@ +VarAssignments in chiquito::poly - Rust

Type Definition chiquito::poly::VarAssignments

source ·
pub type VarAssignments<F, V> = HashMap<V, F>;
\ No newline at end of file diff --git a/docs/apidocs/chiquito/sidebar-items.js b/docs/apidocs/chiquito/sidebar-items.js new file mode 100644 index 00000000..9df3204e --- /dev/null +++ b/docs/apidocs/chiquito/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"mod":["ast","field","frontend","plonkish","poly","stdlib","wit_gen"]}; \ No newline at end of file diff --git a/docs/apidocs/chiquito/stdlib/index.html b/docs/apidocs/chiquito/stdlib/index.html new file mode 100644 index 00000000..6fe1044e --- /dev/null +++ b/docs/apidocs/chiquito/stdlib/index.html @@ -0,0 +1 @@ +chiquito::stdlib - Rust

Module chiquito::stdlib

source ·

Structs

\ No newline at end of file diff --git a/docs/apidocs/chiquito/stdlib/sidebar-items.js b/docs/apidocs/chiquito/stdlib/sidebar-items.js new file mode 100644 index 00000000..d66a0235 --- /dev/null +++ b/docs/apidocs/chiquito/stdlib/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"struct":["IsZero"]}; \ No newline at end of file diff --git a/docs/apidocs/chiquito/stdlib/struct.IsZero.html b/docs/apidocs/chiquito/stdlib/struct.IsZero.html new file mode 100644 index 00000000..74e5b3cf --- /dev/null +++ b/docs/apidocs/chiquito/stdlib/struct.IsZero.html @@ -0,0 +1,106 @@ +IsZero in chiquito::stdlib - Rust

Struct chiquito::stdlib::IsZero

source ·
pub struct IsZero<F> { /* private fields */ }

Implementations§

source§

impl<F: Field + From<u64>> IsZero<F>

source

pub fn setup<V: Into<Constraint<F>>>( + ctx: &mut StepTypeContext<F>, + value: V, + value_inv: Queriable<F> +) -> IsZero<F>

source

pub fn is_zero(&self) -> Constraint<F>

source§

impl<F: Field + Eq + Hash> IsZero<F>

source

pub fn wg<WGC>(&self, ctx: &mut StepInstance<F>, value: F)

Auto Trait Implementations§

§

impl<F> RefUnwindSafe for IsZero<F>where + F: RefUnwindSafe,

§

impl<F> Send for IsZero<F>where + F: Send,

§

impl<F> Sync for IsZero<F>where + F: Sync,

§

impl<F> Unpin for IsZero<F>where + F: Unpin,

§

impl<F> UnwindSafe for IsZero<F>where + F: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for Twhere + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Conv for T

§

fn conv<T>(self) -> Twhere + Self: Into<T>,

Converts self into T using Into<T>. Read more
§

impl<T> FmtForward for T

§

fn fmt_binary(self) -> FmtBinary<Self>where + Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
§

fn fmt_display(self) -> FmtDisplay<Self>where + Self: Display,

Causes self to use its Display implementation when +Debug-formatted.
§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>where + Self: LowerExp,

Causes self to use its LowerExp implementation when +Debug-formatted.
§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>where + Self: LowerHex,

Causes self to use its LowerHex implementation when +Debug-formatted.
§

fn fmt_octal(self) -> FmtOctal<Self>where + Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
§

fn fmt_pointer(self) -> FmtPointer<Self>where + Self: Pointer,

Causes self to use its Pointer implementation when +Debug-formatted.
§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>where + Self: UpperExp,

Causes self to use its UpperExp implementation when +Debug-formatted.
§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>where + Self: UpperHex,

Causes self to use its UpperHex implementation when +Debug-formatted.
§

fn fmt_list(self) -> FmtList<Self>where + &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
§

impl<T> Pipe for Twhere + T: ?Sized,

§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere + Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere + R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere + R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> Rwhere + Self: Borrow<B>, + B: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
§

fn pipe_borrow_mut<'a, B, R>( + &'a mut self, + func: impl FnOnce(&'a mut B) -> R +) -> Rwhere + Self: BorrowMut<B>, + B: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe +function. Read more
§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> Rwhere + Self: AsRef<U>, + U: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> Rwhere + Self: AsMut<U>, + U: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe +function.
§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> Rwhere + Self: Deref<Target = T>, + T: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.deref() into the pipe function.
§

fn pipe_deref_mut<'a, T, R>( + &'a mut self, + func: impl FnOnce(&'a mut T) -> R +) -> Rwhere + Self: DerefMut<Target = T> + Deref, + T: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe +function.
§

impl<T> Pointable for T

§

const ALIGN: usize = mem::align_of::<T>()

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
§

impl<T> Tap for T

§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Selfwhere + Self: Borrow<B>, + B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere + Self: BorrowMut<B>, + B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Selfwhere + Self: AsRef<R>, + R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere + Self: AsMut<R>, + R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Selfwhere + Self: Deref<Target = T>, + T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Selfwhere + Self: Borrow<B>, + B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere + Self: BorrowMut<B>, + B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release +builds.
§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Selfwhere + Self: AsRef<R>, + R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release +builds.
§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere + Self: AsMut<R>, + R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release +builds.
§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Selfwhere + Self: Deref<Target = T>, + T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release +builds.
§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release +builds.
§

impl<T> TryConv for T

§

fn try_conv<T>(self) -> Result<T, Self::Error>where + Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

impl<T> Ungil for Twhere + T: Send,

\ No newline at end of file diff --git a/docs/apidocs/chiquito/wit_gen/index.html b/docs/apidocs/chiquito/wit_gen/index.html new file mode 100644 index 00000000..16d1d5ae --- /dev/null +++ b/docs/apidocs/chiquito/wit_gen/index.html @@ -0,0 +1,3 @@ +chiquito::wit_gen - Rust

Module chiquito::wit_gen

source ·

Structs

Type Definitions

\ No newline at end of file diff --git a/docs/apidocs/chiquito/wit_gen/sidebar-items.js b/docs/apidocs/chiquito/wit_gen/sidebar-items.js new file mode 100644 index 00000000..bb1bb63b --- /dev/null +++ b/docs/apidocs/chiquito/wit_gen/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"struct":["AutoTraceGenerator","FixedGenContext","StepInstance","TraceContext","TraceGenerator","TraceWitness"],"type":["FixedAssignment","Trace","Witness"]}; \ No newline at end of file diff --git a/docs/apidocs/chiquito/wit_gen/struct.AutoTraceGenerator.html b/docs/apidocs/chiquito/wit_gen/struct.AutoTraceGenerator.html new file mode 100644 index 00000000..f0618e66 --- /dev/null +++ b/docs/apidocs/chiquito/wit_gen/struct.AutoTraceGenerator.html @@ -0,0 +1,103 @@ +AutoTraceGenerator in chiquito::wit_gen - Rust
pub struct AutoTraceGenerator<F> { /* private fields */ }

Implementations§

source§

impl<F: Field + Eq + PartialEq + Hash + Clone> AutoTraceGenerator<F>

source

pub fn generate(&self, witness: TraceWitness<F>) -> TraceWitness<F>

Trait Implementations§

source§

impl<F: Clone> Clone for AutoTraceGenerator<F>

source§

fn clone(&self) -> AutoTraceGenerator<F>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<F: Debug> Debug for AutoTraceGenerator<F>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<F> Default for AutoTraceGenerator<F>

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl<F: Clone, TraceArgs> From<&Circuit<F, TraceArgs>> for AutoTraceGenerator<F>

source§

fn from(circuit: &Circuit<F, TraceArgs>) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

§

impl<F> RefUnwindSafe for AutoTraceGenerator<F>where + F: RefUnwindSafe,

§

impl<F> Send for AutoTraceGenerator<F>where + F: Send,

§

impl<F> Sync for AutoTraceGenerator<F>where + F: Sync,

§

impl<F> Unpin for AutoTraceGenerator<F>where + F: Unpin,

§

impl<F> UnwindSafe for AutoTraceGenerator<F>where + F: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for Twhere + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Conv for T

§

fn conv<T>(self) -> Twhere + Self: Into<T>,

Converts self into T using Into<T>. Read more
§

impl<T> FmtForward for T

§

fn fmt_binary(self) -> FmtBinary<Self>where + Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
§

fn fmt_display(self) -> FmtDisplay<Self>where + Self: Display,

Causes self to use its Display implementation when +Debug-formatted.
§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>where + Self: LowerExp,

Causes self to use its LowerExp implementation when +Debug-formatted.
§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>where + Self: LowerHex,

Causes self to use its LowerHex implementation when +Debug-formatted.
§

fn fmt_octal(self) -> FmtOctal<Self>where + Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
§

fn fmt_pointer(self) -> FmtPointer<Self>where + Self: Pointer,

Causes self to use its Pointer implementation when +Debug-formatted.
§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>where + Self: UpperExp,

Causes self to use its UpperExp implementation when +Debug-formatted.
§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>where + Self: UpperHex,

Causes self to use its UpperHex implementation when +Debug-formatted.
§

fn fmt_list(self) -> FmtList<Self>where + &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
§

impl<T> Pipe for Twhere + T: ?Sized,

§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere + Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere + R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere + R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> Rwhere + Self: Borrow<B>, + B: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
§

fn pipe_borrow_mut<'a, B, R>( + &'a mut self, + func: impl FnOnce(&'a mut B) -> R +) -> Rwhere + Self: BorrowMut<B>, + B: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe +function. Read more
§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> Rwhere + Self: AsRef<U>, + U: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> Rwhere + Self: AsMut<U>, + U: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe +function.
§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> Rwhere + Self: Deref<Target = T>, + T: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.deref() into the pipe function.
§

fn pipe_deref_mut<'a, T, R>( + &'a mut self, + func: impl FnOnce(&'a mut T) -> R +) -> Rwhere + Self: DerefMut<Target = T> + Deref, + T: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe +function.
§

impl<T> Pointable for T

§

const ALIGN: usize = mem::align_of::<T>()

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
§

impl<T> Tap for T

§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Selfwhere + Self: Borrow<B>, + B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere + Self: BorrowMut<B>, + B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Selfwhere + Self: AsRef<R>, + R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere + Self: AsMut<R>, + R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Selfwhere + Self: Deref<Target = T>, + T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Selfwhere + Self: Borrow<B>, + B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere + Self: BorrowMut<B>, + B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release +builds.
§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Selfwhere + Self: AsRef<R>, + R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release +builds.
§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere + Self: AsMut<R>, + R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release +builds.
§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Selfwhere + Self: Deref<Target = T>, + T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release +builds.
§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release +builds.
source§

impl<T> ToOwned for Twhere + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
§

impl<T> TryConv for T

§

fn try_conv<T>(self) -> Result<T, Self::Error>where + Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

impl<T> Ungil for Twhere + T: Send,

\ No newline at end of file diff --git a/docs/apidocs/chiquito/wit_gen/struct.FixedGenContext.html b/docs/apidocs/chiquito/wit_gen/struct.FixedGenContext.html new file mode 100644 index 00000000..d3166934 --- /dev/null +++ b/docs/apidocs/chiquito/wit_gen/struct.FixedGenContext.html @@ -0,0 +1,106 @@ +FixedGenContext in chiquito::wit_gen - Rust
pub struct FixedGenContext<F> { /* private fields */ }
Expand description

A struct that can be used a fixed column generation context. It provides an interface for +assigning values to fixed columns in a circuit at the specified offset.

+

Implementations§

source§

impl<F: Field + Hash> FixedGenContext<F>

source

pub fn new(num_steps: usize) -> Self

source

pub fn assign(&mut self, offset: usize, lhs: Queriable<F>, rhs: F)

Takes a Queriable object representing the fixed column (lhs) and the value (rhs) to be +assigned.

+
source

pub fn get_assignments(self) -> FixedAssignment<F>

Auto Trait Implementations§

§

impl<F> RefUnwindSafe for FixedGenContext<F>where + F: RefUnwindSafe,

§

impl<F> Send for FixedGenContext<F>where + F: Send,

§

impl<F> Sync for FixedGenContext<F>where + F: Sync,

§

impl<F> Unpin for FixedGenContext<F>where + F: Unpin,

§

impl<F> UnwindSafe for FixedGenContext<F>where + F: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for Twhere + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Conv for T

§

fn conv<T>(self) -> Twhere + Self: Into<T>,

Converts self into T using Into<T>. Read more
§

impl<T> FmtForward for T

§

fn fmt_binary(self) -> FmtBinary<Self>where + Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
§

fn fmt_display(self) -> FmtDisplay<Self>where + Self: Display,

Causes self to use its Display implementation when +Debug-formatted.
§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>where + Self: LowerExp,

Causes self to use its LowerExp implementation when +Debug-formatted.
§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>where + Self: LowerHex,

Causes self to use its LowerHex implementation when +Debug-formatted.
§

fn fmt_octal(self) -> FmtOctal<Self>where + Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
§

fn fmt_pointer(self) -> FmtPointer<Self>where + Self: Pointer,

Causes self to use its Pointer implementation when +Debug-formatted.
§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>where + Self: UpperExp,

Causes self to use its UpperExp implementation when +Debug-formatted.
§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>where + Self: UpperHex,

Causes self to use its UpperHex implementation when +Debug-formatted.
§

fn fmt_list(self) -> FmtList<Self>where + &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
§

impl<T> Pipe for Twhere + T: ?Sized,

§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere + Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere + R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere + R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> Rwhere + Self: Borrow<B>, + B: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
§

fn pipe_borrow_mut<'a, B, R>( + &'a mut self, + func: impl FnOnce(&'a mut B) -> R +) -> Rwhere + Self: BorrowMut<B>, + B: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe +function. Read more
§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> Rwhere + Self: AsRef<U>, + U: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> Rwhere + Self: AsMut<U>, + U: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe +function.
§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> Rwhere + Self: Deref<Target = T>, + T: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.deref() into the pipe function.
§

fn pipe_deref_mut<'a, T, R>( + &'a mut self, + func: impl FnOnce(&'a mut T) -> R +) -> Rwhere + Self: DerefMut<Target = T> + Deref, + T: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe +function.
§

impl<T> Pointable for T

§

const ALIGN: usize = mem::align_of::<T>()

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
§

impl<T> Tap for T

§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Selfwhere + Self: Borrow<B>, + B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere + Self: BorrowMut<B>, + B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Selfwhere + Self: AsRef<R>, + R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere + Self: AsMut<R>, + R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Selfwhere + Self: Deref<Target = T>, + T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Selfwhere + Self: Borrow<B>, + B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere + Self: BorrowMut<B>, + B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release +builds.
§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Selfwhere + Self: AsRef<R>, + R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release +builds.
§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere + Self: AsMut<R>, + R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release +builds.
§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Selfwhere + Self: Deref<Target = T>, + T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release +builds.
§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release +builds.
§

impl<T> TryConv for T

§

fn try_conv<T>(self) -> Result<T, Self::Error>where + Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

impl<T> Ungil for Twhere + T: Send,

\ No newline at end of file diff --git a/docs/apidocs/chiquito/wit_gen/struct.StepInstance.html b/docs/apidocs/chiquito/wit_gen/struct.StepInstance.html new file mode 100644 index 00000000..e28e3228 --- /dev/null +++ b/docs/apidocs/chiquito/wit_gen/struct.StepInstance.html @@ -0,0 +1,113 @@ +StepInstance in chiquito::wit_gen - Rust
pub struct StepInstance<F> {
+    pub step_type_uuid: StepTypeUUID,
+    pub assignments: HashMap<Queriable<F>, F>,
+}
Expand description

A struct that represents a witness generation context. It provides an interface for assigning +values to witness columns in a circuit.

+

Fields§

§step_type_uuid: StepTypeUUID§assignments: HashMap<Queriable<F>, F>

Implementations§

source§

impl<F> StepInstance<F>

source

pub fn new(step_type_uuid: StepTypeUUID) -> StepInstance<F>

source§

impl<F: Eq + Hash> StepInstance<F>

source

pub fn assign(&mut self, lhs: Queriable<F>, rhs: F)

Takes a Queriable object representing the witness column (lhs) and the value (rhs) to be +assigned.

+

Trait Implementations§

source§

impl<F: Clone> Clone for StepInstance<F>

source§

fn clone(&self) -> StepInstance<F>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<F: Debug> Debug for StepInstance<F>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<F: Default> Default for StepInstance<F>

source§

fn default() -> StepInstance<F>

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for StepInstance<Fr>

source§

fn deserialize<D>(deserializer: D) -> Result<StepInstance<Fr>, D::Error>where + D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl<F: Debug> Display for StepInstance<F>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<F> RefUnwindSafe for StepInstance<F>where + F: RefUnwindSafe,

§

impl<F> Send for StepInstance<F>where + F: Send,

§

impl<F> Sync for StepInstance<F>where + F: Sync,

§

impl<F> Unpin for StepInstance<F>where + F: Unpin,

§

impl<F> UnwindSafe for StepInstance<F>where + F: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for Twhere + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Conv for T

§

fn conv<T>(self) -> Twhere + Self: Into<T>,

Converts self into T using Into<T>. Read more
§

impl<T> FmtForward for T

§

fn fmt_binary(self) -> FmtBinary<Self>where + Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
§

fn fmt_display(self) -> FmtDisplay<Self>where + Self: Display,

Causes self to use its Display implementation when +Debug-formatted.
§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>where + Self: LowerExp,

Causes self to use its LowerExp implementation when +Debug-formatted.
§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>where + Self: LowerHex,

Causes self to use its LowerHex implementation when +Debug-formatted.
§

fn fmt_octal(self) -> FmtOctal<Self>where + Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
§

fn fmt_pointer(self) -> FmtPointer<Self>where + Self: Pointer,

Causes self to use its Pointer implementation when +Debug-formatted.
§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>where + Self: UpperExp,

Causes self to use its UpperExp implementation when +Debug-formatted.
§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>where + Self: UpperHex,

Causes self to use its UpperHex implementation when +Debug-formatted.
§

fn fmt_list(self) -> FmtList<Self>where + &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
§

impl<T> Pipe for Twhere + T: ?Sized,

§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere + Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere + R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere + R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> Rwhere + Self: Borrow<B>, + B: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
§

fn pipe_borrow_mut<'a, B, R>( + &'a mut self, + func: impl FnOnce(&'a mut B) -> R +) -> Rwhere + Self: BorrowMut<B>, + B: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe +function. Read more
§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> Rwhere + Self: AsRef<U>, + U: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> Rwhere + Self: AsMut<U>, + U: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe +function.
§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> Rwhere + Self: Deref<Target = T>, + T: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.deref() into the pipe function.
§

fn pipe_deref_mut<'a, T, R>( + &'a mut self, + func: impl FnOnce(&'a mut T) -> R +) -> Rwhere + Self: DerefMut<Target = T> + Deref, + T: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe +function.
§

impl<T> Pointable for T

§

const ALIGN: usize = mem::align_of::<T>()

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
§

impl<T> Tap for T

§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Selfwhere + Self: Borrow<B>, + B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere + Self: BorrowMut<B>, + B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Selfwhere + Self: AsRef<R>, + R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere + Self: AsMut<R>, + R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Selfwhere + Self: Deref<Target = T>, + T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Selfwhere + Self: Borrow<B>, + B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere + Self: BorrowMut<B>, + B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release +builds.
§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Selfwhere + Self: AsRef<R>, + R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release +builds.
§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere + Self: AsMut<R>, + R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release +builds.
§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Selfwhere + Self: Deref<Target = T>, + T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release +builds.
§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release +builds.
source§

impl<T> ToOwned for Twhere + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for Twhere + T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
§

impl<T> TryConv for T

§

fn try_conv<T>(self) -> Result<T, Self::Error>where + Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for Twhere + T: for<'de> Deserialize<'de>,

§

impl<T> Ungil for Twhere + T: Send,

\ No newline at end of file diff --git a/docs/apidocs/chiquito/wit_gen/struct.TraceContext.html b/docs/apidocs/chiquito/wit_gen/struct.TraceContext.html new file mode 100644 index 00000000..4b093528 --- /dev/null +++ b/docs/apidocs/chiquito/wit_gen/struct.TraceContext.html @@ -0,0 +1,110 @@ +TraceContext in chiquito::wit_gen - Rust
pub struct TraceContext<F> { /* private fields */ }

Implementations§

source§

impl<F: Default> TraceContext<F>

source

pub fn new(num_steps: usize) -> Self

source

pub fn get_witness(self) -> TraceWitness<F>

source§

impl<F> TraceContext<F>

source

pub fn add<Args, WG: Fn(&mut StepInstance<F>, Args) + 'static>( + &mut self, + step: &StepTypeWGHandler<F, Args, WG>, + args: Args +)

source

pub fn padding<Args, WG: Fn(&mut StepInstance<F>, Args) + 'static>( + &mut self, + step: &StepTypeWGHandler<F, Args, WG>, + args_fn: impl Fn() -> Args +)

Trait Implementations§

source§

impl<F: Debug> Debug for TraceContext<F>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<F> RefUnwindSafe for TraceContext<F>where + F: RefUnwindSafe,

§

impl<F> Send for TraceContext<F>where + F: Send,

§

impl<F> Sync for TraceContext<F>where + F: Sync,

§

impl<F> Unpin for TraceContext<F>where + F: Unpin,

§

impl<F> UnwindSafe for TraceContext<F>where + F: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for Twhere + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Conv for T

§

fn conv<T>(self) -> Twhere + Self: Into<T>,

Converts self into T using Into<T>. Read more
§

impl<T> FmtForward for T

§

fn fmt_binary(self) -> FmtBinary<Self>where + Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
§

fn fmt_display(self) -> FmtDisplay<Self>where + Self: Display,

Causes self to use its Display implementation when +Debug-formatted.
§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>where + Self: LowerExp,

Causes self to use its LowerExp implementation when +Debug-formatted.
§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>where + Self: LowerHex,

Causes self to use its LowerHex implementation when +Debug-formatted.
§

fn fmt_octal(self) -> FmtOctal<Self>where + Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
§

fn fmt_pointer(self) -> FmtPointer<Self>where + Self: Pointer,

Causes self to use its Pointer implementation when +Debug-formatted.
§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>where + Self: UpperExp,

Causes self to use its UpperExp implementation when +Debug-formatted.
§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>where + Self: UpperHex,

Causes self to use its UpperHex implementation when +Debug-formatted.
§

fn fmt_list(self) -> FmtList<Self>where + &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
§

impl<T> Pipe for Twhere + T: ?Sized,

§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere + Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere + R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere + R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> Rwhere + Self: Borrow<B>, + B: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
§

fn pipe_borrow_mut<'a, B, R>( + &'a mut self, + func: impl FnOnce(&'a mut B) -> R +) -> Rwhere + Self: BorrowMut<B>, + B: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe +function. Read more
§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> Rwhere + Self: AsRef<U>, + U: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> Rwhere + Self: AsMut<U>, + U: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe +function.
§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> Rwhere + Self: Deref<Target = T>, + T: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.deref() into the pipe function.
§

fn pipe_deref_mut<'a, T, R>( + &'a mut self, + func: impl FnOnce(&'a mut T) -> R +) -> Rwhere + Self: DerefMut<Target = T> + Deref, + T: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe +function.
§

impl<T> Pointable for T

§

const ALIGN: usize = mem::align_of::<T>()

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
§

impl<T> Tap for T

§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Selfwhere + Self: Borrow<B>, + B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere + Self: BorrowMut<B>, + B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Selfwhere + Self: AsRef<R>, + R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere + Self: AsMut<R>, + R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Selfwhere + Self: Deref<Target = T>, + T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Selfwhere + Self: Borrow<B>, + B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere + Self: BorrowMut<B>, + B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release +builds.
§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Selfwhere + Self: AsRef<R>, + R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release +builds.
§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere + Self: AsMut<R>, + R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release +builds.
§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Selfwhere + Self: Deref<Target = T>, + T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release +builds.
§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release +builds.
§

impl<T> TryConv for T

§

fn try_conv<T>(self) -> Result<T, Self::Error>where + Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

impl<T> Ungil for Twhere + T: Send,

\ No newline at end of file diff --git a/docs/apidocs/chiquito/wit_gen/struct.TraceGenerator.html b/docs/apidocs/chiquito/wit_gen/struct.TraceGenerator.html new file mode 100644 index 00000000..d29d5213 --- /dev/null +++ b/docs/apidocs/chiquito/wit_gen/struct.TraceGenerator.html @@ -0,0 +1,97 @@ +TraceGenerator in chiquito::wit_gen - Rust
pub struct TraceGenerator<F, TraceArgs> { /* private fields */ }

Implementations§

source§

impl<F: Default, TraceArgs> TraceGenerator<F, TraceArgs>

source

pub fn new(trace: Rc<Trace<F, TraceArgs>>, num_steps: usize) -> Self

source

pub fn generate(&self, args: TraceArgs) -> TraceWitness<F>

Trait Implementations§

source§

impl<F, TraceArgs> Clone for TraceGenerator<F, TraceArgs>

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<F, TraceArgs> Default for TraceGenerator<F, TraceArgs>

source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl<F, TraceArgs> !RefUnwindSafe for TraceGenerator<F, TraceArgs>

§

impl<F, TraceArgs> !Send for TraceGenerator<F, TraceArgs>

§

impl<F, TraceArgs> !Sync for TraceGenerator<F, TraceArgs>

§

impl<F, TraceArgs> Unpin for TraceGenerator<F, TraceArgs>

§

impl<F, TraceArgs> !UnwindSafe for TraceGenerator<F, TraceArgs>

Blanket Implementations§

source§

impl<T> Any for Twhere + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Conv for T

§

fn conv<T>(self) -> Twhere + Self: Into<T>,

Converts self into T using Into<T>. Read more
§

impl<T> FmtForward for T

§

fn fmt_binary(self) -> FmtBinary<Self>where + Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
§

fn fmt_display(self) -> FmtDisplay<Self>where + Self: Display,

Causes self to use its Display implementation when +Debug-formatted.
§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>where + Self: LowerExp,

Causes self to use its LowerExp implementation when +Debug-formatted.
§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>where + Self: LowerHex,

Causes self to use its LowerHex implementation when +Debug-formatted.
§

fn fmt_octal(self) -> FmtOctal<Self>where + Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
§

fn fmt_pointer(self) -> FmtPointer<Self>where + Self: Pointer,

Causes self to use its Pointer implementation when +Debug-formatted.
§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>where + Self: UpperExp,

Causes self to use its UpperExp implementation when +Debug-formatted.
§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>where + Self: UpperHex,

Causes self to use its UpperHex implementation when +Debug-formatted.
§

fn fmt_list(self) -> FmtList<Self>where + &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
§

impl<T> Pipe for Twhere + T: ?Sized,

§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere + Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere + R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere + R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> Rwhere + Self: Borrow<B>, + B: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
§

fn pipe_borrow_mut<'a, B, R>( + &'a mut self, + func: impl FnOnce(&'a mut B) -> R +) -> Rwhere + Self: BorrowMut<B>, + B: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe +function. Read more
§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> Rwhere + Self: AsRef<U>, + U: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> Rwhere + Self: AsMut<U>, + U: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe +function.
§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> Rwhere + Self: Deref<Target = T>, + T: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.deref() into the pipe function.
§

fn pipe_deref_mut<'a, T, R>( + &'a mut self, + func: impl FnOnce(&'a mut T) -> R +) -> Rwhere + Self: DerefMut<Target = T> + Deref, + T: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe +function.
§

impl<T> Pointable for T

§

const ALIGN: usize = mem::align_of::<T>()

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
§

impl<T> Tap for T

§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Selfwhere + Self: Borrow<B>, + B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere + Self: BorrowMut<B>, + B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Selfwhere + Self: AsRef<R>, + R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere + Self: AsMut<R>, + R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Selfwhere + Self: Deref<Target = T>, + T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Selfwhere + Self: Borrow<B>, + B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere + Self: BorrowMut<B>, + B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release +builds.
§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Selfwhere + Self: AsRef<R>, + R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release +builds.
§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere + Self: AsMut<R>, + R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release +builds.
§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Selfwhere + Self: Deref<Target = T>, + T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release +builds.
§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release +builds.
source§

impl<T> ToOwned for Twhere + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
§

impl<T> TryConv for T

§

fn try_conv<T>(self) -> Result<T, Self::Error>where + Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
\ No newline at end of file diff --git a/docs/apidocs/chiquito/wit_gen/struct.TraceWitness.html b/docs/apidocs/chiquito/wit_gen/struct.TraceWitness.html new file mode 100644 index 00000000..8f6e0de7 --- /dev/null +++ b/docs/apidocs/chiquito/wit_gen/struct.TraceWitness.html @@ -0,0 +1,108 @@ +TraceWitness in chiquito::wit_gen - Rust
pub struct TraceWitness<F> {
+    pub step_instances: Witness<F>,
+}

Fields§

§step_instances: Witness<F>

Trait Implementations§

source§

impl<F: Clone> Clone for TraceWitness<F>

source§

fn clone(&self) -> TraceWitness<F>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<F: Debug> Debug for TraceWitness<F>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<F: Default> Default for TraceWitness<F>

source§

fn default() -> TraceWitness<F>

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for TraceWitness<Fr>

source§

fn deserialize<D>(deserializer: D) -> Result<TraceWitness<Fr>, D::Error>where + D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl<F: Debug> Display for TraceWitness<F>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<F> RefUnwindSafe for TraceWitness<F>where + F: RefUnwindSafe,

§

impl<F> Send for TraceWitness<F>where + F: Send,

§

impl<F> Sync for TraceWitness<F>where + F: Sync,

§

impl<F> Unpin for TraceWitness<F>where + F: Unpin,

§

impl<F> UnwindSafe for TraceWitness<F>where + F: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for Twhere + T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere + T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere + T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Conv for T

§

fn conv<T>(self) -> Twhere + Self: Into<T>,

Converts self into T using Into<T>. Read more
§

impl<T> FmtForward for T

§

fn fmt_binary(self) -> FmtBinary<Self>where + Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
§

fn fmt_display(self) -> FmtDisplay<Self>where + Self: Display,

Causes self to use its Display implementation when +Debug-formatted.
§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>where + Self: LowerExp,

Causes self to use its LowerExp implementation when +Debug-formatted.
§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>where + Self: LowerHex,

Causes self to use its LowerHex implementation when +Debug-formatted.
§

fn fmt_octal(self) -> FmtOctal<Self>where + Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
§

fn fmt_pointer(self) -> FmtPointer<Self>where + Self: Pointer,

Causes self to use its Pointer implementation when +Debug-formatted.
§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>where + Self: UpperExp,

Causes self to use its UpperExp implementation when +Debug-formatted.
§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>where + Self: UpperHex,

Causes self to use its UpperHex implementation when +Debug-formatted.
§

fn fmt_list(self) -> FmtList<Self>where + &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an +Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an +Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere + U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
§

impl<T> Pipe for Twhere + T: ?Sized,

§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere + Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere + R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere + R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> Rwhere + Self: Borrow<B>, + B: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
§

fn pipe_borrow_mut<'a, B, R>( + &'a mut self, + func: impl FnOnce(&'a mut B) -> R +) -> Rwhere + Self: BorrowMut<B>, + B: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe +function. Read more
§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> Rwhere + Self: AsRef<U>, + U: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> Rwhere + Self: AsMut<U>, + U: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe +function.
§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> Rwhere + Self: Deref<Target = T>, + T: 'a + ?Sized, + R: 'a,

Borrows self, then passes self.deref() into the pipe function.
§

fn pipe_deref_mut<'a, T, R>( + &'a mut self, + func: impl FnOnce(&'a mut T) -> R +) -> Rwhere + Self: DerefMut<Target = T> + Deref, + T: 'a + ?Sized, + R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe +function.
§

impl<T> Pointable for T

§

const ALIGN: usize = mem::align_of::<T>()

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
§

impl<T> Tap for T

§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Selfwhere + Self: Borrow<B>, + B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere + Self: BorrowMut<B>, + B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Selfwhere + Self: AsRef<R>, + R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere + Self: AsMut<R>, + R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Selfwhere + Self: Deref<Target = T>, + T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Selfwhere + Self: Borrow<B>, + B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release +builds.
§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere + Self: BorrowMut<B>, + B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release +builds.
§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Selfwhere + Self: AsRef<R>, + R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release +builds.
§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere + Self: AsMut<R>, + R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release +builds.
§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Selfwhere + Self: Deref<Target = T>, + T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release +builds.
§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere + Self: DerefMut<Target = T> + Deref, + T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release +builds.
source§

impl<T> ToOwned for Twhere + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for Twhere + T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
§

impl<T> TryConv for T

§

fn try_conv<T>(self) -> Result<T, Self::Error>where + Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
source§

impl<T, U> TryFrom<U> for Twhere + U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere + U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere + V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where + S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a +[WithDispatch] wrapper. Read more
source§

impl<T> DeserializeOwned for Twhere + T: for<'de> Deserialize<'de>,

§

impl<T> Ungil for Twhere + T: Send,

\ No newline at end of file diff --git a/docs/apidocs/chiquito/wit_gen/type.FixedAssignment.html b/docs/apidocs/chiquito/wit_gen/type.FixedAssignment.html new file mode 100644 index 00000000..9e7157f6 --- /dev/null +++ b/docs/apidocs/chiquito/wit_gen/type.FixedAssignment.html @@ -0,0 +1 @@ +FixedAssignment in chiquito::wit_gen - Rust

Type Definition chiquito::wit_gen::FixedAssignment

source ·
pub type FixedAssignment<F> = HashMap<Queriable<F>, Vec<F>>;
\ No newline at end of file diff --git a/docs/apidocs/chiquito/wit_gen/type.Trace.html b/docs/apidocs/chiquito/wit_gen/type.Trace.html new file mode 100644 index 00000000..4a6ff906 --- /dev/null +++ b/docs/apidocs/chiquito/wit_gen/type.Trace.html @@ -0,0 +1 @@ +Trace in chiquito::wit_gen - Rust

Type Definition chiquito::wit_gen::Trace

source ·
pub type Trace<F, TraceArgs> = dyn Fn(&mut TraceContext<F>, TraceArgs) + 'static;
\ No newline at end of file diff --git a/docs/apidocs/chiquito/wit_gen/type.Witness.html b/docs/apidocs/chiquito/wit_gen/type.Witness.html new file mode 100644 index 00000000..6b4bf182 --- /dev/null +++ b/docs/apidocs/chiquito/wit_gen/type.Witness.html @@ -0,0 +1 @@ +Witness in chiquito::wit_gen - Rust

Type Definition chiquito::wit_gen::Witness

source ·
pub type Witness<F> = Vec<StepInstance<F>>;
\ No newline at end of file diff --git a/docs/apidocs/crates.js b/docs/apidocs/crates.js new file mode 100644 index 00000000..afac78f7 --- /dev/null +++ b/docs/apidocs/crates.js @@ -0,0 +1 @@ +window.ALL_CRATES = ["chiquito"]; \ No newline at end of file diff --git a/docs/apidocs/help.html b/docs/apidocs/help.html new file mode 100644 index 00000000..703ce7c9 --- /dev/null +++ b/docs/apidocs/help.html @@ -0,0 +1 @@ +Rustdoc help

Rustdoc help

Back
\ No newline at end of file diff --git a/docs/apidocs/implementors/chiquito/field/trait.Field.js b/docs/apidocs/implementors/chiquito/field/trait.Field.js new file mode 100644 index 00000000..134b1f59 --- /dev/null +++ b/docs/apidocs/implementors/chiquito/field/trait.Field.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"chiquito":[] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/docs/apidocs/implementors/chiquito/frontend/dsl/lb/trait.LookupBuilder.js b/docs/apidocs/implementors/chiquito/frontend/dsl/lb/trait.LookupBuilder.js new file mode 100644 index 00000000..134b1f59 --- /dev/null +++ b/docs/apidocs/implementors/chiquito/frontend/dsl/lb/trait.LookupBuilder.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"chiquito":[] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/docs/apidocs/implementors/chiquito/plonkish/compiler/cell_manager/trait.CellManager.js b/docs/apidocs/implementors/chiquito/plonkish/compiler/cell_manager/trait.CellManager.js new file mode 100644 index 00000000..134b1f59 --- /dev/null +++ b/docs/apidocs/implementors/chiquito/plonkish/compiler/cell_manager/trait.CellManager.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"chiquito":[] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/docs/apidocs/implementors/chiquito/plonkish/compiler/step_selector/trait.StepSelectorBuilder.js b/docs/apidocs/implementors/chiquito/plonkish/compiler/step_selector/trait.StepSelectorBuilder.js new file mode 100644 index 00000000..134b1f59 --- /dev/null +++ b/docs/apidocs/implementors/chiquito/plonkish/compiler/step_selector/trait.StepSelectorBuilder.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"chiquito":[] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/docs/apidocs/implementors/chiquito/poly/trait.ToExpr.js b/docs/apidocs/implementors/chiquito/poly/trait.ToExpr.js new file mode 100644 index 00000000..134b1f59 --- /dev/null +++ b/docs/apidocs/implementors/chiquito/poly/trait.ToExpr.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"chiquito":[] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/docs/apidocs/implementors/chiquito/poly/trait.ToField.js b/docs/apidocs/implementors/chiquito/poly/trait.ToField.js new file mode 100644 index 00000000..134b1f59 --- /dev/null +++ b/docs/apidocs/implementors/chiquito/poly/trait.ToField.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"chiquito":[] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/docs/apidocs/implementors/core/clone/trait.Clone.js b/docs/apidocs/implementors/core/clone/trait.Clone.js new file mode 100644 index 00000000..08f3f417 --- /dev/null +++ b/docs/apidocs/implementors/core/clone/trait.Clone.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"chiquito":[["impl<F: Clone> Clone for Queriable<F>"],["impl Clone for SingleRowCellManager"],["impl Clone for FixedSignal"],["impl<F: Clone> Clone for Constraint<F>"],["impl<F, MappingArgs> Clone for MappingGenerator<F, MappingArgs>"],["impl<F: Clone, TraceArgs: Clone> Clone for Circuit<F, TraceArgs>"],["impl Clone for SharedSignal"],["impl<F: Clone, V: Clone> Clone for Expr<F, V>"],["impl<F: Clone> Clone for Constraint<F>"],["impl Clone for Typing"],["impl<F: Clone> Clone for Circuit<F>"],["impl<F: Clone, TraceArgs> Clone for AssignmentGenerator<F, TraceArgs>"],["impl<F: Clone + PrimeField> Clone for ChiquitoPlaf<F>"],["impl<F: Clone> Clone for PolyLookup<F>"],["impl<F: Clone + Field + From<u64>> Clone for ChiquitoHalo2<F>"],["impl<F: Clone> Clone for Poly<F>"],["impl Clone for StepPlacement"],["impl<CM: Clone + CellManager, SSB: Clone + StepSelectorBuilder> Clone for CompilerConfig<CM, SSB>"],["impl<F> Clone for LookupTableRegistry<F>"],["impl<F: Clone + Field + From<u64>> Clone for ChiquitoHalo2Circuit<F>"],["impl Clone for StepTypeHandler"],["impl Clone for Column"],["impl<F: Clone> Clone for StepSelector<F>"],["impl Clone for ForwardSignal"],["impl<F: Clone> Clone for StepInstance<F>"],["impl Clone for TwoStepsSelectorBuilder"],["impl Clone for LogNSelectorBuilder"],["impl<CT: Clone + ColumnType> Clone for ImportedHalo2Column<CT>"],["impl Clone for SimpleStepSelectorBuilder"],["impl Clone for InternalSignal"],["impl Clone for ExposeOffset"],["impl Clone for MaxWidthCellManager"],["impl Clone for SignalPlacement"],["impl Clone for Placement"],["impl<F: Clone> Clone for TraceWitness<F>"],["impl<F: Clone> Clone for AutoTraceGenerator<F>"],["impl<F, TraceArgs> Clone for TraceGenerator<F, TraceArgs>"],["impl Clone for ColumnType"],["impl<F: Clone> Clone for TransitionConstraint<F>"],["impl Clone for LookupTable"],["impl<F: Clone> Clone for Lookup<F>"],["impl<F: Clone> Clone for LookupTableStore<F>"],["impl<F: Clone> Clone for Assignments<F>"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/docs/apidocs/implementors/core/cmp/trait.Eq.js b/docs/apidocs/implementors/core/cmp/trait.Eq.js new file mode 100644 index 00000000..2f8bae43 --- /dev/null +++ b/docs/apidocs/implementors/core/cmp/trait.Eq.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"chiquito":[["impl<F: Eq> Eq for Queriable<F>"],["impl<F> Eq for StepType<F>"],["impl Eq for FixedSignal"],["impl Eq for Column"],["impl Eq for SharedSignal"],["impl<CT: Eq + ColumnType> Eq for ImportedHalo2Column<CT>"],["impl Eq for StepTypeHandler"],["impl Eq for InternalSignal"],["impl Eq for Typing"],["impl Eq for ForwardSignal"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/docs/apidocs/implementors/core/cmp/trait.PartialEq.js b/docs/apidocs/implementors/core/cmp/trait.PartialEq.js new file mode 100644 index 00000000..64a56ca6 --- /dev/null +++ b/docs/apidocs/implementors/core/cmp/trait.PartialEq.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"chiquito":[["impl<F> PartialEq<StepType<F>> for StepType<F>"],["impl PartialEq<ForwardSignal> for ForwardSignal"],["impl PartialEq<Column> for Column"],["impl PartialEq<Typing> for Typing"],["impl PartialEq<FixedSignal> for FixedSignal"],["impl PartialEq<StepTypeHandler> for StepTypeHandler"],["impl<F: PartialEq> PartialEq<Queriable<F>> for Queriable<F>"],["impl<CT: PartialEq + ColumnType> PartialEq<ImportedHalo2Column<CT>> for ImportedHalo2Column<CT>"],["impl PartialEq<SharedSignal> for SharedSignal"],["impl PartialEq<InternalSignal> for InternalSignal"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/docs/apidocs/implementors/core/convert/trait.From.js b/docs/apidocs/implementors/core/convert/trait.From.js new file mode 100644 index 00000000..f99075f2 --- /dev/null +++ b/docs/apidocs/implementors/core/convert/trait.From.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"chiquito":[["impl<F: Clone, TraceArgs> From<&Circuit<F, TraceArgs>> for AutoTraceGenerator<F>"],["impl<F> From<Queriable<F>> for Constraint<F>"],["impl<F: From<u64> + Debug> From<usize> for Constraint<F>"],["impl<F> From<Constraint<F>> for ASTExpr<F>"],["impl<F, Args, D: Fn(&mut StepInstance<F>, Args) + 'static> From<&StepTypeWGHandler<F, Args, D>> for StepTypeHandler"],["impl<F: Field + From<u64>, V> From<i32> for Expr<F, V>"],["impl<F: From<u64>, V> From<bool> for Expr<F, V>"],["impl<F: From<u64>, V> From<u8> for Expr<F, V>"],["impl From<&'static str> for StepTypeDefInput"],["impl<F: From<u64> + Debug> From<u64> for Constraint<F>"],["impl From<StepTypeHandler> for StepTypeDefInput"],["impl<F: Field + From<u64> + Debug> From<i32> for Constraint<F>"],["impl<F: From<u64>, V> From<u32> for Expr<F, V>"],["impl<F: From<u64>, V> From<u64> for Expr<F, V>"],["impl<F: Debug> From<Expr<F, Queriable<F>>> for Constraint<F>"],["impl<F, V> From<Expression<F>> for Expr<F, V>"],["impl From<SignalPlacement> for (Column, i32)"],["impl<F> From<Queriable<F>> for ASTExpr<F>"],["impl<F: From<u64> + Debug> From<u8> for Constraint<F>"],["impl<F: From<u64> + Debug> From<bool> for Constraint<F>"],["impl<F: From<u64>, V> From<usize> for Expr<F, V>"],["impl<F: From<u64> + Debug> From<u32> for Constraint<F>"],["impl From<(Column, i32)> for SignalPlacement"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/docs/apidocs/implementors/core/default/trait.Default.js b/docs/apidocs/implementors/core/default/trait.Default.js new file mode 100644 index 00000000..d68ea20d --- /dev/null +++ b/docs/apidocs/implementors/core/default/trait.Default.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"chiquito":[["impl<F, TraceArgs> Default for TraceGenerator<F, TraceArgs>"],["impl<F> Default for Assignments<F>"],["impl<F> Default for MappingContext<F>"],["impl<F: Default + Field + From<u64>> Default for ChiquitoHalo2<F>"],["impl<F> Default for InPlaceLookupBuilder<F>"],["impl Default for LogNSelectorBuilder"],["impl<F> Default for LookupTableStore<F>"],["impl<F, MappingArgs> Default for SuperCircuitContext<F, MappingArgs>"],["impl<F, MappingArgs> Default for MappingGenerator<F, MappingArgs>"],["impl<F: Default> Default for Circuit<F>"],["impl<F: Default + Field + From<u64>> Default for ChiquitoHalo2SuperCircuit<F>"],["impl<F: Default + Field + From<u64>> Default for ChiquitoHalo2Circuit<F>"],["impl Default for SingleRowCellManager"],["impl Default for MaxWidthCellManager"],["impl<F, TraceArgs> Default for Circuit<F, TraceArgs>"],["impl<F: Default> Default for TraceWitness<F>"],["impl Default for TwoStepsSelectorBuilder"],["impl<F, MappingArgs> Default for SuperCircuit<F, MappingArgs>"],["impl<F: Clone, TraceArgs> Default for AssignmentGenerator<F, TraceArgs>"],["impl<F> Default for AutoTraceGenerator<F>"],["impl<F: Default> Default for StepInstance<F>"],["impl Default for SimpleStepSelectorBuilder"],["impl Default for Placement"],["impl<F> Default for Lookup<F>"],["impl<F> Default for LookupTableRegistry<F>"],["impl<F> Default for StepSelector<F>"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/docs/apidocs/implementors/core/fmt/trait.Debug.js b/docs/apidocs/implementors/core/fmt/trait.Debug.js new file mode 100644 index 00000000..c4ab96e6 --- /dev/null +++ b/docs/apidocs/implementors/core/fmt/trait.Debug.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"chiquito":[["impl<F: Debug> Debug for LookupTableStore<F>"],["impl Debug for SimpleStepSelectorBuilder"],["impl<F: Debug> Debug for Circuit<F>"],["impl Debug for ColumnType"],["impl Debug for ForwardSignal"],["impl Debug for SignalPlacement"],["impl<F: Debug> Debug for StepInstance<F>"],["impl Debug for LookupTable"],["impl<F: Debug> Debug for StepType<F>"],["impl Debug for FixedSignal"],["impl Debug for Column"],["impl<F> Debug for Constraint<F>"],["impl Debug for SharedSignal"],["impl<F: Debug> Debug for LookupTableRegistry<F>"],["impl<F: Debug + Field + From<u64>> Debug for ChiquitoHalo2SuperCircuit<F>"],["impl Debug for MaxWidthCellManager"],["impl<F: Debug, TraceArgs: Debug> Debug for CircuitContext<F, TraceArgs>"],["impl Debug for LogNSelectorBuilder"],["impl<F: Debug> Debug for TraceWitness<F>"],["impl Debug for SingleRowCellManager"],["impl<F: Debug, V: Debug> Debug for Expr<F, V>"],["impl<F> Debug for Queriable<F>"],["impl<F: Debug + Field + From<u64>> Debug for ChiquitoHalo2<F>"],["impl Debug for StepPlacement"],["impl Debug for ExposeOffset"],["impl<F: Debug> Debug for AutoTraceGenerator<F>"],["impl<F: Debug> Debug for Poly<F>"],["impl<F: Debug> Debug for PolyLookup<F>"],["impl Debug for Placement"],["impl Debug for Typing"],["impl<F: Debug> Debug for TransitionConstraint<F>"],["impl<F: Debug> Debug for Assignments<F>"],["impl<F: Debug> Debug for StepSelector<F>"],["impl Debug for TwoStepsSelectorBuilder"],["impl<F: Debug> Debug for TraceContext<F>"],["impl<CT: Debug + ColumnType> Debug for ImportedHalo2Column<CT>"],["impl<F: Debug + PrimeField> Debug for ChiquitoPlaf<F>"],["impl Debug for InternalSignal"],["impl<F: Debug> Debug for Lookup<F>"],["impl<F: Debug> Debug for Constraint<F>"],["impl<F: Debug, TraceArgs: Debug> Debug for Circuit<F, TraceArgs>"],["impl Debug for StepTypeHandler"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/docs/apidocs/implementors/core/fmt/trait.Display.js b/docs/apidocs/implementors/core/fmt/trait.Display.js new file mode 100644 index 00000000..06f12728 --- /dev/null +++ b/docs/apidocs/implementors/core/fmt/trait.Display.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"chiquito":[["impl<F: Debug> Display for StepInstance<F>"],["impl<F: Debug> Display for TraceWitness<F>"],["impl<F: Debug> Display for Assignments<F>"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/docs/apidocs/implementors/core/hash/trait.Hash.js b/docs/apidocs/implementors/core/hash/trait.Hash.js new file mode 100644 index 00000000..1064ec2d --- /dev/null +++ b/docs/apidocs/implementors/core/hash/trait.Hash.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"chiquito":[["impl Hash for InternalSignal"],["impl Hash for FixedSignal"],["impl Hash for ColumnType"],["impl Hash for SharedSignal"],["impl<CT: Hash + ColumnType> Hash for ImportedHalo2Column<CT>"],["impl Hash for ForwardSignal"],["impl Hash for Column"],["impl Hash for StepTypeHandler"],["impl<F: Hash> Hash for Queriable<F>"],["impl<F> Hash for StepType<F>"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/docs/apidocs/implementors/core/marker/trait.Copy.js b/docs/apidocs/implementors/core/marker/trait.Copy.js new file mode 100644 index 00000000..afb08445 --- /dev/null +++ b/docs/apidocs/implementors/core/marker/trait.Copy.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"chiquito":[["impl Copy for SharedSignal"],["impl Copy for InternalSignal"],["impl Copy for LookupTable"],["impl<F: Copy> Copy for Queriable<F>"],["impl Copy for ExposeOffset"],["impl<CT: Copy + ColumnType> Copy for ImportedHalo2Column<CT>"],["impl Copy for ForwardSignal"],["impl Copy for StepTypeHandler"],["impl Copy for FixedSignal"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/docs/apidocs/implementors/core/marker/trait.Freeze.js b/docs/apidocs/implementors/core/marker/trait.Freeze.js new file mode 100644 index 00000000..839bc74f --- /dev/null +++ b/docs/apidocs/implementors/core/marker/trait.Freeze.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"chiquito":[["impl<F> Freeze for Queriable<F>",1,["chiquito::ast::query::Queriable"]],["impl<F, TraceArgs> Freeze for Circuit<F, TraceArgs>",1,["chiquito::ast::Circuit"]],["impl<F> Freeze for StepType<F>",1,["chiquito::ast::StepType"]],["impl<F> Freeze for Constraint<F>where\n F: Freeze,",1,["chiquito::ast::Constraint"]],["impl<F> Freeze for TransitionConstraint<F>where\n F: Freeze,",1,["chiquito::ast::TransitionConstraint"]],["impl<F> Freeze for Lookup<F>where\n F: Freeze,",1,["chiquito::ast::Lookup"]],["impl Freeze for ForwardSignal",1,["chiquito::ast::ForwardSignal"]],["impl Freeze for SharedSignal",1,["chiquito::ast::SharedSignal"]],["impl Freeze for FixedSignal",1,["chiquito::ast::FixedSignal"]],["impl Freeze for ExposeOffset",1,["chiquito::ast::ExposeOffset"]],["impl Freeze for InternalSignal",1,["chiquito::ast::InternalSignal"]],["impl<CT> Freeze for ImportedHalo2Column<CT>where\n CT: Freeze,",1,["chiquito::ast::ImportedHalo2Column"]],["impl<F> Freeze for Constraint<F>where\n F: Freeze,",1,["chiquito::frontend::dsl::cb::Constraint"]],["impl Freeze for Typing",1,["chiquito::frontend::dsl::cb::Typing"]],["impl<F> Freeze for InPlaceLookupBuilder<F>where\n F: Freeze,",1,["chiquito::frontend::dsl::lb::InPlaceLookupBuilder"]],["impl<F> Freeze for LookupTableStore<F>",1,["chiquito::frontend::dsl::lb::LookupTableStore"]],["impl<F> Freeze for LookupTableRegistry<F>",1,["chiquito::frontend::dsl::lb::LookupTableRegistry"]],["impl Freeze for LookupTable",1,["chiquito::frontend::dsl::lb::LookupTable"]],["impl<F> Freeze for LookupTableBuilder<F>where\n F: Freeze,",1,["chiquito::frontend::dsl::lb::LookupTableBuilder"]],["impl<F, MappingArgs> Freeze for SuperCircuitContext<F, MappingArgs>",1,["chiquito::frontend::dsl::sc::SuperCircuitContext"]],["impl<F, TraceArgs> Freeze for CircuitContext<F, TraceArgs>",1,["chiquito::frontend::dsl::CircuitContext"]],["impl Freeze for StepTypeDefInput",1,["chiquito::frontend::dsl::StepTypeDefInput"]],["impl<F> Freeze for StepTypeContext<F>",1,["chiquito::frontend::dsl::StepTypeContext"]],["impl<'a, F> Freeze for StepTypeSetupContext<'a, F>",1,["chiquito::frontend::dsl::StepTypeSetupContext"]],["impl Freeze for StepTypeHandler",1,["chiquito::frontend::dsl::StepTypeHandler"]],["impl<F, Args, D> Freeze for StepTypeWGHandler<F, Args, D>",1,["chiquito::frontend::dsl::StepTypeWGHandler"]],["impl<F> Freeze for ChiquitoHalo2<F>",1,["chiquito::plonkish::backend::halo2::ChiquitoHalo2"]],["impl<F> Freeze for ChiquitoHalo2Circuit<F>",1,["chiquito::plonkish::backend::halo2::ChiquitoHalo2Circuit"]],["impl<F> Freeze for ChiquitoHalo2SuperCircuit<F>",1,["chiquito::plonkish::backend::halo2::ChiquitoHalo2SuperCircuit"]],["impl<F> Freeze for ChiquitoPlaf<F>",1,["chiquito::plonkish::backend::plaf::ChiquitoPlaf"]],["impl Freeze for ChiquitoPlafWitGen",1,["chiquito::plonkish::backend::plaf::ChiquitoPlafWitGen"]],["impl Freeze for SignalPlacement",1,["chiquito::plonkish::compiler::cell_manager::SignalPlacement"]],["impl Freeze for StepPlacement",1,["chiquito::plonkish::compiler::cell_manager::StepPlacement"]],["impl Freeze for Placement",1,["chiquito::plonkish::compiler::cell_manager::Placement"]],["impl Freeze for SingleRowCellManager",1,["chiquito::plonkish::compiler::cell_manager::SingleRowCellManager"]],["impl Freeze for MaxWidthCellManager",1,["chiquito::plonkish::compiler::cell_manager::MaxWidthCellManager"]],["impl<F> Freeze for StepSelector<F>",1,["chiquito::plonkish::compiler::step_selector::StepSelector"]],["impl Freeze for SimpleStepSelectorBuilder",1,["chiquito::plonkish::compiler::step_selector::SimpleStepSelectorBuilder"]],["impl Freeze for TwoStepsSelectorBuilder",1,["chiquito::plonkish::compiler::step_selector::TwoStepsSelectorBuilder"]],["impl Freeze for LogNSelectorBuilder",1,["chiquito::plonkish::compiler::step_selector::LogNSelectorBuilder"]],["impl<CM, SSB> Freeze for CompilerConfig<CM, SSB>where\n CM: Freeze,\n SSB: Freeze,",1,["chiquito::plonkish::compiler::CompilerConfig"]],["impl<F> Freeze for Assignments<F>",1,["chiquito::plonkish::ir::assignments::Assignments"]],["impl<F, TraceArgs> Freeze for AssignmentGenerator<F, TraceArgs>",1,["chiquito::plonkish::ir::assignments::AssignmentGenerator"]],["impl<F, MappingArgs> Freeze for SuperCircuit<F, MappingArgs>",1,["chiquito::plonkish::ir::sc::SuperCircuit"]],["impl<F> Freeze for MappingContext<F>",1,["chiquito::plonkish::ir::sc::MappingContext"]],["impl<F, MappingArgs> Freeze for MappingGenerator<F, MappingArgs>",1,["chiquito::plonkish::ir::sc::MappingGenerator"]],["impl<F> Freeze for Circuit<F>",1,["chiquito::plonkish::ir::Circuit"]],["impl Freeze for ColumnType",1,["chiquito::plonkish::ir::ColumnType"]],["impl Freeze for Column",1,["chiquito::plonkish::ir::Column"]],["impl<F> Freeze for Poly<F>where\n F: Freeze,",1,["chiquito::plonkish::ir::Poly"]],["impl<F> Freeze for PolyLookup<F>",1,["chiquito::plonkish::ir::PolyLookup"]],["impl<F, V> Freeze for Expr<F, V>where\n F: Freeze,\n V: Freeze,",1,["chiquito::poly::Expr"]],["impl<F> Freeze for IsZero<F>where\n F: Freeze,",1,["chiquito::stdlib::IsZero"]],["impl<F> Freeze for StepInstance<F>",1,["chiquito::wit_gen::StepInstance"]],["impl<F> Freeze for TraceWitness<F>",1,["chiquito::wit_gen::TraceWitness"]],["impl<F> Freeze for TraceContext<F>",1,["chiquito::wit_gen::TraceContext"]],["impl<F, TraceArgs> Freeze for TraceGenerator<F, TraceArgs>",1,["chiquito::wit_gen::TraceGenerator"]],["impl<F> Freeze for AutoTraceGenerator<F>",1,["chiquito::wit_gen::AutoTraceGenerator"]],["impl<F> Freeze for FixedGenContext<F>",1,["chiquito::wit_gen::FixedGenContext"]]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/docs/apidocs/implementors/core/marker/trait.Send.js b/docs/apidocs/implementors/core/marker/trait.Send.js new file mode 100644 index 00000000..153390b4 --- /dev/null +++ b/docs/apidocs/implementors/core/marker/trait.Send.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"chiquito":[["impl<F> Send for Queriable<F>where\n F: Send,",1,["chiquito::ast::query::Queriable"]],["impl<F, TraceArgs> !Send for Circuit<F, TraceArgs>",1,["chiquito::ast::Circuit"]],["impl<F> Send for StepType<F>where\n F: Send,",1,["chiquito::ast::StepType"]],["impl<F> Send for Constraint<F>where\n F: Send,",1,["chiquito::ast::Constraint"]],["impl<F> Send for TransitionConstraint<F>where\n F: Send,",1,["chiquito::ast::TransitionConstraint"]],["impl<F> Send for Lookup<F>where\n F: Send,",1,["chiquito::ast::Lookup"]],["impl Send for ForwardSignal",1,["chiquito::ast::ForwardSignal"]],["impl Send for SharedSignal",1,["chiquito::ast::SharedSignal"]],["impl Send for FixedSignal",1,["chiquito::ast::FixedSignal"]],["impl Send for ExposeOffset",1,["chiquito::ast::ExposeOffset"]],["impl Send for InternalSignal",1,["chiquito::ast::InternalSignal"]],["impl<CT> Send for ImportedHalo2Column<CT>where\n CT: Send,",1,["chiquito::ast::ImportedHalo2Column"]],["impl<F> Send for Constraint<F>where\n F: Send,",1,["chiquito::frontend::dsl::cb::Constraint"]],["impl Send for Typing",1,["chiquito::frontend::dsl::cb::Typing"]],["impl<F> Send for InPlaceLookupBuilder<F>where\n F: Send,",1,["chiquito::frontend::dsl::lb::InPlaceLookupBuilder"]],["impl<F> Send for LookupTableStore<F>where\n F: Send,",1,["chiquito::frontend::dsl::lb::LookupTableStore"]],["impl<F> Send for LookupTableRegistry<F>where\n F: Send,",1,["chiquito::frontend::dsl::lb::LookupTableRegistry"]],["impl Send for LookupTable",1,["chiquito::frontend::dsl::lb::LookupTable"]],["impl<F> Send for LookupTableBuilder<F>where\n F: Send,",1,["chiquito::frontend::dsl::lb::LookupTableBuilder"]],["impl<F, MappingArgs> !Send for SuperCircuitContext<F, MappingArgs>",1,["chiquito::frontend::dsl::sc::SuperCircuitContext"]],["impl<F, TraceArgs> !Send for CircuitContext<F, TraceArgs>",1,["chiquito::frontend::dsl::CircuitContext"]],["impl Send for StepTypeDefInput",1,["chiquito::frontend::dsl::StepTypeDefInput"]],["impl<F> Send for StepTypeContext<F>where\n F: Send,",1,["chiquito::frontend::dsl::StepTypeContext"]],["impl<'a, F> Send for StepTypeSetupContext<'a, F>where\n F: Send,",1,["chiquito::frontend::dsl::StepTypeSetupContext"]],["impl Send for StepTypeHandler",1,["chiquito::frontend::dsl::StepTypeHandler"]],["impl<F, Args, D> Send for StepTypeWGHandler<F, Args, D>where\n Args: Send,\n D: Send,\n F: Send,",1,["chiquito::frontend::dsl::StepTypeWGHandler"]],["impl<F> Send for ChiquitoHalo2<F>",1,["chiquito::plonkish::backend::halo2::ChiquitoHalo2"]],["impl<F> Send for ChiquitoHalo2Circuit<F>",1,["chiquito::plonkish::backend::halo2::ChiquitoHalo2Circuit"]],["impl<F> Send for ChiquitoHalo2SuperCircuit<F>",1,["chiquito::plonkish::backend::halo2::ChiquitoHalo2SuperCircuit"]],["impl<F> Send for ChiquitoPlaf<F>",1,["chiquito::plonkish::backend::plaf::ChiquitoPlaf"]],["impl Send for ChiquitoPlafWitGen",1,["chiquito::plonkish::backend::plaf::ChiquitoPlafWitGen"]],["impl Send for SignalPlacement",1,["chiquito::plonkish::compiler::cell_manager::SignalPlacement"]],["impl Send for StepPlacement",1,["chiquito::plonkish::compiler::cell_manager::StepPlacement"]],["impl Send for Placement",1,["chiquito::plonkish::compiler::cell_manager::Placement"]],["impl Send for SingleRowCellManager",1,["chiquito::plonkish::compiler::cell_manager::SingleRowCellManager"]],["impl Send for MaxWidthCellManager",1,["chiquito::plonkish::compiler::cell_manager::MaxWidthCellManager"]],["impl<F> Send for StepSelector<F>where\n F: Send,",1,["chiquito::plonkish::compiler::step_selector::StepSelector"]],["impl Send for SimpleStepSelectorBuilder",1,["chiquito::plonkish::compiler::step_selector::SimpleStepSelectorBuilder"]],["impl Send for TwoStepsSelectorBuilder",1,["chiquito::plonkish::compiler::step_selector::TwoStepsSelectorBuilder"]],["impl Send for LogNSelectorBuilder",1,["chiquito::plonkish::compiler::step_selector::LogNSelectorBuilder"]],["impl<CM, SSB> Send for CompilerConfig<CM, SSB>where\n CM: Send,\n SSB: Send,",1,["chiquito::plonkish::compiler::CompilerConfig"]],["impl<F> Send for Assignments<F>where\n F: Send,",1,["chiquito::plonkish::ir::assignments::Assignments"]],["impl<F, TraceArgs> !Send for AssignmentGenerator<F, TraceArgs>",1,["chiquito::plonkish::ir::assignments::AssignmentGenerator"]],["impl<F, MappingArgs> !Send for SuperCircuit<F, MappingArgs>",1,["chiquito::plonkish::ir::sc::SuperCircuit"]],["impl<F> Send for MappingContext<F>where\n F: Send,",1,["chiquito::plonkish::ir::sc::MappingContext"]],["impl<F, MappingArgs> !Send for MappingGenerator<F, MappingArgs>",1,["chiquito::plonkish::ir::sc::MappingGenerator"]],["impl<F> Send for Circuit<F>where\n F: Send,",1,["chiquito::plonkish::ir::Circuit"]],["impl Send for ColumnType",1,["chiquito::plonkish::ir::ColumnType"]],["impl Send for Column",1,["chiquito::plonkish::ir::Column"]],["impl<F> Send for Poly<F>where\n F: Send,",1,["chiquito::plonkish::ir::Poly"]],["impl<F> Send for PolyLookup<F>where\n F: Send,",1,["chiquito::plonkish::ir::PolyLookup"]],["impl<F, V> Send for Expr<F, V>where\n F: Send,\n V: Send,",1,["chiquito::poly::Expr"]],["impl<F> Send for IsZero<F>where\n F: Send,",1,["chiquito::stdlib::IsZero"]],["impl<F> Send for StepInstance<F>where\n F: Send,",1,["chiquito::wit_gen::StepInstance"]],["impl<F> Send for TraceWitness<F>where\n F: Send,",1,["chiquito::wit_gen::TraceWitness"]],["impl<F> Send for TraceContext<F>where\n F: Send,",1,["chiquito::wit_gen::TraceContext"]],["impl<F, TraceArgs> !Send for TraceGenerator<F, TraceArgs>",1,["chiquito::wit_gen::TraceGenerator"]],["impl<F> Send for AutoTraceGenerator<F>where\n F: Send,",1,["chiquito::wit_gen::AutoTraceGenerator"]],["impl<F> Send for FixedGenContext<F>where\n F: Send,",1,["chiquito::wit_gen::FixedGenContext"]]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/docs/apidocs/implementors/core/marker/trait.StructuralEq.js b/docs/apidocs/implementors/core/marker/trait.StructuralEq.js new file mode 100644 index 00000000..55ad7e32 --- /dev/null +++ b/docs/apidocs/implementors/core/marker/trait.StructuralEq.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"chiquito":[["impl StructuralEq for ForwardSignal"],["impl StructuralEq for InternalSignal"],["impl<F> StructuralEq for Queriable<F>"],["impl StructuralEq for FixedSignal"],["impl StructuralEq for StepTypeHandler"],["impl StructuralEq for Typing"],["impl<CT: ColumnType> StructuralEq for ImportedHalo2Column<CT>"],["impl StructuralEq for SharedSignal"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/docs/apidocs/implementors/core/marker/trait.StructuralPartialEq.js b/docs/apidocs/implementors/core/marker/trait.StructuralPartialEq.js new file mode 100644 index 00000000..77a0cf27 --- /dev/null +++ b/docs/apidocs/implementors/core/marker/trait.StructuralPartialEq.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"chiquito":[["impl StructuralPartialEq for ForwardSignal"],["impl StructuralPartialEq for InternalSignal"],["impl<F> StructuralPartialEq for Queriable<F>"],["impl StructuralPartialEq for Typing"],["impl<CT: ColumnType> StructuralPartialEq for ImportedHalo2Column<CT>"],["impl StructuralPartialEq for StepTypeHandler"],["impl StructuralPartialEq for SharedSignal"],["impl StructuralPartialEq for FixedSignal"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/docs/apidocs/implementors/core/marker/trait.Sync.js b/docs/apidocs/implementors/core/marker/trait.Sync.js new file mode 100644 index 00000000..247b2243 --- /dev/null +++ b/docs/apidocs/implementors/core/marker/trait.Sync.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"chiquito":[["impl<F> Sync for Queriable<F>where\n F: Sync,",1,["chiquito::ast::query::Queriable"]],["impl<F, TraceArgs> !Sync for Circuit<F, TraceArgs>",1,["chiquito::ast::Circuit"]],["impl<F> Sync for StepType<F>where\n F: Sync,",1,["chiquito::ast::StepType"]],["impl<F> Sync for Constraint<F>where\n F: Sync,",1,["chiquito::ast::Constraint"]],["impl<F> Sync for TransitionConstraint<F>where\n F: Sync,",1,["chiquito::ast::TransitionConstraint"]],["impl<F> Sync for Lookup<F>where\n F: Sync,",1,["chiquito::ast::Lookup"]],["impl Sync for ForwardSignal",1,["chiquito::ast::ForwardSignal"]],["impl Sync for SharedSignal",1,["chiquito::ast::SharedSignal"]],["impl Sync for FixedSignal",1,["chiquito::ast::FixedSignal"]],["impl Sync for ExposeOffset",1,["chiquito::ast::ExposeOffset"]],["impl Sync for InternalSignal",1,["chiquito::ast::InternalSignal"]],["impl<CT> Sync for ImportedHalo2Column<CT>where\n CT: Sync,",1,["chiquito::ast::ImportedHalo2Column"]],["impl<F> Sync for Constraint<F>where\n F: Sync,",1,["chiquito::frontend::dsl::cb::Constraint"]],["impl Sync for Typing",1,["chiquito::frontend::dsl::cb::Typing"]],["impl<F> Sync for InPlaceLookupBuilder<F>where\n F: Sync,",1,["chiquito::frontend::dsl::lb::InPlaceLookupBuilder"]],["impl<F> Sync for LookupTableStore<F>where\n F: Sync,",1,["chiquito::frontend::dsl::lb::LookupTableStore"]],["impl<F> Sync for LookupTableRegistry<F>where\n F: Send,",1,["chiquito::frontend::dsl::lb::LookupTableRegistry"]],["impl Sync for LookupTable",1,["chiquito::frontend::dsl::lb::LookupTable"]],["impl<F> Sync for LookupTableBuilder<F>where\n F: Sync,",1,["chiquito::frontend::dsl::lb::LookupTableBuilder"]],["impl<F, MappingArgs> !Sync for SuperCircuitContext<F, MappingArgs>",1,["chiquito::frontend::dsl::sc::SuperCircuitContext"]],["impl<F, TraceArgs> !Sync for CircuitContext<F, TraceArgs>",1,["chiquito::frontend::dsl::CircuitContext"]],["impl Sync for StepTypeDefInput",1,["chiquito::frontend::dsl::StepTypeDefInput"]],["impl<F> Sync for StepTypeContext<F>where\n F: Send + Sync,",1,["chiquito::frontend::dsl::StepTypeContext"]],["impl<'a, F> Sync for StepTypeSetupContext<'a, F>where\n F: Send + Sync,",1,["chiquito::frontend::dsl::StepTypeSetupContext"]],["impl Sync for StepTypeHandler",1,["chiquito::frontend::dsl::StepTypeHandler"]],["impl<F, Args, D> Sync for StepTypeWGHandler<F, Args, D>where\n Args: Sync,\n D: Sync,\n F: Sync,",1,["chiquito::frontend::dsl::StepTypeWGHandler"]],["impl<F> Sync for ChiquitoHalo2<F>",1,["chiquito::plonkish::backend::halo2::ChiquitoHalo2"]],["impl<F> Sync for ChiquitoHalo2Circuit<F>",1,["chiquito::plonkish::backend::halo2::ChiquitoHalo2Circuit"]],["impl<F> Sync for ChiquitoHalo2SuperCircuit<F>",1,["chiquito::plonkish::backend::halo2::ChiquitoHalo2SuperCircuit"]],["impl<F> Sync for ChiquitoPlaf<F>",1,["chiquito::plonkish::backend::plaf::ChiquitoPlaf"]],["impl Sync for ChiquitoPlafWitGen",1,["chiquito::plonkish::backend::plaf::ChiquitoPlafWitGen"]],["impl Sync for SignalPlacement",1,["chiquito::plonkish::compiler::cell_manager::SignalPlacement"]],["impl Sync for StepPlacement",1,["chiquito::plonkish::compiler::cell_manager::StepPlacement"]],["impl Sync for Placement",1,["chiquito::plonkish::compiler::cell_manager::Placement"]],["impl Sync for SingleRowCellManager",1,["chiquito::plonkish::compiler::cell_manager::SingleRowCellManager"]],["impl Sync for MaxWidthCellManager",1,["chiquito::plonkish::compiler::cell_manager::MaxWidthCellManager"]],["impl<F> Sync for StepSelector<F>where\n F: Sync,",1,["chiquito::plonkish::compiler::step_selector::StepSelector"]],["impl Sync for SimpleStepSelectorBuilder",1,["chiquito::plonkish::compiler::step_selector::SimpleStepSelectorBuilder"]],["impl Sync for TwoStepsSelectorBuilder",1,["chiquito::plonkish::compiler::step_selector::TwoStepsSelectorBuilder"]],["impl Sync for LogNSelectorBuilder",1,["chiquito::plonkish::compiler::step_selector::LogNSelectorBuilder"]],["impl<CM, SSB> Sync for CompilerConfig<CM, SSB>where\n CM: Sync,\n SSB: Sync,",1,["chiquito::plonkish::compiler::CompilerConfig"]],["impl<F> Sync for Assignments<F>where\n F: Sync,",1,["chiquito::plonkish::ir::assignments::Assignments"]],["impl<F, TraceArgs> !Sync for AssignmentGenerator<F, TraceArgs>",1,["chiquito::plonkish::ir::assignments::AssignmentGenerator"]],["impl<F, MappingArgs> !Sync for SuperCircuit<F, MappingArgs>",1,["chiquito::plonkish::ir::sc::SuperCircuit"]],["impl<F> Sync for MappingContext<F>where\n F: Sync,",1,["chiquito::plonkish::ir::sc::MappingContext"]],["impl<F, MappingArgs> !Sync for MappingGenerator<F, MappingArgs>",1,["chiquito::plonkish::ir::sc::MappingGenerator"]],["impl<F> Sync for Circuit<F>where\n F: Sync,",1,["chiquito::plonkish::ir::Circuit"]],["impl Sync for ColumnType",1,["chiquito::plonkish::ir::ColumnType"]],["impl Sync for Column",1,["chiquito::plonkish::ir::Column"]],["impl<F> Sync for Poly<F>where\n F: Sync,",1,["chiquito::plonkish::ir::Poly"]],["impl<F> Sync for PolyLookup<F>where\n F: Sync,",1,["chiquito::plonkish::ir::PolyLookup"]],["impl<F, V> Sync for Expr<F, V>where\n F: Sync,\n V: Sync,",1,["chiquito::poly::Expr"]],["impl<F> Sync for IsZero<F>where\n F: Sync,",1,["chiquito::stdlib::IsZero"]],["impl<F> Sync for StepInstance<F>where\n F: Sync,",1,["chiquito::wit_gen::StepInstance"]],["impl<F> Sync for TraceWitness<F>where\n F: Sync,",1,["chiquito::wit_gen::TraceWitness"]],["impl<F> Sync for TraceContext<F>where\n F: Sync,",1,["chiquito::wit_gen::TraceContext"]],["impl<F, TraceArgs> !Sync for TraceGenerator<F, TraceArgs>",1,["chiquito::wit_gen::TraceGenerator"]],["impl<F> Sync for AutoTraceGenerator<F>where\n F: Sync,",1,["chiquito::wit_gen::AutoTraceGenerator"]],["impl<F> Sync for FixedGenContext<F>where\n F: Sync,",1,["chiquito::wit_gen::FixedGenContext"]]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/docs/apidocs/implementors/core/marker/trait.Unpin.js b/docs/apidocs/implementors/core/marker/trait.Unpin.js new file mode 100644 index 00000000..783fbcd8 --- /dev/null +++ b/docs/apidocs/implementors/core/marker/trait.Unpin.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"chiquito":[["impl<F> Unpin for Queriable<F>where\n F: Unpin,",1,["chiquito::ast::query::Queriable"]],["impl<F, TraceArgs> Unpin for Circuit<F, TraceArgs>where\n F: Unpin,",1,["chiquito::ast::Circuit"]],["impl<F> Unpin for StepType<F>where\n F: Unpin,",1,["chiquito::ast::StepType"]],["impl<F> Unpin for Constraint<F>where\n F: Unpin,",1,["chiquito::ast::Constraint"]],["impl<F> Unpin for TransitionConstraint<F>where\n F: Unpin,",1,["chiquito::ast::TransitionConstraint"]],["impl<F> Unpin for Lookup<F>where\n F: Unpin,",1,["chiquito::ast::Lookup"]],["impl Unpin for ForwardSignal",1,["chiquito::ast::ForwardSignal"]],["impl Unpin for SharedSignal",1,["chiquito::ast::SharedSignal"]],["impl Unpin for FixedSignal",1,["chiquito::ast::FixedSignal"]],["impl Unpin for ExposeOffset",1,["chiquito::ast::ExposeOffset"]],["impl Unpin for InternalSignal",1,["chiquito::ast::InternalSignal"]],["impl<CT> Unpin for ImportedHalo2Column<CT>where\n CT: Unpin,",1,["chiquito::ast::ImportedHalo2Column"]],["impl<F> Unpin for Constraint<F>where\n F: Unpin,",1,["chiquito::frontend::dsl::cb::Constraint"]],["impl Unpin for Typing",1,["chiquito::frontend::dsl::cb::Typing"]],["impl<F> Unpin for InPlaceLookupBuilder<F>where\n F: Unpin,",1,["chiquito::frontend::dsl::lb::InPlaceLookupBuilder"]],["impl<F> Unpin for LookupTableStore<F>where\n F: Unpin,",1,["chiquito::frontend::dsl::lb::LookupTableStore"]],["impl<F> Unpin for LookupTableRegistry<F>",1,["chiquito::frontend::dsl::lb::LookupTableRegistry"]],["impl Unpin for LookupTable",1,["chiquito::frontend::dsl::lb::LookupTable"]],["impl<F> Unpin for LookupTableBuilder<F>where\n F: Unpin,",1,["chiquito::frontend::dsl::lb::LookupTableBuilder"]],["impl<F, MappingArgs> Unpin for SuperCircuitContext<F, MappingArgs>where\n F: Unpin,",1,["chiquito::frontend::dsl::sc::SuperCircuitContext"]],["impl<F, TraceArgs> Unpin for CircuitContext<F, TraceArgs>where\n F: Unpin,",1,["chiquito::frontend::dsl::CircuitContext"]],["impl Unpin for StepTypeDefInput",1,["chiquito::frontend::dsl::StepTypeDefInput"]],["impl<F> Unpin for StepTypeContext<F>where\n F: Unpin,",1,["chiquito::frontend::dsl::StepTypeContext"]],["impl<'a, F> Unpin for StepTypeSetupContext<'a, F>",1,["chiquito::frontend::dsl::StepTypeSetupContext"]],["impl Unpin for StepTypeHandler",1,["chiquito::frontend::dsl::StepTypeHandler"]],["impl<F, Args, D> Unpin for StepTypeWGHandler<F, Args, D>where\n Args: Unpin,\n F: Unpin,",1,["chiquito::frontend::dsl::StepTypeWGHandler"]],["impl<F> Unpin for ChiquitoHalo2<F>where\n F: Unpin,",1,["chiquito::plonkish::backend::halo2::ChiquitoHalo2"]],["impl<F> Unpin for ChiquitoHalo2Circuit<F>where\n F: Unpin,",1,["chiquito::plonkish::backend::halo2::ChiquitoHalo2Circuit"]],["impl<F> Unpin for ChiquitoHalo2SuperCircuit<F>where\n F: Unpin,",1,["chiquito::plonkish::backend::halo2::ChiquitoHalo2SuperCircuit"]],["impl<F> Unpin for ChiquitoPlaf<F>where\n F: Unpin,",1,["chiquito::plonkish::backend::plaf::ChiquitoPlaf"]],["impl Unpin for ChiquitoPlafWitGen",1,["chiquito::plonkish::backend::plaf::ChiquitoPlafWitGen"]],["impl Unpin for SignalPlacement",1,["chiquito::plonkish::compiler::cell_manager::SignalPlacement"]],["impl Unpin for StepPlacement",1,["chiquito::plonkish::compiler::cell_manager::StepPlacement"]],["impl Unpin for Placement",1,["chiquito::plonkish::compiler::cell_manager::Placement"]],["impl Unpin for SingleRowCellManager",1,["chiquito::plonkish::compiler::cell_manager::SingleRowCellManager"]],["impl Unpin for MaxWidthCellManager",1,["chiquito::plonkish::compiler::cell_manager::MaxWidthCellManager"]],["impl<F> Unpin for StepSelector<F>where\n F: Unpin,",1,["chiquito::plonkish::compiler::step_selector::StepSelector"]],["impl Unpin for SimpleStepSelectorBuilder",1,["chiquito::plonkish::compiler::step_selector::SimpleStepSelectorBuilder"]],["impl Unpin for TwoStepsSelectorBuilder",1,["chiquito::plonkish::compiler::step_selector::TwoStepsSelectorBuilder"]],["impl Unpin for LogNSelectorBuilder",1,["chiquito::plonkish::compiler::step_selector::LogNSelectorBuilder"]],["impl<CM, SSB> Unpin for CompilerConfig<CM, SSB>where\n CM: Unpin,\n SSB: Unpin,",1,["chiquito::plonkish::compiler::CompilerConfig"]],["impl<F> Unpin for Assignments<F>where\n F: Unpin,",1,["chiquito::plonkish::ir::assignments::Assignments"]],["impl<F, TraceArgs> Unpin for AssignmentGenerator<F, TraceArgs>where\n F: Unpin,",1,["chiquito::plonkish::ir::assignments::AssignmentGenerator"]],["impl<F, MappingArgs> Unpin for SuperCircuit<F, MappingArgs>where\n F: Unpin,",1,["chiquito::plonkish::ir::sc::SuperCircuit"]],["impl<F> Unpin for MappingContext<F>where\n F: Unpin,",1,["chiquito::plonkish::ir::sc::MappingContext"]],["impl<F, MappingArgs> Unpin for MappingGenerator<F, MappingArgs>",1,["chiquito::plonkish::ir::sc::MappingGenerator"]],["impl<F> Unpin for Circuit<F>where\n F: Unpin,",1,["chiquito::plonkish::ir::Circuit"]],["impl Unpin for ColumnType",1,["chiquito::plonkish::ir::ColumnType"]],["impl Unpin for Column",1,["chiquito::plonkish::ir::Column"]],["impl<F> Unpin for Poly<F>where\n F: Unpin,",1,["chiquito::plonkish::ir::Poly"]],["impl<F> Unpin for PolyLookup<F>where\n F: Unpin,",1,["chiquito::plonkish::ir::PolyLookup"]],["impl<F, V> Unpin for Expr<F, V>where\n F: Unpin,\n V: Unpin,",1,["chiquito::poly::Expr"]],["impl<F> Unpin for IsZero<F>where\n F: Unpin,",1,["chiquito::stdlib::IsZero"]],["impl<F> Unpin for StepInstance<F>where\n F: Unpin,",1,["chiquito::wit_gen::StepInstance"]],["impl<F> Unpin for TraceWitness<F>where\n F: Unpin,",1,["chiquito::wit_gen::TraceWitness"]],["impl<F> Unpin for TraceContext<F>where\n F: Unpin,",1,["chiquito::wit_gen::TraceContext"]],["impl<F, TraceArgs> Unpin for TraceGenerator<F, TraceArgs>",1,["chiquito::wit_gen::TraceGenerator"]],["impl<F> Unpin for AutoTraceGenerator<F>where\n F: Unpin,",1,["chiquito::wit_gen::AutoTraceGenerator"]],["impl<F> Unpin for FixedGenContext<F>where\n F: Unpin,",1,["chiquito::wit_gen::FixedGenContext"]]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/docs/apidocs/implementors/core/ops/arith/trait.Add.js b/docs/apidocs/implementors/core/ops/arith/trait.Add.js new file mode 100644 index 00000000..cc469c3e --- /dev/null +++ b/docs/apidocs/implementors/core/ops/arith/trait.Add.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"chiquito":[["impl<F, V, RHS: Into<Expr<F, V>>> Add<RHS> for Expr<F, V>"],["impl<F: Clone, RHS: Into<ASTExpr<F>>> Add<RHS> for Queriable<F>"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/docs/apidocs/implementors/core/ops/arith/trait.Mul.js b/docs/apidocs/implementors/core/ops/arith/trait.Mul.js new file mode 100644 index 00000000..bbbce8f1 --- /dev/null +++ b/docs/apidocs/implementors/core/ops/arith/trait.Mul.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"chiquito":[["impl<F, V, RHS: Into<Expr<F, V>>> Mul<RHS> for Expr<F, V>"],["impl<F: Clone, RHS: Into<ASTExpr<F>>> Mul<RHS> for Queriable<F>"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/docs/apidocs/implementors/core/ops/arith/trait.Neg.js b/docs/apidocs/implementors/core/ops/arith/trait.Neg.js new file mode 100644 index 00000000..f7956875 --- /dev/null +++ b/docs/apidocs/implementors/core/ops/arith/trait.Neg.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"chiquito":[["impl<F: Clone> Neg for Queriable<F>"],["impl<F, V> Neg for Expr<F, V>"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/docs/apidocs/implementors/core/ops/arith/trait.Sub.js b/docs/apidocs/implementors/core/ops/arith/trait.Sub.js new file mode 100644 index 00000000..fb536aa5 --- /dev/null +++ b/docs/apidocs/implementors/core/ops/arith/trait.Sub.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"chiquito":[["impl<F: Clone, RHS: Into<ASTExpr<F>>> Sub<RHS> for Queriable<F>"],["impl<F, V, RHS: Into<Expr<F, V>>> Sub<RHS> for Expr<F, V>"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/docs/apidocs/implementors/core/ops/deref/trait.Deref.js b/docs/apidocs/implementors/core/ops/deref/trait.Deref.js new file mode 100644 index 00000000..3433e534 --- /dev/null +++ b/docs/apidocs/implementors/core/ops/deref/trait.Deref.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"chiquito":[["impl<F> Deref for Assignments<F>"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/docs/apidocs/implementors/core/ops/deref/trait.DerefMut.js b/docs/apidocs/implementors/core/ops/deref/trait.DerefMut.js new file mode 100644 index 00000000..039c0229 --- /dev/null +++ b/docs/apidocs/implementors/core/ops/deref/trait.DerefMut.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"chiquito":[["impl<F> DerefMut for Assignments<F>"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/docs/apidocs/implementors/core/panic/unwind_safe/trait.RefUnwindSafe.js b/docs/apidocs/implementors/core/panic/unwind_safe/trait.RefUnwindSafe.js new file mode 100644 index 00000000..d1e126fa --- /dev/null +++ b/docs/apidocs/implementors/core/panic/unwind_safe/trait.RefUnwindSafe.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"chiquito":[["impl<F> RefUnwindSafe for Queriable<F>where\n F: RefUnwindSafe,",1,["chiquito::ast::query::Queriable"]],["impl<F, TraceArgs> !RefUnwindSafe for Circuit<F, TraceArgs>",1,["chiquito::ast::Circuit"]],["impl<F> RefUnwindSafe for StepType<F>where\n F: RefUnwindSafe,",1,["chiquito::ast::StepType"]],["impl<F> RefUnwindSafe for Constraint<F>where\n F: RefUnwindSafe,",1,["chiquito::ast::Constraint"]],["impl<F> RefUnwindSafe for TransitionConstraint<F>where\n F: RefUnwindSafe,",1,["chiquito::ast::TransitionConstraint"]],["impl<F> RefUnwindSafe for Lookup<F>where\n F: RefUnwindSafe,",1,["chiquito::ast::Lookup"]],["impl RefUnwindSafe for ForwardSignal",1,["chiquito::ast::ForwardSignal"]],["impl RefUnwindSafe for SharedSignal",1,["chiquito::ast::SharedSignal"]],["impl RefUnwindSafe for FixedSignal",1,["chiquito::ast::FixedSignal"]],["impl RefUnwindSafe for ExposeOffset",1,["chiquito::ast::ExposeOffset"]],["impl RefUnwindSafe for InternalSignal",1,["chiquito::ast::InternalSignal"]],["impl<CT> RefUnwindSafe for ImportedHalo2Column<CT>where\n CT: RefUnwindSafe,",1,["chiquito::ast::ImportedHalo2Column"]],["impl<F> RefUnwindSafe for Constraint<F>where\n F: RefUnwindSafe,",1,["chiquito::frontend::dsl::cb::Constraint"]],["impl RefUnwindSafe for Typing",1,["chiquito::frontend::dsl::cb::Typing"]],["impl<F> RefUnwindSafe for InPlaceLookupBuilder<F>where\n F: RefUnwindSafe,",1,["chiquito::frontend::dsl::lb::InPlaceLookupBuilder"]],["impl<F> RefUnwindSafe for LookupTableStore<F>where\n F: RefUnwindSafe,",1,["chiquito::frontend::dsl::lb::LookupTableStore"]],["impl<F> RefUnwindSafe for LookupTableRegistry<F>",1,["chiquito::frontend::dsl::lb::LookupTableRegistry"]],["impl RefUnwindSafe for LookupTable",1,["chiquito::frontend::dsl::lb::LookupTable"]],["impl<F> RefUnwindSafe for LookupTableBuilder<F>where\n F: RefUnwindSafe,",1,["chiquito::frontend::dsl::lb::LookupTableBuilder"]],["impl<F, MappingArgs> !RefUnwindSafe for SuperCircuitContext<F, MappingArgs>",1,["chiquito::frontend::dsl::sc::SuperCircuitContext"]],["impl<F, TraceArgs> !RefUnwindSafe for CircuitContext<F, TraceArgs>",1,["chiquito::frontend::dsl::CircuitContext"]],["impl RefUnwindSafe for StepTypeDefInput",1,["chiquito::frontend::dsl::StepTypeDefInput"]],["impl<F> RefUnwindSafe for StepTypeContext<F>where\n F: RefUnwindSafe,",1,["chiquito::frontend::dsl::StepTypeContext"]],["impl<'a, F> RefUnwindSafe for StepTypeSetupContext<'a, F>where\n F: RefUnwindSafe,",1,["chiquito::frontend::dsl::StepTypeSetupContext"]],["impl RefUnwindSafe for StepTypeHandler",1,["chiquito::frontend::dsl::StepTypeHandler"]],["impl<F, Args, D> RefUnwindSafe for StepTypeWGHandler<F, Args, D>where\n Args: RefUnwindSafe,\n D: RefUnwindSafe,\n F: RefUnwindSafe,",1,["chiquito::frontend::dsl::StepTypeWGHandler"]],["impl<F> RefUnwindSafe for ChiquitoHalo2<F>where\n F: RefUnwindSafe,",1,["chiquito::plonkish::backend::halo2::ChiquitoHalo2"]],["impl<F> RefUnwindSafe for ChiquitoHalo2Circuit<F>where\n F: RefUnwindSafe,",1,["chiquito::plonkish::backend::halo2::ChiquitoHalo2Circuit"]],["impl<F> RefUnwindSafe for ChiquitoHalo2SuperCircuit<F>where\n F: RefUnwindSafe,",1,["chiquito::plonkish::backend::halo2::ChiquitoHalo2SuperCircuit"]],["impl<F> RefUnwindSafe for ChiquitoPlaf<F>where\n F: RefUnwindSafe,",1,["chiquito::plonkish::backend::plaf::ChiquitoPlaf"]],["impl RefUnwindSafe for ChiquitoPlafWitGen",1,["chiquito::plonkish::backend::plaf::ChiquitoPlafWitGen"]],["impl RefUnwindSafe for SignalPlacement",1,["chiquito::plonkish::compiler::cell_manager::SignalPlacement"]],["impl RefUnwindSafe for StepPlacement",1,["chiquito::plonkish::compiler::cell_manager::StepPlacement"]],["impl RefUnwindSafe for Placement",1,["chiquito::plonkish::compiler::cell_manager::Placement"]],["impl RefUnwindSafe for SingleRowCellManager",1,["chiquito::plonkish::compiler::cell_manager::SingleRowCellManager"]],["impl RefUnwindSafe for MaxWidthCellManager",1,["chiquito::plonkish::compiler::cell_manager::MaxWidthCellManager"]],["impl<F> RefUnwindSafe for StepSelector<F>where\n F: RefUnwindSafe,",1,["chiquito::plonkish::compiler::step_selector::StepSelector"]],["impl RefUnwindSafe for SimpleStepSelectorBuilder",1,["chiquito::plonkish::compiler::step_selector::SimpleStepSelectorBuilder"]],["impl RefUnwindSafe for TwoStepsSelectorBuilder",1,["chiquito::plonkish::compiler::step_selector::TwoStepsSelectorBuilder"]],["impl RefUnwindSafe for LogNSelectorBuilder",1,["chiquito::plonkish::compiler::step_selector::LogNSelectorBuilder"]],["impl<CM, SSB> RefUnwindSafe for CompilerConfig<CM, SSB>where\n CM: RefUnwindSafe,\n SSB: RefUnwindSafe,",1,["chiquito::plonkish::compiler::CompilerConfig"]],["impl<F> RefUnwindSafe for Assignments<F>where\n F: RefUnwindSafe,",1,["chiquito::plonkish::ir::assignments::Assignments"]],["impl<F, TraceArgs> !RefUnwindSafe for AssignmentGenerator<F, TraceArgs>",1,["chiquito::plonkish::ir::assignments::AssignmentGenerator"]],["impl<F, MappingArgs> !RefUnwindSafe for SuperCircuit<F, MappingArgs>",1,["chiquito::plonkish::ir::sc::SuperCircuit"]],["impl<F> RefUnwindSafe for MappingContext<F>where\n F: RefUnwindSafe,",1,["chiquito::plonkish::ir::sc::MappingContext"]],["impl<F, MappingArgs> !RefUnwindSafe for MappingGenerator<F, MappingArgs>",1,["chiquito::plonkish::ir::sc::MappingGenerator"]],["impl<F> RefUnwindSafe for Circuit<F>where\n F: RefUnwindSafe,",1,["chiquito::plonkish::ir::Circuit"]],["impl RefUnwindSafe for ColumnType",1,["chiquito::plonkish::ir::ColumnType"]],["impl RefUnwindSafe for Column",1,["chiquito::plonkish::ir::Column"]],["impl<F> RefUnwindSafe for Poly<F>where\n F: RefUnwindSafe,",1,["chiquito::plonkish::ir::Poly"]],["impl<F> RefUnwindSafe for PolyLookup<F>where\n F: RefUnwindSafe,",1,["chiquito::plonkish::ir::PolyLookup"]],["impl<F, V> RefUnwindSafe for Expr<F, V>where\n F: RefUnwindSafe,\n V: RefUnwindSafe,",1,["chiquito::poly::Expr"]],["impl<F> RefUnwindSafe for IsZero<F>where\n F: RefUnwindSafe,",1,["chiquito::stdlib::IsZero"]],["impl<F> RefUnwindSafe for StepInstance<F>where\n F: RefUnwindSafe,",1,["chiquito::wit_gen::StepInstance"]],["impl<F> RefUnwindSafe for TraceWitness<F>where\n F: RefUnwindSafe,",1,["chiquito::wit_gen::TraceWitness"]],["impl<F> RefUnwindSafe for TraceContext<F>where\n F: RefUnwindSafe,",1,["chiquito::wit_gen::TraceContext"]],["impl<F, TraceArgs> !RefUnwindSafe for TraceGenerator<F, TraceArgs>",1,["chiquito::wit_gen::TraceGenerator"]],["impl<F> RefUnwindSafe for AutoTraceGenerator<F>where\n F: RefUnwindSafe,",1,["chiquito::wit_gen::AutoTraceGenerator"]],["impl<F> RefUnwindSafe for FixedGenContext<F>where\n F: RefUnwindSafe,",1,["chiquito::wit_gen::FixedGenContext"]]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/docs/apidocs/implementors/core/panic/unwind_safe/trait.UnwindSafe.js b/docs/apidocs/implementors/core/panic/unwind_safe/trait.UnwindSafe.js new file mode 100644 index 00000000..fe581c5d --- /dev/null +++ b/docs/apidocs/implementors/core/panic/unwind_safe/trait.UnwindSafe.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"chiquito":[["impl<F> UnwindSafe for Queriable<F>where\n F: UnwindSafe,",1,["chiquito::ast::query::Queriable"]],["impl<F, TraceArgs> !UnwindSafe for Circuit<F, TraceArgs>",1,["chiquito::ast::Circuit"]],["impl<F> UnwindSafe for StepType<F>where\n F: UnwindSafe,",1,["chiquito::ast::StepType"]],["impl<F> UnwindSafe for Constraint<F>where\n F: UnwindSafe,",1,["chiquito::ast::Constraint"]],["impl<F> UnwindSafe for TransitionConstraint<F>where\n F: UnwindSafe,",1,["chiquito::ast::TransitionConstraint"]],["impl<F> UnwindSafe for Lookup<F>where\n F: UnwindSafe,",1,["chiquito::ast::Lookup"]],["impl UnwindSafe for ForwardSignal",1,["chiquito::ast::ForwardSignal"]],["impl UnwindSafe for SharedSignal",1,["chiquito::ast::SharedSignal"]],["impl UnwindSafe for FixedSignal",1,["chiquito::ast::FixedSignal"]],["impl UnwindSafe for ExposeOffset",1,["chiquito::ast::ExposeOffset"]],["impl UnwindSafe for InternalSignal",1,["chiquito::ast::InternalSignal"]],["impl<CT> UnwindSafe for ImportedHalo2Column<CT>where\n CT: UnwindSafe,",1,["chiquito::ast::ImportedHalo2Column"]],["impl<F> UnwindSafe for Constraint<F>where\n F: UnwindSafe,",1,["chiquito::frontend::dsl::cb::Constraint"]],["impl UnwindSafe for Typing",1,["chiquito::frontend::dsl::cb::Typing"]],["impl<F> UnwindSafe for InPlaceLookupBuilder<F>where\n F: UnwindSafe,",1,["chiquito::frontend::dsl::lb::InPlaceLookupBuilder"]],["impl<F> UnwindSafe for LookupTableStore<F>where\n F: UnwindSafe,",1,["chiquito::frontend::dsl::lb::LookupTableStore"]],["impl<F> UnwindSafe for LookupTableRegistry<F>",1,["chiquito::frontend::dsl::lb::LookupTableRegistry"]],["impl UnwindSafe for LookupTable",1,["chiquito::frontend::dsl::lb::LookupTable"]],["impl<F> UnwindSafe for LookupTableBuilder<F>where\n F: UnwindSafe,",1,["chiquito::frontend::dsl::lb::LookupTableBuilder"]],["impl<F, MappingArgs> !UnwindSafe for SuperCircuitContext<F, MappingArgs>",1,["chiquito::frontend::dsl::sc::SuperCircuitContext"]],["impl<F, TraceArgs> !UnwindSafe for CircuitContext<F, TraceArgs>",1,["chiquito::frontend::dsl::CircuitContext"]],["impl UnwindSafe for StepTypeDefInput",1,["chiquito::frontend::dsl::StepTypeDefInput"]],["impl<F> UnwindSafe for StepTypeContext<F>where\n F: UnwindSafe,",1,["chiquito::frontend::dsl::StepTypeContext"]],["impl<'a, F> !UnwindSafe for StepTypeSetupContext<'a, F>",1,["chiquito::frontend::dsl::StepTypeSetupContext"]],["impl UnwindSafe for StepTypeHandler",1,["chiquito::frontend::dsl::StepTypeHandler"]],["impl<F, Args, D> UnwindSafe for StepTypeWGHandler<F, Args, D>where\n Args: UnwindSafe,\n D: UnwindSafe,\n F: UnwindSafe,",1,["chiquito::frontend::dsl::StepTypeWGHandler"]],["impl<F> UnwindSafe for ChiquitoHalo2<F>where\n F: UnwindSafe,",1,["chiquito::plonkish::backend::halo2::ChiquitoHalo2"]],["impl<F> UnwindSafe for ChiquitoHalo2Circuit<F>where\n F: UnwindSafe,",1,["chiquito::plonkish::backend::halo2::ChiquitoHalo2Circuit"]],["impl<F> UnwindSafe for ChiquitoHalo2SuperCircuit<F>where\n F: UnwindSafe,",1,["chiquito::plonkish::backend::halo2::ChiquitoHalo2SuperCircuit"]],["impl<F> UnwindSafe for ChiquitoPlaf<F>where\n F: UnwindSafe,",1,["chiquito::plonkish::backend::plaf::ChiquitoPlaf"]],["impl UnwindSafe for ChiquitoPlafWitGen",1,["chiquito::plonkish::backend::plaf::ChiquitoPlafWitGen"]],["impl UnwindSafe for SignalPlacement",1,["chiquito::plonkish::compiler::cell_manager::SignalPlacement"]],["impl UnwindSafe for StepPlacement",1,["chiquito::plonkish::compiler::cell_manager::StepPlacement"]],["impl UnwindSafe for Placement",1,["chiquito::plonkish::compiler::cell_manager::Placement"]],["impl UnwindSafe for SingleRowCellManager",1,["chiquito::plonkish::compiler::cell_manager::SingleRowCellManager"]],["impl UnwindSafe for MaxWidthCellManager",1,["chiquito::plonkish::compiler::cell_manager::MaxWidthCellManager"]],["impl<F> UnwindSafe for StepSelector<F>where\n F: UnwindSafe,",1,["chiquito::plonkish::compiler::step_selector::StepSelector"]],["impl UnwindSafe for SimpleStepSelectorBuilder",1,["chiquito::plonkish::compiler::step_selector::SimpleStepSelectorBuilder"]],["impl UnwindSafe for TwoStepsSelectorBuilder",1,["chiquito::plonkish::compiler::step_selector::TwoStepsSelectorBuilder"]],["impl UnwindSafe for LogNSelectorBuilder",1,["chiquito::plonkish::compiler::step_selector::LogNSelectorBuilder"]],["impl<CM, SSB> UnwindSafe for CompilerConfig<CM, SSB>where\n CM: UnwindSafe,\n SSB: UnwindSafe,",1,["chiquito::plonkish::compiler::CompilerConfig"]],["impl<F> UnwindSafe for Assignments<F>where\n F: UnwindSafe,",1,["chiquito::plonkish::ir::assignments::Assignments"]],["impl<F, TraceArgs> !UnwindSafe for AssignmentGenerator<F, TraceArgs>",1,["chiquito::plonkish::ir::assignments::AssignmentGenerator"]],["impl<F, MappingArgs> !UnwindSafe for SuperCircuit<F, MappingArgs>",1,["chiquito::plonkish::ir::sc::SuperCircuit"]],["impl<F> UnwindSafe for MappingContext<F>where\n F: UnwindSafe,",1,["chiquito::plonkish::ir::sc::MappingContext"]],["impl<F, MappingArgs> !UnwindSafe for MappingGenerator<F, MappingArgs>",1,["chiquito::plonkish::ir::sc::MappingGenerator"]],["impl<F> UnwindSafe for Circuit<F>where\n F: UnwindSafe,",1,["chiquito::plonkish::ir::Circuit"]],["impl UnwindSafe for ColumnType",1,["chiquito::plonkish::ir::ColumnType"]],["impl UnwindSafe for Column",1,["chiquito::plonkish::ir::Column"]],["impl<F> UnwindSafe for Poly<F>where\n F: UnwindSafe,",1,["chiquito::plonkish::ir::Poly"]],["impl<F> UnwindSafe for PolyLookup<F>where\n F: UnwindSafe,",1,["chiquito::plonkish::ir::PolyLookup"]],["impl<F, V> UnwindSafe for Expr<F, V>where\n F: UnwindSafe,\n V: UnwindSafe,",1,["chiquito::poly::Expr"]],["impl<F> UnwindSafe for IsZero<F>where\n F: UnwindSafe,",1,["chiquito::stdlib::IsZero"]],["impl<F> UnwindSafe for StepInstance<F>where\n F: UnwindSafe,",1,["chiquito::wit_gen::StepInstance"]],["impl<F> UnwindSafe for TraceWitness<F>where\n F: UnwindSafe,",1,["chiquito::wit_gen::TraceWitness"]],["impl<F> UnwindSafe for TraceContext<F>where\n F: UnwindSafe,",1,["chiquito::wit_gen::TraceContext"]],["impl<F, TraceArgs> !UnwindSafe for TraceGenerator<F, TraceArgs>",1,["chiquito::wit_gen::TraceGenerator"]],["impl<F> UnwindSafe for AutoTraceGenerator<F>where\n F: UnwindSafe,",1,["chiquito::wit_gen::AutoTraceGenerator"]],["impl<F> UnwindSafe for FixedGenContext<F>where\n F: UnwindSafe,",1,["chiquito::wit_gen::FixedGenContext"]]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/docs/apidocs/implementors/halo2_proofs/plonk/circuit/trait.Circuit.js b/docs/apidocs/implementors/halo2_proofs/plonk/circuit/trait.Circuit.js new file mode 100644 index 00000000..41f8ae4b --- /dev/null +++ b/docs/apidocs/implementors/halo2_proofs/plonk/circuit/trait.Circuit.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"chiquito":[["impl<F: Field + From<u64> + Hash> Circuit<F> for ChiquitoHalo2SuperCircuit<F>"],["impl<F: Field + From<u64> + Hash> Circuit<F> for ChiquitoHalo2Circuit<F>"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/docs/apidocs/implementors/serde/de/trait.Deserialize.js b/docs/apidocs/implementors/serde/de/trait.Deserialize.js new file mode 100644 index 00000000..3c3c3f0a --- /dev/null +++ b/docs/apidocs/implementors/serde/de/trait.Deserialize.js @@ -0,0 +1,3 @@ +(function() {var implementors = { +"chiquito":[["impl<'de> Deserialize<'de> for SharedSignal"],["impl<'de> Deserialize<'de> for StepInstance<Fr>"],["impl<'de> Deserialize<'de> for Queriable<Fr>"],["impl<'de> Deserialize<'de> for TraceWitness<Fr>"],["impl<'de> Deserialize<'de> for Lookup<Fr>"],["impl<'de> Deserialize<'de> for ExposeOffset"],["impl<'de> Deserialize<'de> for FixedSignal"],["impl<'de> Deserialize<'de> for StepType<Fr>"],["impl<'de> Deserialize<'de> for Constraint<Fr>"],["impl<'de> Deserialize<'de> for Expr<Fr, Queriable<Fr>>"],["impl<'de> Deserialize<'de> for InternalSignal"],["impl<'de> Deserialize<'de> for ForwardSignal"],["impl<'de> Deserialize<'de> for StepTypeHandler"],["impl<'de> Deserialize<'de> for TransitionConstraint<Fr>"],["impl<'de> Deserialize<'de> for Circuit<Fr, ()>"]] +};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/docs/apidocs/index.html b/docs/apidocs/index.html new file mode 100644 index 00000000..d9fd25a9 --- /dev/null +++ b/docs/apidocs/index.html @@ -0,0 +1 @@ + diff --git a/docs/apidocs/search-index.js b/docs/apidocs/search-index.js new file mode 100644 index 00000000..22d71948 --- /dev/null +++ b/docs/apidocs/search-index.js @@ -0,0 +1,5 @@ +var searchIndex = JSON.parse('{\ +"chiquito":{"doc":"","t":"AAAAAAAGDDENGDDGDGDNDDNDGDLLLLLLLLLLLMMMMMMLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLMMLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLMLLLLLLLMMMMMMMLLLLLLLLLLLMLLLLLLLLLLLLLLMMLLLLLLMLLLLLLLLLLLLLLLLLLLLLLMMMLLLLLLLLLLMLLMALLMMMLLLLLLLLLLMMLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNENNNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLISSKKAADNDEDDDNLMMLLLLLLLLLLLLLLAFLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLALLLLLLLLLALLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLMNNDENFFMLLLLLLLLLLLLLLFLMLLLLLLLLLLLLFLLLLFFFFFFFFFLLLLLLLLMFLLFFDIDDDDLLLLLLLLLLLLLLLKLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLDLLLLLLLLLLLLLFMLLLLRFFFFAAAAADDDLLLLLLFFLLLLLLLLLLMLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLFLLLLLLLLLLLLLLLLDDLLLLFLLLLLLLLLLLLLLLLLLLLLLLLLLLDLLALLFFFFLLLLLLALLLLLIDDDDDMLLLLLLLLLLLLLLLLLLLLMMLLLLLLLLLLLLLLLLLLLLMLLLLLMLLLLLLLLLLLLLLLLLLLLLKLLMLMLMLLLLLLLLLLLLLLLLLLLLLLLLLDGDDIDLLLLLLLLKLLLLLLLLLLLMLLLLLLLLLLLLLLLLLLLLLLLLLMMLLLLLLLLLLMMMLLLLLLLLLLLLLLLLLLLLLNDDENNNDGDLMMMAMLLLLLLLLLLLLLLLLLLLLMMLLLLLLLLLLLLLLLLLMMMLMLLLLLLLLLLMMLLMLLLLLLLLLLMLLMMALLALLLLLLLLLLLLLLLLLLLLLLLLLLDDLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLGGDDGDLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNENNNNNNIIGLLLLLLLLLLKLKLLLLLLLLLLLLLLLLLLLLDLLLLLLLLLLLLLLLDGDDGDDDGLLLMLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLMMLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL","n":["ast","field","frontend","plonkish","poly","stdlib","wit_gen","ASTExpr","Circuit","Constraint","ExposeOffset","First","FixedGen","FixedSignal","ForwardSignal","ImportedHalo2Advice","ImportedHalo2Column","ImportedHalo2Fixed","InternalSignal","Last","Lookup","SharedSignal","Step","StepType","StepTypeUUID","TransitionConstraint","add","add_constr","add_fixed","add_forward","add_halo2_advice","add_halo2_fixed","add_shared","add_signal","add_step_type","add_step_type_def","add_transition","annotation","annotation","annotation","annotations","annotations","auto_signals","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","column","constraints","default","default","deref","deref","deref","deref","deref","deref","deref","deref","deref","deref","deref","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","deserialize","drop","drop","drop","drop","drop","drop","drop","drop","drop","drop","drop","enable","enable","eq","eq","eq","eq","eq","eq","expose","exposed","expr","expr","exprs","first_step","fixed_assignments","fixed_signals","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","forward_signals","from","from","from","from","from","from","from","from","from","from","from","from","from","get_step_type","halo2_advice","halo2_fixed","hash","hash","hash","hash","hash","hash","id","init","init","init","init","init","init","init","init","init","init","init","into","into","into","into","into","into","into","into","into","into","into","last_step","lookups","name","new","new","new","new","new_with_id","new_with_id","new_with_id","new_with_id","new_with_phase","new_with_phase","num_steps","phase","phase","q_enable","query","set_fixed_assignments","set_trace","shared_signals","signals","step_types","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","trace","transition_constraints","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","uuid","uuid","uuid","uuid","uuid","uuid","vzip","vzip","vzip","vzip","vzip","vzip","vzip","vzip","vzip","vzip","vzip","Fixed","Forward","Halo2AdviceQuery","Halo2FixedQuery","Internal","Queriable","Shared","StepTypeNext","_unaccessible","add","annotation","borrow","borrow_mut","clone","clone_into","deref","deref_mut","deserialize","drop","eq","expr","fmt","from","hash","init","into","mul","neg","next","prev","rot","sub","to_owned","try_from","try_into","type_id","uuid","vzip","Field","ONE","ZERO","mi","pow","dsl","python","CircuitContext","Handler","StepTypeContext","StepTypeDefInput","StepTypeHandler","StepTypeSetupContext","StepTypeWGHandler","String","add_lookup","annotation","annotation","auto","auto_eq","borrow","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","cb","circuit","clone","clone_into","constr","constr","deref","deref","deref","deref","deref","deref","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deserialize","drop","drop","drop","drop","drop","drop","eq","expose","fixed","fixed_gen","fmt","fmt","forward","forward_with_phase","from","from","from","from","from","from","from","from","from","hash","import_halo2_advice","import_halo2_fixed","init","init","init","init","init","init","internal","into","into","into","into","into","into","lb","new","new","new_table","new_with_id","next","pragma_disable_q_enable","pragma_first_step","pragma_last_step","pragma_num_steps","sc","setup","shared","shared_with_phase","step_type","step_type_def","to_owned","trace","transition","transition","try_from","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","type_id","type_id","uuid","uuid","vzip","vzip","vzip","vzip","vzip","vzip","wg","wg","AntiBooly","Boolean","Constraint","Typing","Unknown","and","annotate","annotation","borrow","borrow","borrow_mut","borrow_mut","clone","clone","clone_into","clone_into","deref","deref","deref_mut","deref_mut","drop","drop","eq","eq","expr","fmt","fmt","from","from","from","from","from","from","from","from","from","from","if_next_step","init","init","into","into","isz","lookup","next_step_must_be","next_step_must_not_be","not","or","rlc","select","table","to_owned","to_owned","try_from","try_from","try_into","try_into","type_id","type_id","typing","unless","vzip","vzip","when","xor","InPlaceLookupBuilder","LookupBuilder","LookupTable","LookupTableBuilder","LookupTableRegistry","LookupTableStore","add","add","add","apply","apply","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","build","build","build","clone","clone","clone","clone_into","clone_into","clone_into","default","default","default","deref","deref","deref","deref","deref","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","drop","drop","drop","drop","drop","enable","fmt","fmt","fmt","from","from","from","from","from","get","init","init","init","init","init","into","into","into","into","into","to_owned","to_owned","to_owned","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","type_id","uuid","vzip","vzip","vzip","vzip","vzip","when","when","SuperCircuitContext","borrow","borrow_mut","compile","default","deref","deref_mut","drop","from","init","into","mapping","sub_circuit","sub_circuit_with_ast","super_circuit","tables","try_from","try_into","type_id","vzip","CIRCUIT_MAP","chiquito_ast_map_store","chiquito_ast_to_halo2","chiquito_halo2_mock_prover","chiquito_super_circuit_halo2_mock_prover","backend","compiler","ir","halo2","plaf","ChiquitoHalo2","ChiquitoHalo2Circuit","ChiquitoHalo2SuperCircuit","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","chiquito2Halo2","chiquitoSuperCircuit2Halo2","clone","clone","clone_into","clone_into","configure","configure","configure","configure_sub_circuit","configure_with_params","configure_with_params","debug","default","default","default","deref","deref","deref","deref_mut","deref_mut","deref_mut","drop","drop","drop","fmt","fmt","from","from","from","init","init","init","instance","instance","into","into","into","new","new","new","params","params","synthesize","synthesize","synthesize","to_halo2_advice","to_owned","to_owned","try_from","try_from","try_from","try_into","try_into","try_into","type_id","type_id","type_id","vzip","vzip","vzip","without_witnesses","without_witnesses","ChiquitoPlaf","ChiquitoPlafWitGen","borrow","borrow","borrow_mut","borrow_mut","chiquito2Plaf","clone","clone_into","deref","deref","deref_mut","deref_mut","drop","drop","fmt","from","from","generate","get_plaf","init","init","into","into","new","to_owned","try_from","try_from","try_into","try_into","type_id","type_id","vzip","vzip","CompilerConfig","borrow","borrow_mut","cell_manager","clone","clone_into","compile","compile_phase1","compile_phase2","config","deref","deref_mut","drop","from","init","into","step_selector","to_owned","try_from","try_into","type_id","vzip","CellManager","MaxWidthCellManager","Placement","SignalPlacement","SingleRowCellManager","StepPlacement","base_height","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","clone","clone","clone","clone","clone","clone_into","clone_into","clone_into","clone_into","clone_into","column","columns","default","default","default","deref","deref","deref","deref","deref","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","drop","drop","drop","drop","drop","find_internal_signal_placement","first_step_height","fixed","fmt","fmt","fmt","fmt","fmt","forward","from","from","from","from","from","from","get_fixed_placement","get_forward_placement","get_shared_placement","init","init","init","init","init","into","into","into","into","into","new","new","place","place","place","rotation","same_height","shared","step_height","steps","to_owned","to_owned","to_owned","to_owned","to_owned","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","type_id","vzip","vzip","vzip","vzip","vzip","LogNSelectorBuilder","SelectorAssignment","SimpleStepSelectorBuilder","StepSelector","StepSelectorBuilder","TwoStepsSelectorBuilder","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","build","build","build","build","clone","clone","clone","clone","clone_into","clone_into","clone_into","clone_into","columns","default","default","default","default","deref","deref","deref","deref","deref_mut","deref_mut","deref_mut","deref_mut","drop","drop","drop","drop","fmt","fmt","fmt","fmt","from","from","from","from","get_selector_assignment","halo2_column","hint_one","init","init","init","init","into","into","into","into","next_expr","select","selector_assignment","selector_expr","selector_expr_not","to_owned","to_owned","to_owned","to_owned","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","unselect","vzip","vzip","vzip","vzip","Advice","Circuit","Column","ColumnType","Fixed","Halo2Advice","Halo2Fixed","Poly","PolyExpr","PolyLookup","advice","annotation","annotation","annotation","assignments","ast_id","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","clone","clone","clone","clone","clone","clone_into","clone_into","clone_into","clone_into","clone_into","columns","ctype","default","deref","deref","deref","deref","deref","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","drop","drop","drop","drop","drop","eq","exposed","expr","exprs","fixed","fixed_assignments","fmt","fmt","fmt","fmt","fmt","from","from","from","from","from","halo2_advice","halo2_fixed","hash","hash","id","init","init","init","init","init","into","into","into","into","into","lookups","new_halo2_advice","new_halo2_fixed","phase","polys","query","query","rotate","sc","to_owned","to_owned","to_owned","to_owned","to_owned","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","type_id","uuid","vzip","vzip","vzip","vzip","vzip","AssignmentGenerator","Assignments","borrow","borrow","borrow_mut","borrow_mut","clone","clone","clone_into","clone_into","default","default","deref","deref","deref","deref_mut","deref_mut","deref_mut","drop","drop","empty","fmt","fmt","from","from","generate","generate_with_witness","init","init","into","into","new","to_owned","to_owned","to_string","try_from","try_from","try_into","try_into","type_id","type_id","uuid","vzip","vzip","Queriable","Mapping","MappingContext","MappingGenerator","SuperAssignments","SuperCircuit","add_sub_circuit","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","clone","clone_into","default","default","default","deref","deref","deref","deref_mut","deref_mut","deref_mut","drop","drop","drop","from","from","from","generate","get_mapping","get_sub_circuits","get_super_assignments","init","init","init","into","into","into","map","map_with_witness","new","set_mapping","to_owned","try_from","try_from","try_from","try_into","try_into","try_into","type_id","type_id","type_id","vzip","vzip","vzip","Const","Expr","Halo2Expr","Mul","Neg","Pow","Query","Sum","ToExpr","ToField","VarAssignments","add","borrow","borrow_mut","clone","clone_into","deref","deref_mut","deserialize","drop","eval","expr","expr","field","fmt","from","from","from","from","from","from","from","from","init","into","mul","neg","rotate","sub","to_owned","try_from","try_into","type_id","vzip","IsZero","borrow","borrow_mut","deref","deref_mut","drop","from","init","into","is_zero","setup","try_from","try_into","type_id","vzip","wg","AutoTraceGenerator","FixedAssignment","FixedGenContext","StepInstance","Trace","TraceContext","TraceGenerator","TraceWitness","Witness","add","assign","assign","assignments","borrow","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","clone","clone","clone","clone","clone_into","clone_into","clone_into","clone_into","default","default","default","default","deref","deref","deref","deref","deref","deref","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deref_mut","deserialize","deserialize","drop","drop","drop","drop","drop","drop","fmt","fmt","fmt","fmt","fmt","fmt","from","from","from","from","from","from","from","generate","generate","get_assignments","get_witness","init","init","init","init","init","init","into","into","into","into","into","into","new","new","new","new","padding","step_instances","step_type_uuid","to_owned","to_owned","to_owned","to_owned","to_string","to_string","try_from","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","type_id","type_id","vzip","vzip","vzip","vzip","vzip","vzip"],"q":[[0,"chiquito"],[7,"chiquito::ast"],[290,"chiquito::ast::query"],[328,"chiquito::field"],[333,"chiquito::frontend"],[335,"chiquito::frontend::dsl"],[466,"chiquito::frontend::dsl::cb"],[531,"chiquito::frontend::dsl::lb"],[625,"chiquito::frontend::dsl::sc"],[645,"chiquito::frontend::python"],[650,"chiquito::plonkish"],[653,"chiquito::plonkish::backend"],[655,"chiquito::plonkish::backend::halo2"],[727,"chiquito::plonkish::backend::plaf"],[761,"chiquito::plonkish::compiler"],[783,"chiquito::plonkish::compiler::cell_manager"],[893,"chiquito::plonkish::compiler::step_selector"],[981,"chiquito::plonkish::ir"],[1101,"chiquito::plonkish::ir::assignments"],[1145,"chiquito::plonkish::ir::query"],[1146,"chiquito::plonkish::ir::sc"],[1202,"chiquito::poly"],[1246,"chiquito::stdlib"],[1262,"chiquito::wit_gen"]],"d":["","","","","","","","","Circuit","Condition","","","","","ForwardSignal","","","","","","","","","Step","","TransitionCondition","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Returns the argument unchanged.","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","","","","","","","","","","","","","","","","","","","","","","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Returns the argument unchanged.","","","Calls U::from(self).","","","Call next function on a Querible forward signal to build …","Call prev function on a Querible shared signal to build …","Call rot function on a Querible shared signal to build …","","","","","","","","","The one element of the field, the multiplicative identity.","The zero element of the field, the additive identity.","Computes the multiplicative inverse of this element, …","Exponentiates self by exp, where exp is a little-endian …","","","A generic structure designed to handle the context of a …","","A generic structure designed to handle the context of a …","","","","","","Adds a lookup to the step type.","","","","","","","","","","","","","","","","","","Creates a Circuit instance by providing a name and a …","","","DEPRECATED","Adds a constraint to the step type. Involves internal …","","","","","","","","","","","","","","","","","","","","","Exposes the first step instance value of a forward signal …","","Executes the fixed generation function provided by the …","","","Adds a forward signal to the circuit with a name string …","Adds a forward signal to the circuit with a name string …","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","","","Imports a halo2 advice column with a name string into the …","Imports a halo2 fixed column with a name string into the …","","","","","","","Adds an internal signal to the step type with the given …","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","","","","","","","","Enforce the type of the first step by adding a constraint …","Enforce the type of the last step by adding a constraint …","","","Define step constraints.","Adds a shared signal to the circuit with a name string and …","Adds a shared signal to the circuit with a name string and …","Adds a new step type with the specified name to the …","Defines a step type using the provided StepTypeHandler and …","","Sets the trace function that builds the witness. The trace …","DEPRECATED","Adds a transition constraint to the step type. It’s the …","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Represents a constraint with an associated annotation and …","","","Takes an iterator of input constraints and returns a new …","Takes a string annotation and an expression, and returns a …","","","","","","","","","","","","","","","","Takes two constraints and returns a new constraint …","","","","","","","","Returns the argument unchanged.","","","","","","Returns the argument unchanged.","Takes a StepTypeHandler and a constraint, and returns a …","","","Calls U::from(self).","Calls U::from(self).","Takes a constraint and returns a new constraint …","Creates a new empty LookupBuilder object and returns it. …","Takes a StepTypeHandler and returns a new constraint that …","Takes a StepTypeHandler and returns a new constraint that …","Takes a constraint and returns a new constraint …","Takes an iterator of input constraints and returns a new …","Computes the randomized linear combination of the given …","Takes a selector constraint and two other constraints, and …","","","","","","","","","","","Takes a selector constraint and a when_false constraint, …","","","Takes a selector constraint and a when_true constraint, …","Takes two expressions and returns a new expression …","A helper struct for building lookup tables.","","","","","","Adds a source column-lookup column pair to the lookup …","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Adds a selector column specific to the lookup table. …","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","","","","","","","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","","","","","","","","","","","","","","","","","","","","","","","","","Adds a selector column specific to the lookup table. …","Adds a selector column specific to the lookup table. …","","","","","","","","","Returns the argument unchanged.","","Calls U::from(self).","","","","","","","","","","","","Parses JSON into ast::Circuit and compile. Generates a …","Runs MockProver for a single circuit given JSON of …","Compile a ChiquitoHalo2SuperCircuit object from a list of …","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","","","","","","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","","","","","Calls U::from(self).","Calls U::from(self).","","","","","","","","","","","","","","","","","","","","","","","","Returns the argument unchanged.","","Calls U::from(self).","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Returns the argument unchanged.","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","","","","","","","","","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","","","","","","","","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","","","","","","","","","","","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","","","","","Calls U::from(self).","Calls U::from(self).","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","","","","","","","","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Returns the argument unchanged.","","","","","","Calls U::from(self).","","","","","","","","","","","","","","","","Returns the argument unchanged.","","Calls U::from(self).","","","","","","","","","","A struct that can be used a fixed column generation …","A struct that represents a witness generation context. It …","","","","","","","Takes a Queriable object representing the fixed column …","Takes a Queriable object representing the witness column …","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","","Returns the argument unchanged.","","","","","","","","","","","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""],"i":[0,0,0,0,0,0,0,0,0,0,0,24,0,0,0,0,0,0,0,24,0,0,24,0,0,0,3,6,7,7,7,7,7,6,7,7,6,22,23,3,6,7,6,6,7,22,23,3,11,18,9,24,19,26,6,7,22,23,3,11,18,9,24,19,26,7,22,23,3,11,18,9,24,19,26,7,22,23,3,11,18,9,24,19,26,26,6,7,3,6,7,22,23,3,11,18,9,24,19,26,6,7,22,23,3,11,18,9,24,19,26,6,7,22,23,3,11,18,9,24,19,6,7,22,23,3,11,18,9,24,19,26,3,3,6,11,18,9,19,26,7,7,22,23,3,7,7,7,6,7,22,23,3,11,18,9,24,19,26,7,6,5,5,7,22,23,3,11,18,9,24,19,26,7,7,7,6,11,18,9,19,26,7,6,7,22,23,3,11,18,9,24,19,26,6,7,22,23,3,11,18,9,24,19,26,7,6,6,6,9,19,26,11,18,9,19,11,18,7,11,18,7,0,7,7,7,6,7,7,22,23,3,11,18,9,24,19,26,7,6,6,7,22,23,3,11,18,9,24,19,26,6,7,22,23,3,11,18,9,24,19,26,6,7,22,23,3,11,18,9,24,19,26,6,11,18,9,19,26,6,7,22,23,3,11,18,9,24,19,26,32,32,32,32,32,0,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,0,50,50,50,50,0,0,0,51,0,0,0,0,0,51,45,52,20,45,45,51,48,45,52,49,20,51,48,45,52,49,20,0,0,20,20,48,45,51,48,45,52,49,20,51,48,45,52,49,20,20,51,48,45,52,49,20,20,49,49,49,49,20,49,49,51,51,51,48,45,52,49,20,20,20,49,49,51,48,45,52,49,20,48,51,48,45,52,49,20,0,48,52,49,20,20,49,49,49,49,0,48,49,49,49,49,20,49,48,45,51,48,45,52,49,20,51,48,45,52,49,20,51,48,45,52,49,20,52,20,51,48,45,52,49,20,48,52,60,60,0,0,60,0,0,35,35,60,35,60,35,60,35,60,35,60,35,60,35,60,0,60,35,35,60,35,35,35,35,35,35,35,35,35,60,0,35,60,35,60,0,0,0,0,0,0,0,0,0,35,60,35,60,35,60,35,60,35,0,35,60,0,0,0,0,0,0,0,0,63,54,53,65,55,63,65,54,53,55,63,65,54,53,55,46,63,65,54,53,55,54,53,55,63,54,53,63,65,54,53,55,63,65,54,53,55,63,65,54,53,55,63,54,53,55,63,65,54,53,55,53,63,65,54,53,55,63,65,54,53,55,54,53,55,63,65,54,53,55,63,65,54,53,55,63,65,54,53,55,54,63,65,54,53,55,65,55,0,66,66,66,66,66,66,66,66,66,66,66,66,66,0,66,66,66,66,66,0,0,0,0,0,0,0,0,0,0,0,0,0,76,77,79,76,77,79,0,0,76,77,76,77,76,77,79,76,77,79,76,76,77,79,76,77,79,76,77,79,76,77,79,76,79,76,77,79,76,77,79,77,79,76,77,79,76,77,79,77,79,76,77,79,0,76,77,76,77,79,76,77,79,76,77,79,76,77,79,77,79,0,0,88,87,88,87,0,87,87,88,87,88,87,88,87,87,88,87,88,87,88,87,88,87,87,87,88,87,88,87,88,87,88,87,0,70,70,0,70,70,0,0,0,0,70,70,70,70,70,70,0,70,70,70,70,70,0,0,0,0,0,0,93,91,92,93,94,95,91,92,93,94,95,91,92,93,94,95,91,92,93,94,95,91,93,93,94,95,91,92,93,94,95,91,92,93,94,95,91,92,93,94,95,93,93,93,91,92,93,94,95,93,91,91,92,93,94,95,93,93,93,91,92,93,94,95,91,92,93,94,95,91,95,68,94,95,91,93,93,93,93,91,92,93,94,95,91,92,93,94,95,91,92,93,94,95,91,92,93,94,95,91,92,93,94,95,0,0,0,0,0,0,99,96,97,98,99,96,97,98,69,96,97,98,99,96,97,98,99,96,97,98,99,99,96,97,98,99,96,97,98,99,96,97,98,99,96,97,98,99,96,97,98,99,96,97,98,99,97,97,99,96,97,98,99,96,97,98,99,99,99,99,99,99,96,97,98,99,96,97,98,99,96,97,98,99,96,97,98,99,99,96,97,98,102,0,0,0,102,102,102,0,0,0,85,85,103,104,0,75,75,102,85,103,104,75,102,85,103,104,75,102,85,103,104,75,102,85,103,104,75,85,75,75,102,85,103,104,75,102,85,103,104,75,102,85,103,104,85,75,103,104,85,75,75,102,85,103,104,75,102,85,103,104,85,85,102,85,75,75,102,85,103,104,75,102,85,103,104,75,85,85,85,75,0,85,101,0,75,102,85,103,104,75,102,85,103,104,75,102,85,103,104,75,102,85,103,104,85,75,102,85,103,104,0,0,71,80,71,80,71,80,71,80,71,80,71,80,80,71,80,80,71,80,71,80,80,71,80,71,71,71,80,71,80,71,71,80,80,71,80,71,80,71,80,71,71,80,0,0,0,0,0,0,67,67,109,108,67,109,108,108,108,67,109,108,67,109,108,67,109,108,67,109,108,67,109,108,108,67,67,109,67,109,108,67,109,108,109,109,108,67,108,67,109,108,67,109,108,67,109,108,67,109,108,111,0,111,111,111,111,111,111,0,0,0,111,111,111,111,111,111,111,111,111,111,119,111,120,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,0,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,0,0,0,0,0,0,0,0,0,116,117,115,115,106,117,115,105,116,107,106,117,115,105,116,107,106,115,105,107,106,115,105,107,106,115,105,107,106,117,115,105,116,107,106,117,115,105,116,107,115,105,106,117,115,105,116,107,115,115,105,105,116,107,106,117,115,105,116,107,107,106,107,117,116,106,117,115,105,116,107,106,117,115,105,116,107,106,117,115,116,116,105,115,106,115,105,107,115,105,106,117,115,105,116,107,106,117,115,105,116,107,106,117,115,105,116,107,106,117,115,105,116,107],"f":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,[[[3,[[0,[1,2]]]],4,[5,[[0,[1,2]]]],[5,[[0,[1,2]]]]]],[[6,4,5]],[[7,[8,[4]]],9],[[7,[8,[4]],10],11],[[7,12,[14,[13]]],15],[[7,12,[14,[16]]],17],[[7,[8,[4]],10],18],[[6,[8,[4]]],19],[[7,20,[8,[4]]]],[[7,6],21],[[6,4,5]],0,0,0,0,0,0,[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[[7,[2,2]]],[[7,[2,2]]]],[[[22,[2]]],[[22,[2]]]],[[[23,[2]]],[[23,[2]]]],[[[3,[2]]],[[3,[2]]]],[11,11],[18,18],[9,9],[24,24],[19,19],[[[26,[[0,[2,25]]]]],[[26,[[0,[2,25]]]]]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],0,0,[[],7],[[],3],[10],[10],[10],[10],[10],[10],[10],[10],[10],[10],[10],[10],[10],[10],[10],[10],[10],[10],[10],[10],[10],[10],[27,[[29,[[6,[28]]]]]],[27,[[29,[[7,[28]]]]]],[27,[[29,[[22,[28]]]]]],[27,[[29,[[23,[28]]]]]],[27,[[29,[[3,[28]]]]]],[27,[[29,[11]]]],[27,[[29,[18]]]],[27,[[29,[9]]]],[27,[[29,[24]]]],[27,[[29,[19]]]],[10],[10],[10],[10],[10],[10],[10],[10],[10],[10],[10],[[[3,[[0,[1,2]]]],4,[5,[[0,[1,2]]]]]],0,[[6,6],30],[[11,11],30],[[18,18],30],[[9,9],30],[[19,19],30],[[[26,[[0,[31,25]]]],[26,[[0,[31,25]]]]],30],[[7,32,24]],0,0,0,0,0,0,0,[[[6,[1]],33],34],[[[7,[1,1]],33],34],[[[22,[1]],33],34],[[[23,[1]],33],34],[[[3,[1]],33],34],[[11,33],34],[[18,33],34],[[9,33],34],[[24,33],34],[[19,33],34],[[[26,[[0,[1,25]]]],33],34],0,[[]],[35,5],[32,5],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[7,36],[[37,[6]]]],0,0,[[6,38]],[[11,38]],[[18,38]],[[9,38]],[[19,38]],[[[26,[[0,[39,25]]]],38]],0,[[],10],[[],10],[[],10],[[],10],[[],10],[[],10],[[],10],[[],10],[[],10],[[],10],[[],10],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],0,0,0,[[36,4],6],[4,9],[4,19],[[[14,[25]],4],[[26,[25]]]],[[36,10,4],11],[[36,10,4],18],[[36,4],9],[[36,4],19],[[10,4],11],[[10,4],18],0,[11,10],[18,10],0,0,[[7,40]],[[7,41]],0,0,0,[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],0,0,[[],29],[[],29],[[],29],[[],29],[[],29],[[],29],[[],29],[[],29],[[],29],[[],29],[[],29],[[],29],[[],29],[[],29],[[],29],[[],29],[[],29],[[],29],[[],29],[[],29],[[],29],[[],29],[[],42],[[],42],[[],42],[[],42],[[],42],[[],42],[[],42],[[],42],[[],42],[[],42],[[],42],[6,21],[11,36],[18,36],[9,36],[19,36],[[[26,[25]]],36],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],0,0,0,0,0,0,0,0,0,[[[32,[2]],[8,[[5,[2]]]]]],[32,4],[[]],[[]],[[[32,[2]]],[[32,[2]]]],[[]],[10],[10],[27,[[29,[[32,[28]]]]]],[10],[[[32,[31]],[32,[31]]],30],[[[32,[2]]],[[5,[2]]]],[[32,33],34],[[]],[[[32,[39]],38]],[[],10],[[]],[[[32,[2]],[8,[[5,[2]]]]]],[[[32,[2]]]],[32,32],[32,32],[[32,43],32],[[[32,[2]],[8,[[5,[2]]]]]],[[]],[[],29],[[],29],[[],42],[32,36],[[]],0,0,0,[[]],[44],0,0,0,0,0,0,0,0,0,0,[[[45,[[0,[1,2]]]],[46,[[0,[1,2]]]]]],0,0,[[[45,[[0,[47,31,39,1,2]]]],[32,[[0,[47,31,39,1,2]]]],[5,[[0,[47,31,39,1,2]]]]]],[[[45,[[0,[47,31,39,1,2]]]],[32,[[0,[47,31,39,1,2]]]],[5,[[0,[47,31,39,1,2]]]]]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],0,[[12,41],7],[20,20],[[]],[[48,[8,[35]]]],[[45,[8,[35]]]],[10],[10],[10],[10],[10],[10],[10],[10],[10],[10],[10],[10],[27,[[29,[20]]]],[10],[10],[10],[10],[10],[10],[[20,20],30],[[49,32,24]],[[49,12],32],[[[49,[[0,[50,39]]]],41]],[[[49,[1,1]],33],34],[[20,33],34],[[49,12],32],[[49,12,10],32],[20,51],[12,51],[[]],[[]],[[]],[[]],[[]],[[]],[[[52,[41]]],20],[[20,38]],[[49,12,[14,[13]]],32],[[49,12,[14,[16]]],32],[[],10],[[],10],[[],10],[[],10],[[],10],[[],10],[[48,12],32],[[]],[[]],[[]],[[]],[[]],[[]],0,[[36,4,53],48],[[36,12,41],[[52,[41]]]],[[49,54],55],[[36,4],20],[20,32],[49],[[49,[8,[20]]]],[[49,[8,[20]]]],[[49,10]],0,[[48,41]],[[49,12],32],[[49,12,10],32],[[49,12],20],[[49,[8,[51]],56],[[52,[41]]]],[[]],[[49,41]],[[48,[8,[35]]]],[[45,[8,[35]]]],[[],29],[[],29],[[],29],[[],29],[[],29],[[],29],[[],29],[[],29],[[],29],[[],29],[[],29],[[],29],[[],42],[[],42],[[],42],[[],42],[[],42],[[],42],[[[52,[41]]],36],[20,36],[[]],[[]],[[]],[[]],[[]],[[]],[[48,41],[[52,[41]]]],0,0,0,0,0,0,[57,[[35,[[59,[58]]]]]],[[4,[8,[5]],60],35],0,[[]],[[]],[[]],[[]],[[[35,[2]]],[[35,[2]]]],[60,60],[[]],[[]],[10],[10],[10],[10],[10],[10],[[[8,[35]],[8,[35]]],35],[[60,60],30],0,[[35,33],34],[[60,33],34],[61,[[35,[[0,[[59,[58]],1]]]]]],[32,35],[10,[[35,[[0,[[59,[58]],1]]]]]],[[]],[[[5,[1]]],[[35,[1]]]],[62,[[35,[[0,[[59,[58]],1]]]]]],[58,[[35,[[0,[[59,[58]],1]]]]]],[43,[[35,[[0,[50,[59,[58]],1]]]]]],[30,[[35,[[0,[[59,[58]],1]]]]]],[[]],[[[8,[20]],[8,[[35,[2]]]]],[[35,[2]]]],[[],10],[[],10],[[]],[[]],[[[8,[35]]],35],[[],[[63,[[0,[1,2]]]]]],[[[8,[20]]],[[35,[[59,[58]]]]]],[[[8,[20]]],[[35,[[59,[58]]]]]],[[[8,[[35,[[59,[58]]]]]]],[[35,[[59,[58]]]]]],[[[0,[57,2]]],[[35,[[0,[[59,[58]],1]]]]]],[[[0,[[8,[[5,[[59,[58]]]]]],2]]],[[5,[[59,[58]]]]]],[[[8,[[35,[[0,[[59,[58]],2]]]]]],[8,[[35,[[0,[[59,[58]],2]]]]]],[8,[[35,[[0,[[59,[58]],2]]]]]]],[[35,[[0,[[59,[58]],2]]]]]],[[],[[54,[64]]]],[[]],[[]],[[],29],[[],29],[[],29],[[],29],[[],42],[[],42],0,[[[8,[[35,[[0,[[59,[58]],2]]]]]],[8,[[35,[[0,[[59,[58]],2]]]]]]],[[35,[[0,[[59,[58]],2]]]]]],[[]],[[]],[[[8,[[35,[[0,[[59,[58]],2]]]]]],[8,[[35,[[0,[[59,[58]],2]]]]]]],[[35,[[0,[[59,[58]],2]]]]]],[[[8,[[35,[[0,[[59,[58]],2]]]]]],[8,[[35,[[0,[[59,[58]],2]]]]]]],[[35,[[0,[[59,[58]],2]]]]]],0,0,0,0,0,0,[[[63,[[0,[1,2]]]],[8,[[35,[[0,[1,2]]]]]],[8,[[5,[[0,[1,2]]]]]]],[[63,[[0,[1,2]]]]]],[[54,[8,[5]]],54],[[53,54]],[[65,[8,[35]]],65],[[55,[8,[35]]],65],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[45,3],[[63,45],3],[[[65,[[0,[2,1]]]],[45,[[0,[2,1]]]]],[[3,[[0,[2,1]]]]]],[[[54,[2]]],[[54,[2]]]],[53,53],[55,55],[[]],[[]],[[]],[[],63],[[],54],[[],53],[10],[10],[10],[10],[10],[10],[10],[10],[10],[10],[10],[10],[10],[10],[10],[[[63,[[0,[1,2]]]],[8,[[35,[[0,[1,2]]]]]]],[[63,[[0,[1,2]]]]]],[[[54,[1]],33],34],[[[53,[1]],33],34],[[55,33],34],[[]],[[]],[[]],[[]],[[]],[[[53,[2]],36],[[54,[2]]]],[[],10],[[],10],[[],10],[[],10],[[],10],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[],29],[[],29],[[],29],[[],29],[[],29],[[],29],[[],29],[[],29],[[],29],[[],29],[[],42],[[],42],[[],42],[[],42],[[],42],[54,36],[[]],[[]],[[]],[[]],[[]],[[65,[8,[35]]],65],[[55,[8,[35]]],65],0,[[]],[[]],[[[66,[[0,[50,39]]]]],[[67,[[0,[50,39]]]]]],[[],66],[10],[10],[10],[[]],[[],10],[[]],[[[66,[[0,[50,39]]]],41]],[[[66,[[0,[50,39]]]],[70,[68,69]],41]],[[[66,[[0,[50,39]]]],[70,[68,69]],[7,[[0,[50,39]]]]],[[71,[[0,[50,39]]]]]],[[12,41],[[67,[[0,[50,39]]]]]],0,[[],29],[[],29],[[],42],[[]],0,[12,36],[12,36],[[12,36,10]],[[[72,[36]],[73,[36,12]],10]],0,0,0,0,0,0,0,0,[[]],[[]],[[]],[[]],[[]],[[]],[[[75,[[0,[74,[59,[58]],39]]]]],[[76,[[0,[74,[59,[58]],39]]]]]],[[[67,[[0,[74,[59,[58]],39]]]]],[[72,[[76,[[0,[74,[59,[58]],39]]]]]]]],[[[76,[[0,[2,74,[59,[58]]]]]]],[[76,[[0,[2,74,[59,[58]]]]]]]],[[[77,[[0,[2,74,[59,[58]]]]]]],[[77,[[0,[2,74,[59,[58]]]]]]]],[[]],[[]],[[[76,[[0,[74,[59,[58]],39]]]],[78,[[0,[74,[59,[58]],39]]]]]],[[[78,[[0,[74,[59,[58]],39]]]]]],[[[78,[[0,[74,[59,[58]],39]]]]]],[[[76,[[0,[74,[59,[58]],39]]]],[78,[[0,[74,[59,[58]],39]]]]]],[[[78,[[0,[74,[59,[58]],39]]]]]],[[[78,[[0,[74,[59,[58]],39]]]]]],0,[[],[[76,[[0,[64,74,[59,[58]]]]]]]],[[],[[77,[[0,[64,74,[59,[58]]]]]]]],[[],[[79,[[0,[64,74,[59,[58]]]]]]]],[10],[10],[10],[10],[10],[10],[10],[10],[10],[[[76,[[0,[1,74,[59,[58]]]]]],33],34],[[[79,[[0,[1,74,[59,[58]]]]]],33],34],[[]],[[]],[[]],[[],10],[[],10],[[],10],[[[77,[[0,[74,[59,[58]],39]]]]],[[72,[[72,[[0,[74,[59,[58]],39]]]]]]]],[[[79,[[0,[74,[59,[58]],39]]]]],[[72,[[72,[[0,[74,[59,[58]],39]]]]]]]],[[]],[[]],[[]],[[[75,[[0,[74,[59,[58]],39]]]]],[[76,[[0,[74,[59,[58]],39]]]]]],[[[76,[[0,[74,[59,[58]],39]]]],[81,[[80,[[0,[74,[59,[58]],39]]]]]]],[[77,[[0,[74,[59,[58]],39]]]]]],[[[72,[[76,[[0,[74,[59,[58]],39]]]]]],[82,[[0,[74,[59,[58]],39]]]]],[[79,[[0,[74,[59,[58]],39]]]]]],[[[77,[[0,[74,[59,[58]],39]]]]]],[[[79,[[0,[74,[59,[58]],39]]]]]],[[[76,[[0,[74,[59,[58]],39]]]],[83,[[0,[74,[59,[58]],39]]]],[81,[[80,[[0,[74,[59,[58]],39]]]]]]]],[[[77,[[0,[74,[59,[58]],39]]]],[83,[[0,[74,[59,[58]],39]]]]],[[29,[84]]]],[[[79,[[0,[74,[59,[58]],39]]]],[83,[[0,[74,[59,[58]],39]]]]],[[29,[84]]]],[[[78,[74]],85],[[14,[13]]]],[[]],[[]],[[],29],[[],29],[[],29],[[],29],[[],29],[[],29],[[],42],[[],42],[[],42],[[]],[[]],[[]],[[[77,[[0,[74,[59,[58]],39]]]]],[[77,[[0,[74,[59,[58]],39]]]]]],[[[79,[[0,[74,[59,[58]],39]]]]],[[79,[[0,[74,[59,[58]],39]]]]]],0,0,[[]],[[]],[[]],[[]],[[[75,[86]],62,30]],[[[87,[[0,[2,86]]]]],[[87,[[0,[2,86]]]]]],[[]],[10],[10],[10],[10],[10],[10],[[[87,[[0,[1,86]]]],33],34],[[]],[[]],[[88,[81,[[80,[[0,[86,39]]]]]]],89],[[[87,[86]],62],90],[[],10],[[],10],[[]],[[]],[[[75,[86]],30],[[87,[86]]]],[[]],[[],29],[[],29],[[],29],[[],29],[[],42],[[],42],[[]],[[]],0,[[]],[[]],0,[[[70,[[0,[2,68]],[0,[2,69]]]]],[[70,[[0,[2,68]],[0,[2,69]]]]]],[[]],[[[70,[68,69]],[7,[[0,[50,39,2]]]]]],[[[70,[68,69]],[7,[[0,[50,39,2]]]]]],[[[0,[[0,[50,2]]]]]],[[68,69],[[70,[68,69]]]],[10],[10],[10],[[]],[[],10],[[]],0,[[]],[[],29],[[],29],[[],42],[[]],0,0,0,0,0,0,0,[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[91,91],[92,92],[93,93],[94,94],[95,95],[[]],[[]],[[]],[[]],[[]],0,0,[[],93],[[],94],[[],95],[10],[10],[10],[10],[10],[10],[10],[10],[10],[10],[10],[10],[10],[10],[10],[[93,21,19],91],[93,62],0,[[91,33],34],[[92,33],34],[[93,33],34],[[94,33],34],[[95,33],34],0,[[]],[[],91],[[]],[[]],[[]],[[]],[[93,9],[[81,[91]]]],[[93,11],[[81,[91]]]],[[93,18],[[81,[91]]]],[[],10],[[],10],[[],10],[[],10],[[],10],[[]],[[]],[[]],[[]],[[]],[[85,43],91],[[10,30],95],0,0,0,0,[93,30],0,[[93,21],62],0,[[]],[[]],[[]],[[]],[[]],[[],29],[[],29],[[],29],[[],29],[[],29],[[],29],[[],29],[[],29],[[],29],[[],29],[[],42],[[],42],[[],42],[[],42],[[],42],[[]],[[]],[[]],[[]],[[]],0,0,0,0,0,0,[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[[0,[50]]]],[[96,[0,[50]]]],[[97,[0,[50]]]],[[98,[0,[50]]]],[[[99,[2]]],[[99,[2]]]],[96,96],[97,97],[98,98],[[]],[[]],[[]],[[]],0,[[],99],[[],96],[[],97],[[],98],[10],[10],[10],[10],[10],[10],[10],[10],[10],[10],[10],[10],[[[99,[1]],33],34],[[96,33],34],[[97,33],34],[[98,33],34],[[]],[[]],[[]],[[]],[[[99,[2]],21],[[72,[[100,[2]]]]]],0,0,[[],10],[[],10],[[],10],[[],10],[[]],[[]],[[]],[[]],[[[99,[2]],21,62],[[101,[2]]]],[[[99,[2]],21,[101,[2]]],[[101,[2]]]],0,0,0,[[]],[[]],[[]],[[]],[[],29],[[],29],[[],29],[[],29],[[],29],[[],29],[[],29],[[],29],[[],42],[[],42],[[],42],[[],42],[[[99,[2]],21],[[101,[2]]]],[[]],[[]],[[]],[[]],0,0,0,0,0,0,0,0,0,0,[[[8,[4]],10],85],0,0,0,0,0,[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[[75,[2]]],[[75,[2]]]],[102,102],[85,85],[[[103,[2]]],[[103,[2]]]],[[[104,[2]]],[[104,[2]]]],[[]],[[]],[[]],[[]],[[]],0,0,[[],[[75,[64]]]],[10],[10],[10],[10],[10],[10],[10],[10],[10],[10],[10],[10],[10],[10],[10],[[85,85],30],0,0,0,[[[8,[4]]],85],0,[[[75,[1]],33],34],[[102,33],34],[[85,33],34],[[[103,[1]],33],34],[[[104,[1]],33],34],[[]],[[]],[[]],[[]],[[]],0,0,[[102,38]],[[85,38]],0,[[],10],[[],10],[[],10],[[],10],[[],10],[[]],[[]],[[]],[[]],[[]],0,[[[8,[4]],15],85],[[[8,[4]],17],85],0,0,0,[[85,43,[8,[4]]],101],[[[101,[2]],43],[[101,[2]]]],0,[[]],[[]],[[]],[[]],[[]],[[],29],[[],29],[[],29],[[],29],[[],29],[[],29],[[],29],[[],29],[[],29],[[],29],[[],42],[[],42],[[],42],[[],42],[[],42],[85,36],[[]],[[]],[[]],[[]],[[]],0,0,[[]],[[]],[[]],[[]],[[[71,[2]]],[[71,[2]]]],[[[80,[2]]],[[80,[2]]]],[[]],[[]],[[],[[71,[2]]]],[[],80],[10],[10],[80],[10],[80],[10],[10],[10],[36,[[71,[[0,[50,39]]]]]],[[[80,[1]],33],34],[[[80,[1]],33],34],[[]],[[]],[[[71,[[0,[50,39]]]]],[[80,[[0,[50,39]]]]]],[[[71,[[0,[50,39]]]],[105,[[0,[50,39]]]]],[[80,[[0,[50,39]]]]]],[[],10],[[],10],[[]],[[]],[[[72,[85]],93,[99,[[0,[50,39]]]],[106,[[0,[50,39]]]],[107,[[0,[50,39]]]],10,36],[[71,[[0,[50,39]]]]]],[[]],[[]],[[],4],[[],29],[[],29],[[],29],[[],29],[[],42],[[],42],[[[71,[[0,[50,39]]]]],36],[[]],[[]],0,0,0,0,0,0,[[67,75]],[[]],[[]],[[]],[[]],[[]],[[]],[108,108],[[]],[[],67],[[],109],[[],108],[10],[10],[10],[10],[10],[10],[10],[10],[10],[[]],[[]],[[]],[[[108,[[0,[50,39]]]]],[[82,[[0,[50,39]]]]]],[67,108],[[[67,[2]]],[[72,[[75,[2]]]]]],[[[109,[[0,[50,39]]]]],[[82,[[0,[50,39]]]]]],[[],10],[[],10],[[],10],[[]],[[]],[[]],[[[109,[[0,[50,39]]]],[71,[[0,[50,39]]]]]],[[[109,[[0,[50,39]]]],[71,[[0,[50,39]]]],[105,[[0,[50,39]]]]]],[[[37,[[110,[[0,[50,39]]]]]]],[[108,[[0,[50,39]]]]]],[[[67,[[0,[50,39]]]],41]],[[]],[[],29],[[],29],[[],29],[[],29],[[],29],[[],29],[[],42],[[],42],[[],42],[[]],[[]],[[]],0,0,0,0,0,0,0,0,0,0,0,[[111,[8,[111]]],111],[[]],[[]],[[[111,[2,2]]],[[111,[2,2]]]],[[]],[10],[10],[27,[[29,[[111,[28,[32,[28]]]]]]]],[10],[[[111,[[0,[50,39]],[0,[47,31,39]]]],[112,[[0,[50,39]],[0,[47,31,39]]]]],[[81,[[0,[50,39]]]]]],[[],111],[[[111,[2,2]]],[[111,[2,2]]]],[[]],[[[111,[1,1]],33],34],[43,[[111,[[0,[50,[59,[58]]]]]]]],[30,[[111,[[59,[58]]]]]],[61,[[111,[[59,[58]]]]]],[[]],[58,[[111,[[59,[58]]]]]],[113,111],[62,[[111,[[59,[58]]]]]],[10,[[111,[[59,[58]]]]]],[[],10],[[]],[[111,[8,[111]]],111],[111,111],[[[111,[2]],43],[[101,[2]]]],[[111,[8,[111]]],111],[[]],[[],29],[[],29],[[],42],[[]],0,[[]],[[]],[10],[10],[10],[[]],[[],10],[[]],[[[114,[[0,[50,[59,[58]]]]]]],[[35,[[0,[50,[59,[58]]]]]]]],[[[48,[[0,[50,[59,[58]]]]]],[8,[[35,[[0,[50,[59,[58]]]]]]]],[32,[[0,[50,[59,[58]]]]]]],[[114,[[0,[50,[59,[58]]]]]]]],[[],29],[[],29],[[],42],[[]],[[[114,[[0,[50,47,39]]]],[115,[[0,[50,47,39]]]],[0,[50,47,39]]]],0,0,0,0,0,0,0,0,0,[[116,[52,[41]]]],[[[117,[[0,[50,39]]]],10,[32,[[0,[50,39]]]],[0,[50,39]]]],[[[115,[[0,[47,39]]]],[32,[[0,[47,39]]]],[0,[47,39]]]],0,[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[106,106],[[[115,[2]]],[[115,[2]]]],[[[105,[2]]],[[105,[2]]]],[[[107,[2]]],[[107,[2]]]],[[]],[[]],[[]],[[]],[[],106],[[],[[115,[64]]]],[[],[[105,[64]]]],[[],107],[10],[10],[10],[10],[10],[10],[10],[10],[10],[10],[10],[10],[27,[[29,[[115,[28]]]]]],[27,[[29,[[105,[28]]]]]],[10],[10],[10],[10],[10],[10],[[[115,[1]],33],34],[[[115,[1]],33],34],[[[105,[1]],33],34],[[[105,[1]],33],34],[[[116,[1]],33],34],[[[107,[1]],33],34],[[]],[[]],[[]],[[]],[[]],[[[7,[2]]],[[107,[2]]]],[[]],[[[106,[64]]],[[105,[64]]]],[[[107,[[0,[50,47,31,39,2]]]],[105,[[0,[50,47,31,39,2]]]]],[[105,[[0,[50,47,31,39,2]]]]]],[[[117,[[0,[50,39]]]]],[[40,[[0,[50,39]]]]]],[[[116,[64]]],[[105,[64]]]],[[],10],[[],10],[[],10],[[],10],[[],10],[[],10],[[]],[[]],[[]],[[]],[[]],[[]],[[[37,[[118,[64]]]],10],[[106,[64]]]],[10,[[117,[[0,[50,39]]]]]],[21,115],[10,[[116,[64]]]],[[116,[52,[41]],41]],0,0,[[]],[[]],[[]],[[]],[[],4],[[],4],[[],29],[[],29],[[],29],[[],29],[[],29],[[],29],[[],29],[[],29],[[],29],[[],29],[[],29],[[],29],[[],42],[[],42],[[],42],[[],42],[[],42],[[],42],[[]],[[]],[[]],[[]],[[]],[[]]],"c":[],"p":[[8,"Debug"],[8,"Clone"],[3,"Lookup"],[3,"String"],[6,"ASTExpr"],[3,"StepType"],[3,"Circuit"],[8,"Into"],[3,"FixedSignal"],[15,"usize"],[3,"ForwardSignal"],[15,"str"],[3,"Advice"],[3,"Column"],[6,"ImportedHalo2Advice"],[3,"Fixed"],[6,"ImportedHalo2Fixed"],[3,"SharedSignal"],[3,"InternalSignal"],[3,"StepTypeHandler"],[6,"StepTypeUUID"],[3,"Constraint"],[3,"TransitionConstraint"],[4,"ExposeOffset"],[8,"ColumnType"],[3,"ImportedHalo2Column"],[8,"Deserializer"],[3,"Fr"],[4,"Result"],[15,"bool"],[8,"PartialEq"],[4,"Queriable"],[3,"Formatter"],[6,"Result"],[3,"Constraint"],[15,"u128"],[3,"Rc"],[8,"Hasher"],[8,"Hash"],[6,"FixedAssignment"],[8,"Fn"],[3,"TypeId"],[15,"i32"],[8,"AsRef"],[3,"StepTypeSetupContext"],[8,"LookupBuilder"],[8,"Eq"],[3,"StepTypeContext"],[3,"CircuitContext"],[8,"Field"],[4,"StepTypeDefInput"],[3,"StepTypeWGHandler"],[3,"LookupTableRegistry"],[3,"LookupTableStore"],[3,"LookupTable"],[8,"FnOnce"],[8,"IntoIterator"],[15,"u64"],[8,"From"],[4,"Typing"],[15,"u8"],[15,"u32"],[3,"InPlaceLookupBuilder"],[8,"Default"],[3,"LookupTableBuilder"],[3,"SuperCircuitContext"],[3,"SuperCircuit"],[8,"CellManager"],[8,"StepSelectorBuilder"],[3,"CompilerConfig"],[3,"AssignmentGenerator"],[3,"Vec"],[3,"HashMap"],[8,"Field"],[3,"Circuit"],[3,"ChiquitoHalo2"],[3,"ChiquitoHalo2Circuit"],[3,"ConstraintSystem"],[3,"ChiquitoHalo2SuperCircuit"],[3,"Assignments"],[4,"Option"],[6,"SuperAssignments"],[8,"Layouter"],[4,"Error"],[3,"Column"],[8,"PrimeField"],[3,"ChiquitoPlaf"],[3,"ChiquitoPlafWitGen"],[3,"Witness"],[3,"Plaf"],[3,"SignalPlacement"],[3,"StepPlacement"],[3,"Placement"],[3,"SingleRowCellManager"],[3,"MaxWidthCellManager"],[3,"SimpleStepSelectorBuilder"],[3,"TwoStepsSelectorBuilder"],[3,"LogNSelectorBuilder"],[3,"StepSelector"],[6,"SelectorAssignment"],[6,"PolyExpr"],[4,"ColumnType"],[3,"Poly"],[3,"PolyLookup"],[3,"TraceWitness"],[3,"TraceGenerator"],[3,"AutoTraceGenerator"],[3,"MappingGenerator"],[3,"MappingContext"],[6,"Mapping"],[4,"Expr"],[6,"VarAssignments"],[4,"Expression"],[3,"IsZero"],[3,"StepInstance"],[3,"TraceContext"],[3,"FixedGenContext"],[6,"Trace"],[8,"ToExpr"],[8,"ToField"]]}\ +}'); +if (typeof window !== 'undefined' && window.initSearch) {window.initSearch(searchIndex)}; +if (typeof exports !== 'undefined') {exports.searchIndex = searchIndex}; diff --git a/docs/apidocs/settings.html b/docs/apidocs/settings.html new file mode 100644 index 00000000..966c0e94 --- /dev/null +++ b/docs/apidocs/settings.html @@ -0,0 +1 @@ +Rustdoc settings

Rustdoc settings

Back
\ No newline at end of file diff --git a/docs/apidocs/source-files.js b/docs/apidocs/source-files.js new file mode 100644 index 00000000..f864b990 --- /dev/null +++ b/docs/apidocs/source-files.js @@ -0,0 +1,4 @@ +var sourcesIndex = JSON.parse('{\ +"chiquito":["",[["ast",[],["mod.rs","query.rs"]],["frontend",[["dsl",[],["cb.rs","lb.rs","mod.rs","sc.rs"]],["python",[],["mod.rs"]]],["mod.rs"]],["plonkish",[["backend",[],["halo2.rs","mod.rs","plaf.rs"]],["compiler",[],["cell_manager.rs","mod.rs","step_selector.rs","unit.rs"]],["ir",[],["assignments.rs","mod.rs","query.rs","sc.rs"]]],["mod.rs"]]],["field.rs","lib.rs","poly.rs","stdlib.rs","util.rs","wit_gen.rs"]]\ +}'); +createSourceSidebar(); diff --git a/docs/apidocs/src/chiquito/ast/mod.rs.html b/docs/apidocs/src/chiquito/ast/mod.rs.html new file mode 100644 index 00000000..32c65839 --- /dev/null +++ b/docs/apidocs/src/chiquito/ast/mod.rs.html @@ -0,0 +1,1067 @@ +mod.rs - source
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+465
+466
+467
+468
+469
+470
+471
+472
+473
+474
+475
+476
+477
+478
+479
+480
+481
+482
+483
+484
+485
+486
+487
+488
+489
+490
+491
+492
+493
+494
+495
+496
+497
+498
+499
+500
+501
+502
+503
+504
+505
+506
+507
+508
+509
+510
+511
+512
+513
+514
+515
+516
+517
+518
+519
+520
+521
+522
+523
+524
+525
+526
+527
+528
+529
+530
+531
+532
+533
+
pub mod query;
+
+use std::{collections::HashMap, fmt::Debug, hash::Hash, rc::Rc};
+
+use crate::{
+    frontend::dsl::StepTypeHandler,
+    poly::Expr,
+    util::{uuid, UUID},
+    wit_gen::{FixedAssignment, FixedGenContext, Trace, TraceContext},
+};
+
+use halo2_proofs::plonk::{Advice, Column as Halo2Column, ColumnType, Fixed};
+
+use self::query::Queriable;
+
+/// Circuit
+#[derive(Clone)]
+pub struct Circuit<F, TraceArgs> {
+    pub step_types: HashMap<UUID, Rc<StepType<F>>>,
+
+    pub forward_signals: Vec<ForwardSignal>,
+    pub shared_signals: Vec<SharedSignal>,
+    pub fixed_signals: Vec<FixedSignal>,
+    pub halo2_advice: Vec<ImportedHalo2Advice>,
+    pub halo2_fixed: Vec<ImportedHalo2Fixed>,
+    pub exposed: Vec<(Queriable<F>, ExposeOffset)>,
+
+    pub annotations: HashMap<UUID, String>,
+
+    pub trace: Option<Rc<Trace<F, TraceArgs>>>,
+    pub fixed_assignments: Option<FixedAssignment<F>>,
+
+    pub first_step: Option<StepTypeUUID>,
+    pub last_step: Option<StepTypeUUID>,
+    pub num_steps: usize,
+    pub q_enable: bool,
+
+    pub id: UUID,
+}
+
+impl<F: Debug, TraceArgs: Debug> Debug for Circuit<F, TraceArgs> {
+    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
+        f.debug_struct("Circuit")
+            .field("step_types", &self.step_types)
+            .field("forward_signals", &self.forward_signals)
+            .field("shared_signals", &self.shared_signals)
+            .field("fixed_signals", &self.fixed_signals)
+            .field("halo2_advice", &self.halo2_advice)
+            .field("halo2_fixed", &self.halo2_fixed)
+            .field("exposed", &self.exposed)
+            .field("annotations", &self.annotations)
+            .field("fixed_assignments", &self.fixed_assignments)
+            .field("first_step", &self.first_step)
+            .field("last_step", &self.last_step)
+            .field("num_steps", &self.num_steps)
+            .field("q_enable", &self.q_enable)
+            .finish()
+    }
+}
+
+impl<F, TraceArgs> Default for Circuit<F, TraceArgs> {
+    fn default() -> Self {
+        Self {
+            step_types: Default::default(),
+            forward_signals: Default::default(),
+            shared_signals: Default::default(),
+            fixed_signals: Default::default(),
+            halo2_advice: Default::default(),
+            halo2_fixed: Default::default(),
+            exposed: Default::default(),
+
+            num_steps: Default::default(),
+
+            annotations: Default::default(),
+
+            trace: None,
+            fixed_assignments: None,
+
+            first_step: None,
+            last_step: None,
+
+            id: uuid(),
+            q_enable: true,
+        }
+    }
+}
+
+impl<F, TraceArgs> Circuit<F, TraceArgs> {
+    pub fn add_forward<N: Into<String>>(&mut self, name: N, phase: usize) -> ForwardSignal {
+        let name = name.into();
+        let signal = ForwardSignal::new_with_phase(phase, name.clone());
+
+        self.forward_signals.push(signal);
+        self.annotations.insert(signal.uuid(), name);
+
+        signal
+    }
+
+    pub fn add_shared<N: Into<String>>(&mut self, name: N, phase: usize) -> SharedSignal {
+        let name = name.into();
+        let signal = SharedSignal::new_with_phase(phase, name.clone());
+
+        self.shared_signals.push(signal);
+        self.annotations.insert(signal.uuid(), name);
+
+        signal
+    }
+
+    pub fn add_fixed<N: Into<String>>(&mut self, name: N) -> FixedSignal {
+        let name = name.into();
+        let signal = FixedSignal::new(name.clone());
+
+        self.fixed_signals.push(signal);
+        self.annotations.insert(signal.uuid(), name);
+
+        signal
+    }
+
+    pub fn expose(&mut self, signal: Queriable<F>, offset: ExposeOffset) {
+        match signal {
+            Queriable::Forward(..) | Queriable::Shared(..) => {
+                self.exposed.push((signal, offset));
+            }
+            _ => panic!("Can only expose forward and shared signals."),
+        }
+    }
+
+    pub fn add_halo2_advice(
+        &mut self,
+        name: &str,
+        column: Halo2Column<Advice>,
+    ) -> ImportedHalo2Advice {
+        let advice = ImportedHalo2Advice::new(column, name.to_string());
+
+        self.halo2_advice.push(advice);
+        self.annotations.insert(advice.uuid(), name.to_string());
+
+        advice
+    }
+
+    pub fn add_halo2_fixed(
+        &mut self,
+        name: &str,
+        column: Halo2Column<Fixed>,
+    ) -> ImportedHalo2Fixed {
+        let advice = ImportedHalo2Fixed::new(column, name.to_string());
+
+        self.halo2_fixed.push(advice);
+        self.annotations.insert(advice.uuid(), name.to_string());
+
+        advice
+    }
+
+    pub fn add_step_type<N: Into<String>>(&mut self, handler: StepTypeHandler, name: N) {
+        self.annotations.insert(handler.uuid(), name.into());
+    }
+
+    pub fn add_step_type_def(&mut self, step: StepType<F>) -> StepTypeUUID {
+        let uuid = step.uuid();
+        let step_rc = Rc::new(step);
+        self.step_types.insert(uuid, step_rc);
+
+        uuid
+    }
+
+    pub fn set_trace<D>(&mut self, def: D)
+    where
+        D: Fn(&mut TraceContext<F>, TraceArgs) + 'static,
+    {
+        match self.trace {
+            None => {
+                self.trace = Some(Rc::new(def));
+            }
+            Some(_) => panic!("circuit cannot have more than one trace generator"),
+        }
+    }
+
+    pub fn get_step_type(&self, uuid: UUID) -> Rc<StepType<F>> {
+        let step_rc = self.step_types.get(&uuid).expect("step type not found");
+
+        Rc::clone(step_rc)
+    }
+
+    pub fn set_fixed_assignments(&mut self, assignments: FixedAssignment<F>) {
+        match self.fixed_assignments {
+            None => {
+                self.fixed_assignments = Some(assignments);
+            }
+            Some(_) => panic!("circuit cannot have more than one fixed generator"),
+        }
+    }
+}
+
+pub type FixedGen<F> = dyn Fn(&mut FixedGenContext<F>) + 'static;
+
+pub type StepTypeUUID = UUID;
+
+/// Step
+pub struct StepType<F> {
+    id: StepTypeUUID,
+
+    pub name: String,
+    pub signals: Vec<InternalSignal>,
+    pub constraints: Vec<Constraint<F>>,
+    pub transition_constraints: Vec<TransitionConstraint<F>>,
+    pub lookups: Vec<Lookup<F>>,
+
+    pub auto_signals: HashMap<Queriable<F>, ASTExpr<F>>,
+
+    pub annotations: HashMap<UUID, String>,
+}
+
+impl<F: Debug> Debug for StepType<F> {
+    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
+        f.debug_struct("StepType")
+            .field("id", &self.id)
+            .field("signals", &self.signals)
+            .field("constraints", &self.constraints)
+            .field("transition_constraints", &self.transition_constraints)
+            .field("lookups", &self.lookups)
+            .finish()
+    }
+}
+
+impl<F> StepType<F> {
+    pub fn new(uuid: UUID, name: String) -> Self {
+        Self {
+            id: uuid,
+            name,
+            signals: Default::default(),
+            constraints: Default::default(),
+            transition_constraints: Default::default(),
+            lookups: Default::default(),
+            auto_signals: Default::default(),
+            annotations: Default::default(),
+        }
+    }
+
+    pub fn uuid(&self) -> StepTypeUUID {
+        self.id
+    }
+
+    pub fn add_signal<N: Into<String>>(&mut self, name: N) -> InternalSignal {
+        let name = name.into();
+        let signal = InternalSignal::new(name.clone());
+
+        self.signals.push(signal);
+        self.annotations.insert(signal.uuid(), name);
+
+        signal
+    }
+
+    pub fn add_constr(&mut self, annotation: String, expr: ASTExpr<F>) {
+        let condition = Constraint { annotation, expr };
+
+        self.constraints.push(condition)
+    }
+
+    pub fn add_transition(&mut self, annotation: String, expr: ASTExpr<F>) {
+        let condition = TransitionConstraint { annotation, expr };
+
+        self.transition_constraints.push(condition)
+    }
+}
+
+impl<F> PartialEq for StepType<F> {
+    fn eq(&self, other: &Self) -> bool {
+        self.id == other.id
+    }
+}
+
+impl<F> Eq for StepType<F> {}
+
+impl<F> core::hash::Hash for StepType<F> {
+    fn hash<H: std::hash::Hasher>(&self, state: &mut H) {
+        self.id.hash(state);
+    }
+}
+
+pub type ASTExpr<F> = Expr<F, Queriable<F>>;
+
+#[derive(Clone, Debug)]
+/// Condition
+pub struct Constraint<F> {
+    pub annotation: String,
+    pub expr: ASTExpr<F>,
+}
+
+#[derive(Clone, Debug)]
+/// TransitionCondition
+pub struct TransitionConstraint<F> {
+    pub annotation: String,
+    pub expr: ASTExpr<F>,
+}
+
+#[derive(Clone, Debug)]
+pub struct Lookup<F> {
+    pub annotation: String,
+    pub exprs: Vec<(Constraint<F>, ASTExpr<F>)>,
+    pub enable: Option<Constraint<F>>,
+}
+
+impl<F> Default for Lookup<F> {
+    fn default() -> Self {
+        Lookup {
+            annotation: String::new(),
+            exprs: Vec::<(Constraint<F>, ASTExpr<F>)>::new(),
+            enable: None,
+        }
+    }
+}
+
+impl<F: Debug + Clone> Lookup<F> {
+    // Function: adds (constraint, expression) to exprs if there's no enabler, OR add (enabler *
+    // constraint, expression) to exprs if there's enabler Note that constraint_annotation and
+    // constraint_expr are passed in as separate parameters, and then reconstructed as Constraint,
+    // because dsl uses cb::Constraint while ast uses ast::Constraint
+    pub fn add(
+        &mut self,
+        constraint_annotation: String,
+        constraint_expr: ASTExpr<F>,
+        expression: ASTExpr<F>,
+    ) {
+        let constraint = Constraint {
+            annotation: constraint_annotation,
+            expr: constraint_expr,
+        };
+        self.annotation += &format!("match({} => {:?}) ", &constraint.annotation, &expression); // expression: Expr<F> is formatted using the fmt method defined in the Debug trait
+        match self.enable {
+            None => {
+                self.exprs.push((constraint, expression));
+            }
+            Some(_) => {
+                self.exprs.push((
+                    Self::multiply_constraints(self.enable.clone().unwrap(), constraint),
+                    expression,
+                ));
+            }
+        }
+    }
+
+    // Function: setup the enabler field and multiply all LHS constraints by the enabler if there's
+    // no enabler, OR panic if there's an enabler already
+    pub fn enable(&mut self, enable_annotation: String, enable_expr: ASTExpr<F>) {
+        let enable = Constraint {
+            annotation: enable_annotation.clone(),
+            expr: enable_expr,
+        };
+        match self.enable {
+            None => {
+                // Multiply all LHS constraints by the enabler
+                for (constraint, _) in &mut self.exprs {
+                    *constraint = Self::multiply_constraints(enable.clone(), constraint.clone());
+                }
+                self.enable = Some(enable);
+                self.annotation = format!("if {}, ", enable_annotation) + &self.annotation;
+            }
+            Some(_) => panic!("Enable constraint already exists"),
+        }
+    }
+
+    // Function: helper function for multiplying enabler to constraint
+    fn multiply_constraints(enable: Constraint<F>, constraint: Constraint<F>) -> Constraint<F> {
+        Constraint {
+            annotation: constraint.annotation.clone(), /* annotation only takes the constraint's
+                                                        * annotation, because enabler's
+                                                        * annotation is already included in the
+                                                        * enable function above in the format of
+                                                        * "if {enable}" */
+            expr: enable.expr * constraint.expr,
+        }
+    }
+}
+
+#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
+/// ForwardSignal
+pub struct ForwardSignal {
+    id: UUID,
+    phase: usize,
+    annotation: &'static str,
+}
+
+impl ForwardSignal {
+    pub fn new_with_phase(phase: usize, annotation: String) -> ForwardSignal {
+        ForwardSignal {
+            id: uuid(),
+            phase,
+            annotation: Box::leak(annotation.into_boxed_str()),
+        }
+    }
+
+    pub fn new_with_id(id: UUID, phase: usize, annotation: String) -> Self {
+        Self {
+            id,
+            phase,
+            annotation: Box::leak(annotation.into_boxed_str()),
+        }
+    }
+
+    pub fn uuid(&self) -> UUID {
+        self.id
+    }
+
+    pub fn phase(&self) -> usize {
+        self.phase
+    }
+}
+
+#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
+pub struct SharedSignal {
+    id: UUID,
+    phase: usize,
+    annotation: &'static str,
+}
+
+impl SharedSignal {
+    pub fn new_with_phase(phase: usize, annotation: String) -> SharedSignal {
+        SharedSignal {
+            id: uuid(),
+            phase,
+            annotation: Box::leak(annotation.into_boxed_str()),
+        }
+    }
+
+    pub fn new_with_id(id: UUID, phase: usize, annotation: String) -> Self {
+        Self {
+            id,
+            phase,
+            annotation: Box::leak(annotation.into_boxed_str()),
+        }
+    }
+
+    pub fn uuid(&self) -> UUID {
+        self.id
+    }
+
+    pub fn phase(&self) -> usize {
+        self.phase
+    }
+}
+
+#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
+pub struct FixedSignal {
+    id: UUID,
+    annotation: &'static str,
+}
+
+impl FixedSignal {
+    pub fn new(annotation: String) -> FixedSignal {
+        FixedSignal {
+            id: uuid(),
+            annotation: Box::leak(annotation.into_boxed_str()),
+        }
+    }
+
+    pub fn new_with_id(id: UUID, annotation: String) -> Self {
+        Self {
+            id,
+            annotation: Box::leak(annotation.into_boxed_str()),
+        }
+    }
+
+    pub fn uuid(&self) -> UUID {
+        self.id
+    }
+}
+
+#[derive(Clone, Copy, Debug)]
+pub enum ExposeOffset {
+    First,
+    Last,
+    Step(usize),
+}
+#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
+pub struct InternalSignal {
+    id: UUID,
+    annotation: &'static str,
+}
+
+impl InternalSignal {
+    pub fn new(annotation: String) -> InternalSignal {
+        InternalSignal {
+            id: uuid(),
+            annotation: Box::leak(annotation.into_boxed_str()),
+        }
+    }
+
+    pub fn new_with_id(id: UUID, annotation: String) -> Self {
+        Self {
+            id,
+            annotation: Box::leak(annotation.into_boxed_str()),
+        }
+    }
+
+    pub fn uuid(&self) -> UUID {
+        self.id
+    }
+}
+
+#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
+pub struct ImportedHalo2Column<CT: ColumnType> {
+    id: UUID,
+    pub column: Halo2Column<CT>,
+    annotation: &'static str,
+}
+
+impl<CT: ColumnType> ImportedHalo2Column<CT> {
+    pub fn new(column: Halo2Column<CT>, annotation: String) -> ImportedHalo2Column<CT> {
+        ImportedHalo2Column {
+            id: uuid(),
+            column,
+            annotation: Box::leak(annotation.into_boxed_str()),
+        }
+    }
+
+    pub fn uuid(&self) -> UUID {
+        self.id
+    }
+}
+
+pub type ImportedHalo2Advice = ImportedHalo2Column<Advice>;
+pub type ImportedHalo2Fixed = ImportedHalo2Column<Fixed>;
+
+#[cfg(test)]
+mod tests {
+    use super::*;
+
+    #[test]
+    fn test_q_enable() {
+        let circuit: Circuit<i32, i32> = Circuit::default();
+        assert!(circuit.q_enable);
+    }
+}
+
\ No newline at end of file diff --git a/docs/apidocs/src/chiquito/ast/query.rs.html b/docs/apidocs/src/chiquito/ast/query.rs.html new file mode 100644 index 00000000..199f43ba --- /dev/null +++ b/docs/apidocs/src/chiquito/ast/query.rs.html @@ -0,0 +1,429 @@ +query.rs - source
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+
use std::{
+    fmt::Debug,
+    marker::PhantomData,
+    ops::{Add, Mul, Neg, Sub},
+};
+
+use crate::{
+    ast::{
+        FixedSignal, ForwardSignal, ImportedHalo2Advice, ImportedHalo2Fixed, InternalSignal,
+        SharedSignal,
+    },
+    frontend::dsl::StepTypeHandler,
+    util::UUID,
+};
+
+use crate::poly::{Expr, ToExpr};
+
+use super::ASTExpr;
+
+// Queriable
+#[derive(Clone, Copy, PartialEq, Eq, Hash)]
+pub enum Queriable<F> {
+    Internal(InternalSignal),
+    Forward(ForwardSignal, bool),
+    Shared(SharedSignal, i32),
+    Fixed(FixedSignal, i32),
+    StepTypeNext(StepTypeHandler),
+    Halo2AdviceQuery(ImportedHalo2Advice, i32),
+    Halo2FixedQuery(ImportedHalo2Fixed, i32),
+    #[allow(non_camel_case_types)]
+    _unaccessible(PhantomData<F>),
+}
+
+impl<F> Debug for Queriable<F> {
+    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
+        write!(f, "{}", self.annotation())
+    }
+}
+
+impl<F> Queriable<F> {
+    /// Call `next` function on a `Querible` forward signal to build constraints for forward
+    /// signal with rotation. Cannot be called on an internal signal and must be used within a
+    /// `transition` constraint. Returns a new `Queriable` forward signal with rotation.
+    pub fn next(&self) -> Queriable<F> {
+        use Queriable::*;
+        match self {
+            Forward(s, rot) => {
+                if !*rot {
+                    Forward(*s, true)
+                } else {
+                    panic!("jarrl: cannot rotate next(forward)")
+                }
+            }
+            Shared(s, rot) => Shared(*s, rot + 1),
+            Fixed(s, rot) => Fixed(*s, rot + 1),
+            Halo2AdviceQuery(s, rot) => Halo2AdviceQuery(*s, rot + 1),
+            Halo2FixedQuery(s, r) => Halo2FixedQuery(*s, r + 1),
+            _ => panic!("can only next a forward, shared, fixed, or halo2 column"),
+        }
+    }
+
+    /// Call `prev` function on a `Querible` shared signal to build constraints for shared
+    /// signal that decreases rotation by 1. Must be called on a shared signal and used within a
+    /// `transition` constraint. Returns a new `Queriable` shared signal with positive or
+    /// negative rotation.
+    pub fn prev(&self) -> Queriable<F> {
+        use Queriable::*;
+        match self {
+            Shared(s, rot) => Shared(*s, rot - 1),
+            Fixed(s, rot) => Fixed(*s, rot - 1),
+            _ => panic!("can only prev a shared or fixed column"),
+        }
+    }
+
+    /// Call `rot` function on a `Querible` shared signal to build constraints for shared signal
+    /// with arbitrary rotation. Must be called on a shared signal and used within a
+    /// `transition` constraint. Returns a new `Queriable` shared signal with positive or
+    /// negative rotation.
+    pub fn rot(&self, rotation: i32) -> Queriable<F> {
+        use Queriable::*;
+        match self {
+            Shared(s, rot) => Shared(*s, rot + rotation),
+            Fixed(s, rot) => Fixed(*s, rot + rotation),
+            _ => panic!("can only rot a shared or fixed column"),
+        }
+    }
+
+    pub fn uuid(&self) -> UUID {
+        match self {
+            Queriable::Internal(s) => s.uuid(),
+            Queriable::Forward(s, _) => s.uuid(),
+            Queriable::Shared(s, _) => s.uuid(),
+            Queriable::Fixed(s, _) => s.uuid(),
+            Queriable::StepTypeNext(s) => s.uuid(),
+            Queriable::Halo2AdviceQuery(s, _) => s.uuid(),
+            Queriable::Halo2FixedQuery(s, _) => s.uuid(),
+            Queriable::_unaccessible(_) => panic!("jarrl wrong queriable type"),
+        }
+    }
+
+    pub fn annotation(&self) -> String {
+        match self {
+            Queriable::Internal(s) => s.annotation.to_string(),
+            Queriable::Forward(s, rot) => {
+                if !rot {
+                    s.annotation.to_string()
+                } else {
+                    format!("next({})", s.annotation)
+                }
+            }
+            Queriable::Shared(s, rot) => {
+                if *rot != 0 {
+                    format!("{}(rot {})", s.annotation, rot)
+                } else {
+                    s.annotation.to_string()
+                }
+            }
+            Queriable::Fixed(s, rot) => {
+                if *rot != 0 {
+                    format!("{}(rot {})", s.annotation, rot)
+                } else {
+                    s.annotation.to_string()
+                }
+            }
+            Queriable::StepTypeNext(s) => s.annotation.to_string(),
+            Queriable::Halo2AdviceQuery(s, rot) => {
+                if *rot != 0 {
+                    format!("{}(rot {})", s.annotation, rot)
+                } else {
+                    s.annotation.to_string()
+                }
+            }
+            Queriable::Halo2FixedQuery(s, rot) => {
+                if *rot != 0 {
+                    format!("{}(rot {})", s.annotation, rot)
+                } else {
+                    s.annotation.to_string()
+                }
+            }
+            Queriable::_unaccessible(_) => todo!(),
+        }
+    }
+}
+
+impl<F: Clone> ToExpr<F, Queriable<F>> for Queriable<F> {
+    fn expr(&self) -> ASTExpr<F> {
+        Expr::Query((*self).clone())
+    }
+}
+
+impl<F: Clone, RHS: Into<ASTExpr<F>>> Add<RHS> for Queriable<F> {
+    type Output = ASTExpr<F>;
+
+    fn add(self, rhs: RHS) -> Self::Output {
+        self.expr() + rhs
+    }
+}
+
+impl<F: Clone, RHS: Into<ASTExpr<F>>> Sub<RHS> for Queriable<F> {
+    type Output = ASTExpr<F>;
+
+    fn sub(self, rhs: RHS) -> Self::Output {
+        self.expr() - rhs
+    }
+}
+
+impl<F: Clone, RHS: Into<ASTExpr<F>>> Mul<RHS> for Queriable<F> {
+    type Output = ASTExpr<F>;
+
+    fn mul(self, rhs: RHS) -> Self::Output {
+        self.expr() * rhs
+    }
+}
+
+impl<F: Clone> Neg for Queriable<F> {
+    type Output = ASTExpr<F>;
+
+    fn neg(self) -> Self::Output {
+        self.expr().neg()
+    }
+}
+
+impl<F> From<Queriable<F>> for ASTExpr<F> {
+    fn from(value: Queriable<F>) -> Self {
+        Expr::Query(value)
+    }
+}
+
+#[cfg(test)]
+mod tests {
+    use super::*;
+    use halo2_proofs::halo2curves::bn256::Fr;
+
+    #[test]
+    fn test_expr_fmt() {
+        let a: Fr = 10.into();
+        let b: Fr = 20.into();
+
+        let expr1: Expr<Fr, Queriable<Fr>> = Expr::Const(a);
+        assert_eq!(format!("{:?}", expr1), "0xa");
+
+        let expr2: Expr<Fr, Queriable<Fr>> = Expr::Sum(vec![Expr::Const(a), Expr::Const(b)]);
+        assert_eq!(format!("{:?}", expr2), "(0xa + 0x14)");
+
+        let expr3: Expr<Fr, Queriable<Fr>> = Expr::Mul(vec![Expr::Const(a), Expr::Const(b)]);
+        assert_eq!(format!("{:?}", expr3), "(0xa * 0x14)");
+
+        let expr4: Expr<Fr, Queriable<Fr>> = Expr::Neg(Box::new(Expr::Const(a)));
+        assert_eq!(format!("{:?}", expr4), "(-0xa)");
+
+        let expr5: Expr<Fr, Queriable<Fr>> = Expr::Pow(Box::new(Expr::Const(a)), 2);
+        assert_eq!(format!("{:?}", expr5), "(0xa)^2");
+    }
+}
+
\ No newline at end of file diff --git a/docs/apidocs/src/chiquito/field.rs.html b/docs/apidocs/src/chiquito/field.rs.html new file mode 100644 index 00000000..743ab2ff --- /dev/null +++ b/docs/apidocs/src/chiquito/field.rs.html @@ -0,0 +1,101 @@ +field.rs - source
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+
use core::{
+    fmt::Debug,
+    iter::{Product, Sum},
+    ops::{Add, AddAssign, Mul, MulAssign, Neg, Sub, SubAssign},
+};
+
+pub trait Field:
+    Sized
+    + Eq
+    + Copy
+    + Clone
+    + Default
+    + Neg<Output = Self>
+    + From<u64>
+    + Add<Output = Self>
+    + Sub<Output = Self>
+    + Mul<Output = Self>
+    + Sum
+    + Product
+    + for<'a> Add<&'a Self, Output = Self>
+    + for<'a> Sub<&'a Self, Output = Self>
+    + for<'a> Mul<&'a Self, Output = Self>
+    + for<'a> Sum<&'a Self>
+    + for<'a> Product<&'a Self>
+    + AddAssign
+    + SubAssign
+    + MulAssign
+    + for<'a> AddAssign<&'a Self>
+    + for<'a> SubAssign<&'a Self>
+    + for<'a> MulAssign<&'a Self>
+    + Send
+    + Sync
+    + Debug
+    + 'static
+{
+    /// The zero element of the field, the additive identity.
+    const ZERO: Self;
+
+    /// The one element of the field, the multiplicative identity.
+    const ONE: Self;
+
+    /// Computes the multiplicative inverse of this element,
+    /// return zero if the element is zero. This is different from
+    /// FF invert that returns None if the element is zero.
+    fn mi(&self) -> Self;
+
+    /// Exponentiates `self` by `exp`, where `exp` is a little-endian order integer
+    /// exponent.
+    fn pow<S: AsRef<[u64]>>(&self, exp: S) -> Self;
+}
+
\ No newline at end of file diff --git a/docs/apidocs/src/chiquito/frontend/dsl/cb.rs.html b/docs/apidocs/src/chiquito/frontend/dsl/cb.rs.html new file mode 100644 index 00000000..a92234a1 --- /dev/null +++ b/docs/apidocs/src/chiquito/frontend/dsl/cb.rs.html @@ -0,0 +1,1447 @@ +cb.rs - source
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+465
+466
+467
+468
+469
+470
+471
+472
+473
+474
+475
+476
+477
+478
+479
+480
+481
+482
+483
+484
+485
+486
+487
+488
+489
+490
+491
+492
+493
+494
+495
+496
+497
+498
+499
+500
+501
+502
+503
+504
+505
+506
+507
+508
+509
+510
+511
+512
+513
+514
+515
+516
+517
+518
+519
+520
+521
+522
+523
+524
+525
+526
+527
+528
+529
+530
+531
+532
+533
+534
+535
+536
+537
+538
+539
+540
+541
+542
+543
+544
+545
+546
+547
+548
+549
+550
+551
+552
+553
+554
+555
+556
+557
+558
+559
+560
+561
+562
+563
+564
+565
+566
+567
+568
+569
+570
+571
+572
+573
+574
+575
+576
+577
+578
+579
+580
+581
+582
+583
+584
+585
+586
+587
+588
+589
+590
+591
+592
+593
+594
+595
+596
+597
+598
+599
+600
+601
+602
+603
+604
+605
+606
+607
+608
+609
+610
+611
+612
+613
+614
+615
+616
+617
+618
+619
+620
+621
+622
+623
+624
+625
+626
+627
+628
+629
+630
+631
+632
+633
+634
+635
+636
+637
+638
+639
+640
+641
+642
+643
+644
+645
+646
+647
+648
+649
+650
+651
+652
+653
+654
+655
+656
+657
+658
+659
+660
+661
+662
+663
+664
+665
+666
+667
+668
+669
+670
+671
+672
+673
+674
+675
+676
+677
+678
+679
+680
+681
+682
+683
+684
+685
+686
+687
+688
+689
+690
+691
+692
+693
+694
+695
+696
+697
+698
+699
+700
+701
+702
+703
+704
+705
+706
+707
+708
+709
+710
+711
+712
+713
+714
+715
+716
+717
+718
+719
+720
+721
+722
+723
+
use std::{fmt::Debug, vec};
+
+use crate::{
+    ast::{query::Queriable, ASTExpr},
+    field::Field,
+    poly::{Expr, ToExpr},
+};
+
+use super::{
+    lb::{InPlaceLookupBuilder, LookupTableStore},
+    StepTypeHandler,
+};
+
+/// Represents a constraint with an associated annotation and expression.
+#[derive(Clone)]
+pub struct Constraint<F> {
+    pub annotation: String,
+    pub expr: ASTExpr<F>,
+    pub typing: Typing,
+}
+
+impl<F> From<Constraint<F>> for ASTExpr<F> {
+    fn from(c: Constraint<F>) -> Self {
+        c.expr
+    }
+}
+
+#[derive(Clone, Debug, PartialEq, Eq)]
+pub enum Typing {
+    Unknown,
+    Boolean,
+    AntiBooly,
+}
+
+impl<F: Debug> From<ASTExpr<F>> for Constraint<F> {
+    fn from(expr: ASTExpr<F>) -> Self {
+        let annotation = format!("{:?}", &expr);
+        match expr {
+            Expr::Query(Queriable::StepTypeNext(_)) => Self {
+                expr,
+                annotation,
+                typing: Typing::Boolean,
+            },
+            _ => Self {
+                expr,
+                annotation,
+                typing: Typing::Unknown,
+            },
+        }
+    }
+}
+
+impl<F> From<Queriable<F>> for Constraint<F> {
+    fn from(query: Queriable<F>) -> Self {
+        match query {
+            Queriable::StepTypeNext(_) => {
+                annotate(query.annotation(), Expr::Query(query), Typing::Boolean)
+            }
+            _ => annotate(query.annotation(), Expr::Query(query), Typing::Unknown),
+        }
+    }
+}
+
+impl<F: Field + From<u64> + Debug> From<i32> for Constraint<F> {
+    fn from(v: i32) -> Self {
+        v.expr().into()
+    }
+}
+
+macro_rules! impl_cb_like {
+    ($type:ty) => {
+        impl<F: From<u64> + Debug> From<$type> for Constraint<F> {
+            #[inline]
+            fn from(value: $type) -> Self {
+                Expr::Const(F::from(value as u64)).into()
+            }
+        }
+    };
+}
+
+impl_cb_like!(bool);
+impl_cb_like!(u8);
+impl_cb_like!(u32);
+impl_cb_like!(u64);
+impl_cb_like!(usize);
+
+impl<F> Debug for Constraint<F> {
+    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
+        write!(f, "{}", self.annotation)
+    }
+}
+
+/// Takes an iterator of input constraints and returns a new constraint representing the logical AND
+/// of all input constraints. In practice, multiplies all input constraints together, i.e. A * B * C
+/// * … = 0.
+pub fn and<F: From<u64>, E: Into<Constraint<F>>, I: IntoIterator<Item = E>>(
+    inputs: I,
+) -> Constraint<F> {
+    let mut annotations: Vec<String> = vec![];
+    let mut expr: ASTExpr<F> = 1u64.expr();
+
+    for constraint in inputs.into_iter() {
+        let constraint = constraint.into();
+        match constraint.typing {
+            Typing::Boolean | Typing::Unknown => {
+                annotations.push(constraint.annotation);
+                expr = expr * constraint.expr;
+            }
+            Typing::AntiBooly => panic!(
+                "Expected Boolean or Unknown constraint, got AntiBooly (constraint: {})",
+                constraint.annotation
+            ),
+        }
+    }
+
+    Constraint {
+        annotation: format!("({})", annotations.join(" AND ")),
+        expr,
+        typing: Typing::Boolean,
+    }
+}
+
+/// Takes an iterator of input constraints and returns a new constraint representing the logical OR
+/// of all input constraints. In practice, constructs the output constraint in the format of
+/// not(and(not(A), not(B), not(C), …)) = 0, which is equivalent to or(A, B, C, …).
+pub fn or<
+    F: From<u64> + Debug,
+    E: Into<Constraint<F>> + Clone,
+    I: IntoIterator<Item = E> + Clone,
+>(
+    inputs: I,
+) -> Constraint<F> {
+    let mut annotations: Vec<String> = vec![];
+    let mut exprs: Vec<ASTExpr<F>> = vec![];
+
+    for constraint in inputs.into_iter() {
+        let constraint = constraint.into();
+        match constraint.typing {
+            Typing::Boolean | Typing::Unknown => {
+                annotations.push(constraint.annotation);
+                exprs.push(constraint.expr);
+            }
+            Typing::AntiBooly => panic!(
+                "Expected Boolean or Unknown constraint, got AntiBooly (constraint: {})",
+                constraint.annotation
+            ),
+        }
+    }
+
+    let result = not(and(exprs.into_iter().map(not)));
+
+    Constraint {
+        annotation: format!("({})", annotations.join(" OR ")),
+        expr: result.expr,
+        typing: Typing::Boolean,
+    }
+}
+
+/// Takes two expressions and returns a new expression representing the logical XOR of the input
+/// expressions.
+pub fn xor<F: From<u64> + Clone, LHS: Into<Constraint<F>>, RHS: Into<Constraint<F>>>(
+    lhs: LHS,
+    rhs: RHS,
+) -> Constraint<F> {
+    let mut annotations: Vec<String> = vec![];
+
+    let lhs: Constraint<F> = lhs.into();
+    let rhs: Constraint<F> = rhs.into();
+
+    let expr = match (lhs.typing, rhs.typing) {
+        (Typing::Boolean | Typing::Unknown, Typing::Boolean | Typing::Unknown) => {
+            annotations.push(lhs.annotation);
+            annotations.push(rhs.annotation);
+            lhs.expr.clone() + rhs.expr.clone() - 2u64.expr() * lhs.expr * rhs.expr
+        },
+        _ => panic!("Expected Boolean or Unknown constraints, got AntiBooly in one of lhs or rhs constraints (lhs constraint: {}) (rhs constraint: {})", lhs.annotation, rhs.annotation),
+    };
+
+    Constraint {
+        annotation: format!("({})", annotations.join(" XOR ")),
+        expr,
+        typing: Typing::Boolean,
+    }
+}
+
+/// Takes two constraints and returns a new constraint representing the equality of the input
+/// constraints.
+pub fn eq<F, LHS: Into<Constraint<F>>, RHS: Into<Constraint<F>>>(
+    lhs: LHS,
+    rhs: RHS,
+) -> Constraint<F> {
+    let lhs = lhs.into();
+    let rhs = rhs.into();
+
+    Constraint {
+        annotation: format!("{} == {}", lhs.annotation, rhs.annotation),
+        expr: lhs.expr - rhs.expr,
+        typing: Typing::AntiBooly,
+    }
+}
+
+/// Takes a selector constraint and two other constraints, and returns a new constraint that
+/// represents the value of `when_true` if the selector is true, or `when_false` if the selector is
+/// false.
+pub fn select<
+    F: From<u64> + Clone,
+    T1: Into<Constraint<F>>,
+    T2: Into<Constraint<F>>,
+    T3: Into<Constraint<F>>,
+>(
+    selector: T1,
+    when_true: T2,
+    when_false: T3,
+) -> Constraint<F> {
+    let selector = selector.into();
+    let when_true = when_true.into();
+    let when_false = when_false.into();
+
+    if selector.typing == Typing::AntiBooly {
+        panic!(
+            "Expected Boolean or Unknown selector, got AntiBooly (selector: {})",
+            selector.annotation
+        )
+    }
+
+    let typing = if when_true.typing == when_false.typing {
+        when_true.typing
+    } else {
+        Typing::Unknown
+    };
+
+    Constraint {
+        annotation: format!(
+            "if({})then({})else({})",
+            selector.annotation, when_true.annotation, when_false.annotation
+        ),
+        expr: selector.expr.clone() * when_true.expr
+            + (1u64.expr() - selector.expr) * when_false.expr,
+        typing,
+    }
+}
+
+/// Takes a selector constraint and a `when_true` constraint, and returns a new constraint that
+/// represents the value of `when_true` if the selector is true, or zero if the selector is false.
+pub fn when<F: From<u64> + Clone, T1: Into<Constraint<F>>, T2: Into<Constraint<F>>>(
+    selector: T1,
+    when_true: T2,
+) -> Constraint<F> {
+    let selector = selector.into();
+    let when_true = when_true.into();
+
+    if selector.typing == Typing::AntiBooly {
+        panic!(
+            "Expected Boolean or Unknown selector, got AntiBooly (selector: {})",
+            selector.annotation
+        )
+    }
+
+    Constraint {
+        annotation: format!("if({})then({})", selector.annotation, when_true.annotation),
+        expr: selector.expr * when_true.expr,
+        typing: when_true.typing,
+    }
+}
+
+/// Takes a selector constraint and a `when_false` constraint, and returns a new constraint that
+/// represents the value of `when_false` unless the selector is true, in which case it returns zero.
+pub fn unless<F: From<u64> + Clone, T1: Into<Constraint<F>>, T2: Into<Constraint<F>>>(
+    selector: T1,
+    when_false: T2,
+) -> Constraint<F> {
+    let selector = selector.into();
+    let when_false = when_false.into();
+
+    if selector.typing == Typing::AntiBooly {
+        panic!(
+            "Expected Boolean or Unknown selector, got AntiBooly (selector: {})",
+            selector.annotation
+        )
+    }
+
+    Constraint {
+        annotation: format!(
+            "unless({})then({})",
+            selector.annotation, when_false.annotation
+        ),
+        expr: (1u64.expr() - selector.expr) * when_false.expr,
+        typing: when_false.typing,
+    }
+}
+
+/// Takes a constraint and returns a new constraint representing the logical NOT of the input
+/// constraint. The input constraint must have a value of either 0 or 1.
+pub fn not<F: From<u64>, T: Into<Constraint<F>>>(constraint: T) -> Constraint<F> {
+    let constraint = constraint.into();
+    if constraint.typing == Typing::AntiBooly {
+        panic!(
+            "Expected Boolean or Unknown constraint, got AntiBooly (constraint: {})",
+            constraint.annotation
+        );
+    }
+    let annotation = format!("NOT({})", constraint.annotation);
+    let expr = 1u64.expr() - constraint.expr;
+
+    Constraint {
+        annotation,
+        expr,
+        typing: Typing::Boolean,
+    }
+}
+
+/// Takes a constraint and returns a new constraint representing whether the input constraint is
+/// zero.
+pub fn isz<F, T: Into<Constraint<F>>>(constraint: T) -> Constraint<F> {
+    let constraint = constraint.into();
+
+    Constraint {
+        annotation: format!("0 == {}", constraint.annotation),
+        expr: constraint.expr,
+        typing: Typing::AntiBooly,
+    }
+}
+
+/// Takes a `StepTypeHandler` and a constraint, and returns a new constraint that is only applied if
+/// the next step is of the given step type.
+pub fn if_next_step<F: Clone, T: Into<Constraint<F>>, ST: Into<StepTypeHandler>>(
+    step_type: ST,
+    constraint: T,
+) -> Constraint<F> {
+    let constraint = constraint.into();
+    let step_type = step_type.into();
+
+    let annotation = format!(
+        "if(next step is {})then({})",
+        step_type.annotation, constraint.annotation
+    );
+
+    Constraint {
+        expr: step_type.next() * constraint.expr,
+        annotation,
+        typing: constraint.typing,
+    }
+}
+
+/// Takes a `StepTypeHandler` and returns a new constraint that requires the next step to be of the
+/// given step type.
+pub fn next_step_must_be<F: From<u64>, ST: Into<StepTypeHandler>>(step_type: ST) -> Constraint<F> {
+    let step_type = step_type.into();
+    let next: Constraint<F> = step_type.next().into();
+    let not: Constraint<F> = not(next);
+
+    annotate::<_, Constraint<F>>(
+        format!("next_step_must_be({})", step_type.annotation),
+        not,
+        Typing::AntiBooly,
+    )
+}
+
+/// Takes a `StepTypeHandler` and returns a new constraint that requires the next step to not be of
+/// the given step type.
+pub fn next_step_must_not_be<F: From<u64>, ST: Into<StepTypeHandler>>(
+    step_type: ST,
+) -> Constraint<F> {
+    let step_type = step_type.into();
+
+    annotate(
+        format!("next_step_must_not_be({})", step_type.annotation),
+        step_type.next(),
+        Typing::AntiBooly,
+    )
+}
+
+/// Takes a string annotation and an expression, and returns a new constraint with the given
+/// annotation and expression.
+pub fn annotate<F, E: Into<ASTExpr<F>>>(
+    annotation: String,
+    expr: E,
+    typing: Typing,
+) -> Constraint<F> {
+    Constraint {
+        annotation,
+        expr: expr.into(),
+        typing,
+    }
+}
+
+/// Computes the randomized linear combination of the given expressions and randomness.
+pub fn rlc<F: From<u64>, E: Into<ASTExpr<F>> + Clone, R: Into<ASTExpr<F>> + Clone>(
+    exprs: &[E],
+    randomness: R,
+) -> ASTExpr<F> {
+    if !exprs.is_empty() {
+        let mut exprs = exprs.iter().rev().map(|e| e.clone().into());
+        let init = exprs.next().expect("should not be empty");
+
+        exprs.fold(init, |acc, expr| acc * randomness.clone().into() + expr)
+    } else {
+        0u64.expr()
+    }
+}
+
+/// Creates a new empty `LookupBuilder` object and returns it. Can an chain multiple `add` and
+/// `enable` function calls after to build the lookup table.
+pub fn lookup<F: Debug + Clone>() -> InPlaceLookupBuilder<F> {
+    InPlaceLookupBuilder::default()
+}
+
+pub fn table<F: Default>() -> LookupTableStore<F> {
+    LookupTableStore::default()
+}
+
+#[cfg(test)]
+mod tests {
+    use halo2_proofs::halo2curves::bn256::Fr;
+
+    use super::*;
+    use crate::poly::{ToExpr, ToField};
+
+    #[test]
+    fn test_and_empty() {
+        let inputs: Vec<Constraint<Fr>> = vec![];
+        let result = and(inputs);
+        assert_eq!(result.annotation, "()");
+        assert!(matches!(result.expr, Expr::Const(c) if c == 1u64.field()));
+    }
+
+    #[test]
+    fn test_and_single_input() {
+        let a = <u64 as ToExpr<Fr, Queriable<Fr>>>::expr(&10);
+        let result = and(vec![a]);
+
+        assert!(matches!(result.expr, Expr::Mul(v) if v.len() == 2 &&
+            matches!(v[0], Expr::Const(c) if c == 1u64.field()) &&
+            matches!(v[1], Expr::Const(c) if c == 10u64.field())));
+    }
+
+    #[test]
+    fn test_and_multiple_inputs() {
+        let a = <u64 as ToExpr<Fr, Queriable<Fr>>>::expr(&10);
+        let b = 20.expr();
+        let c = 30.expr();
+        let result = and(vec![a, b, c]);
+
+        assert!(matches!(result.expr, Expr::Mul(v) if v.len() == 4 &&
+            matches!(v[0], Expr::Const(c) if c == 1u64.field()) &&
+            matches!(v[1], Expr::Const(c) if c == 10u64.field()) &&
+            matches!(v[2], Expr::Const(c) if c == 20u64.field()) &&
+            matches!(v[3], Expr::Const(c) if c == 30u64.field())));
+    }
+
+    #[test]
+    fn test_or_empty() {
+        let inputs: Vec<Constraint<Fr>> = vec![];
+        let result = or(inputs);
+
+        // returns "1 - 1", because `and` with empty input defaults to 1, and `not` returns "1 -
+        // expr"
+        assert_eq!(result.annotation, "()");
+        assert!(matches!(result.expr, Expr::Sum(v) if v.len() == 2 &&
+        matches!(v[0], Expr::Const(c) if c == 1u64.field()) &&
+        matches!(&v[1], Expr::Neg(boxed_e) if
+            matches!(boxed_e.as_ref(), Expr::Const(c) if *c == 1u64.field()))));
+    }
+
+    #[test]
+    fn test_or_single_input() {
+        let a = <u64 as ToExpr<Fr, Queriable<Fr>>>::expr(&10);
+        let result = or(vec![a]);
+
+        // returns "1 - (1 * (1 - 10))"
+        assert!(matches!(result.expr, Expr::Sum(v) if v.len() == 2 &&
+            matches!(v[0], Expr::Const(c) if c == 1u64.field()) &&
+            matches!(&v[1], Expr::Neg(mul) if
+                matches!(mul.as_ref(), Expr::Mul(v) if v.len() == 2 &&
+                    matches!(v[0], Expr::Const(c) if c == 1u64.field()) && 
+                    matches!(&v[1], Expr::Sum(v) if v.len() == 2 &&
+                        matches!(v[0], Expr::Const(c) if c == 1u64.field()) &&
+                        matches!(&v[1], Expr::Neg(boxed_e) if
+                            matches!(boxed_e.as_ref(), Expr::Const(c) if *c == 10u64.field())))))));
+    }
+
+    #[test]
+    fn test_or_multiple_input() {
+        let a = <u64 as ToExpr<Fr, Queriable<Fr>>>::expr(&10);
+        let b = <u64 as ToExpr<Fr, Queriable<Fr>>>::expr(&20);
+        let c = <u64 as ToExpr<Fr, Queriable<Fr>>>::expr(&30);
+        let result = or(vec![a, b, c]);
+
+        // returns "1 - (1 * (1 - 10) * (1 - 20) * (1 - 30))"
+        assert!(matches!(result.expr, Expr::Sum(v) if v.len() == 2 &&
+            matches!(v[0], Expr::Const(c) if c == 1u64.field()) &&
+            matches!(&v[1], Expr::Neg(boxed_mul) if
+                matches!(boxed_mul.as_ref(), Expr::Mul(v) if v.len() == 4 &&
+                    matches!(v[0], Expr::Const(c) if c == 1u64.field()) && 
+                    matches!(&v[1], Expr::Sum(v) if v.len() == 2 &&
+                        matches!(v[0], Expr::Const(c) if c == 1u64.field()) &&
+                        matches!(&v[1], Expr::Neg(boxed_e) if 
+                            matches!(boxed_e.as_ref(), Expr::Const(c) if *c == 10u64.field()))) &&
+                    matches!(&v[2], Expr::Sum(v) if v.len() == 2 &&
+                        matches!(v[0], Expr::Const(c) if c == 1u64.field()) &&
+                        matches!(&v[1], Expr::Neg(boxed_e) if 
+                            matches!(boxed_e.as_ref(), Expr::Const(c) if *c == 20u64.field()))) &&
+                    matches!(&v[3], Expr::Sum(v) if v.len() == 2 &&
+                        matches!(v[0], Expr::Const(c) if c == 1u64.field()) &&
+                        matches!(&v[1], Expr::Neg(boxed_e) if 
+                            matches!(boxed_e.as_ref(), Expr::Const(c) if *c == 30u64.field())))))));
+    }
+
+    #[test]
+    fn test_not_one() {
+        let a = <u64 as ToExpr<Fr, Queriable<Fr>>>::expr(&1);
+        let result = not(a);
+
+        assert!(matches!(result.expr, Expr::Sum(v) if v.len() == 2 &&
+            matches!(v[0], Expr::Const(c) if c == 1u64.field()) &&
+            matches!(&v[1], Expr::Neg(boxed_e) if
+                matches!(boxed_e.as_ref(), Expr::Const(c) if *c == 1u64.field()))));
+    }
+
+    #[test]
+    fn test_not_zero() {
+        let a = <u64 as ToExpr<Fr, Queriable<Fr>>>::expr(&0);
+        let result = not(a);
+
+        assert!(matches!(result.expr, Expr::Sum(v) if v.len() == 2 &&
+            matches!(v[0], Expr::Const(c) if c == 1u64.field()) &&
+            matches!(&v[1], Expr::Neg(boxed_e) if
+                matches!(boxed_e.as_ref(), Expr::Const(c) if *c == 0u64.field()))));
+    }
+
+    #[test]
+    fn test_xor() {
+        let a = <u64 as ToExpr<Fr, Queriable<Fr>>>::expr(&10);
+        let b = <u64 as ToExpr<Fr, Queriable<Fr>>>::expr(&20);
+        let result = xor(a, b);
+
+        // returns "10 + 20 - 2 * 10 * 20"
+        assert!(matches!(result.expr, Expr::Sum(v) if v.len() == 3 &&
+            matches!(v[0], Expr::Const(c) if c == 10u64.field()) &&
+            matches!(v[1], Expr::Const(c) if c == 20u64.field()) &&
+            matches!(&v[2], Expr::Neg(boxed_mul) if
+                matches!(boxed_mul.as_ref(), Expr::Mul(v) if v.len() == 3 &&
+                    matches!(v[0], Expr::Const(c) if c == 2u64.field()) &&
+                    matches!(v[1], Expr::Const(c) if c == 10u64.field()) &&
+                    matches!(v[2], Expr::Const(c) if c == 20u64.field())))));
+    }
+
+    #[test]
+    fn test_eq() {
+        let a = <u64 as ToExpr<Fr, Queriable<Fr>>>::expr(&10);
+        let b = <u64 as ToExpr<Fr, Queriable<Fr>>>::expr(&20);
+        let result = eq(a, b);
+
+        // returns "10 - 20"
+        assert!(matches!(result.expr, Expr::Sum(v) if v.len() == 2 &&
+            matches!(v[0], Expr::Const(c) if c == 10u64.field()) &&
+            matches!(&v[1], Expr::Neg(boxed_e) if
+                matches!(boxed_e.as_ref(), Expr::Const(c) if *c == 20u64.field()))));
+    }
+
+    #[test]
+    fn test_select() {
+        let selector = <u64 as ToExpr<Fr, Queriable<Fr>>>::expr(&1);
+        let when_true = <u64 as ToExpr<Fr, Queriable<Fr>>>::expr(&10);
+        let when_false = <u64 as ToExpr<Fr, Queriable<Fr>>>::expr(&20);
+        let result = select(selector, when_true, when_false);
+
+        // returns "1 * 10 + (1 - 1) * 20"
+        assert!(matches!(result.expr, Expr::Sum(v) if v.len() == 2 &&
+            matches!(&v[0], Expr::Mul(v) if v.len() == 2 &&
+                matches!(v[0], Expr::Const(c) if c == 1u64.field()) &&
+                matches!(v[1], Expr::Const(c) if c == 10u64.field())) &&
+            matches!(&v[1], Expr::Mul(v) if v.len() == 2 &&
+                matches!(&v[0], Expr::Sum(v) if v.len() == 2 &&
+                    matches!(v[0], Expr::Const(c) if c == 1u64.field()) &&
+                    matches!(&v[1], Expr::Neg(boxed_e) if
+                        matches!(boxed_e.as_ref(), Expr::Const(c) if *c == 1u64.field()))) &&
+                matches!(v[1], Expr::Const(c) if c == 20u64.field()))));
+    }
+
+    #[test]
+    fn test_when_true() {
+        let selector = <u64 as ToExpr<Fr, Queriable<Fr>>>::expr(&1);
+        let when_true = <u64 as ToExpr<Fr, Queriable<Fr>>>::expr(&10);
+        let result = when(selector, when_true);
+
+        // returns "1 * 10"
+        assert!(matches!(result.expr, Expr::Mul(v) if v.len() == 2 &&
+            matches!(v[0], Expr::Const(c) if c == 1u64.field()) &&
+            matches!(v[1], Expr::Const(c) if c == 10u64.field())));
+    }
+
+    #[test]
+    fn test_when_false() {
+        let selector = <u64 as ToExpr<Fr, Queriable<Fr>>>::expr(&0);
+        let when_true = <u64 as ToExpr<Fr, Queriable<Fr>>>::expr(&10);
+        let result = when(selector, when_true);
+
+        // returns "0 * 10"
+        assert!(matches!(result.expr, Expr::Mul(v) if v.len() == 2 &&
+            matches!(v[0], Expr::Const(c) if c == 0u64.field()) &&
+            matches!(v[1], Expr::Const(c) if c == 10u64.field())));
+    }
+
+    #[test]
+    fn test_unless() {
+        let selector = <u64 as ToExpr<Fr, Queriable<Fr>>>::expr(&1);
+        let when_false = <u64 as ToExpr<Fr, Queriable<Fr>>>::expr(&10);
+        let result = unless(selector, when_false);
+
+        // returns "(1 - 1) * 10"
+        assert!(matches!(result.expr, Expr::Mul(v) if v.len() == 2 &&
+            matches!(&v[0], Expr::Sum(v) if v.len() == 2 &&
+                matches!(v[0], Expr::Const(c) if c == 1u64.field()) &&
+                matches!(&v[1], Expr::Neg(boxed_e) if
+                    matches!(boxed_e.as_ref(), Expr::Const(c) if *c == 1u64.field()))) &&
+            matches!(v[1], Expr::Const(c) if c == 10u64.field())));
+    }
+
+    #[test]
+    fn test_isz() {
+        let zero = <u64 as ToExpr<Fr, Queriable<Fr>>>::expr(&0);
+        let non_zero = <u64 as ToExpr<Fr, Queriable<Fr>>>::expr(&10);
+        let result_zero = isz(zero);
+        let result_non_zero = isz(non_zero);
+
+        // returns "0"
+        assert!(matches!(result_zero.expr, Expr::Const(c) if c == 0u64.field()));
+        // returns "10"
+        assert!(matches!(result_non_zero.expr, Expr::Const(c) if c == 10u64.field()));
+    }
+
+    #[test]
+    fn test_if_next_step() {
+        let step_type = StepTypeHandler::new("test_step".to_string());
+        let constraint = <u64 as ToExpr<Fr, Queriable<Fr>>>::expr(&10);
+        let result = if_next_step(step_type, constraint);
+
+        // returns "Expr::Query(Queriable::StepTypeNext(StepTypeHandler{id: _id, annotation:
+        // annotation})) * 10"
+        assert!(matches!(result.expr, Expr::Mul(v) if v.len() == 2 &&
+                    matches!(v[0], Expr::Query(Queriable::StepTypeNext(s)) if
+                        matches!(s, StepTypeHandler {id: _id, annotation: "test_step"})) &&
+                    matches!(v[1], Expr::Const(c) if c == 10u64.field())
+        ));
+    }
+
+    #[test]
+    fn test_next_step_must_be() {
+        let step_type = StepTypeHandler::new("test_step".to_owned());
+        let result: Constraint<Fr> = next_step_must_be(step_type);
+
+        // returns "1 - Expr::Query(Queriable::StepTypeNext(StepTypeHandler{id: _id, annotation:
+        // annotation}))"
+        assert_eq!(result.annotation, "next_step_must_be(test_step)");
+        assert!(matches!(result.expr, Expr::Sum(v) if v.len() == 2 &&
+                    matches!(v[0], Expr::Const(c) if c == 1u64.field()) &&
+                    matches!(&v[1], Expr::Neg(boxed_e) if
+                        matches!(boxed_e.as_ref(), Expr::Query(Queriable::StepTypeNext(s)) if
+                            matches!(s, StepTypeHandler {id: _id, annotation: "test_step"})))));
+    }
+
+    #[test]
+    fn test_next_step_must_not_be() {
+        let step_type = StepTypeHandler::new("test_step".to_owned());
+        let result: Constraint<Fr> = next_step_must_not_be(step_type);
+
+        // returns "Expr::Query(Queriable::StepTypeNext(StepTypeHandler{id: _id, annotation:
+        // annotation}))"
+        assert_eq!(result.annotation, "next_step_must_not_be(test_step)");
+        assert!(
+            matches!(result.expr, Expr::Query(Queriable::StepTypeNext(s)) if
+                        matches!(s, StepTypeHandler {id: _id, annotation: "test_step"}))
+        );
+    }
+
+    #[test]
+    fn test_annotate() {
+        let expr = <u64 as ToExpr<Fr, Queriable<Fr>>>::expr(&10);
+        let result = annotate("my_constraint".to_string(), expr, Typing::Unknown);
+
+        assert_eq!(result.annotation, "my_constraint");
+        assert!(matches!(result.expr, Expr::Const(c) if c == 10u64.field()));
+        assert!(matches!(result.typing, Typing::Unknown));
+    }
+
+    #[test]
+    fn test_rlc_empty() {
+        let randomness = <u64 as ToExpr<Fr, Queriable<Fr>>>::expr(&40);
+        let result = rlc::<Fr, Expr<Fr, Queriable<Fr>>, Expr<Fr, Queriable<Fr>>>(&[], randomness);
+
+        // returns "0"
+        assert!(matches!(result, Expr::Const(c) if c == 0u64.field()));
+    }
+
+    #[test]
+    fn test_rlc_one_input() {
+        let a = <u64 as ToExpr<Fr, Queriable<Fr>>>::expr(&10);
+        let result = rlc(&[a], 40u64.expr());
+
+        // returns "10"
+        assert!(matches!(result, Expr::Const(c) if c == 10u64.field()));
+    }
+
+    #[test]
+    fn test_rlc_multiple_inputs() {
+        let a = <u64 as ToExpr<Fr, Queriable<Fr>>>::expr(&10);
+        let b = 20u64.expr();
+        let c = 30u64.expr();
+        let result = rlc(&[a, b, c], 40u64.expr());
+
+        // returns "(30 * 40 + 20) * 40 + 10"
+        assert!(matches!(result, Expr::Sum(v) if v.len() == 2 &&
+            matches!(&v[0], Expr::Mul(v) if v.len() == 2 &&
+                matches!(&v[0], Expr::Sum(v) if
+                    matches!(&v[0], Expr::Mul(v) if v.len() == 2 &&
+                        matches!(v[0], Expr::Const(c) if c == 30u64.field()) &&
+                        matches!(v[1], Expr::Const(c) if c == 40u64.field())) &&
+                    matches!(v[1], Expr::Const(c) if c == 20u64.field())) &&
+                matches!(v[1], Expr::Const(c) if c == 40u64.field())) &&
+            matches!(v[1], Expr::Const(c) if c == 10u64.field())));
+    }
+}
+
\ No newline at end of file diff --git a/docs/apidocs/src/chiquito/frontend/dsl/lb.rs.html b/docs/apidocs/src/chiquito/frontend/dsl/lb.rs.html new file mode 100644 index 00000000..6ca0e7ee --- /dev/null +++ b/docs/apidocs/src/chiquito/frontend/dsl/lb.rs.html @@ -0,0 +1,407 @@ +lb.rs - source
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+
use std::{
+    collections::HashMap,
+    fmt::Debug,
+    sync::{Arc, Mutex},
+};
+
+use crate::{
+    ast::{ASTExpr, Lookup},
+    util::{uuid, UUID},
+};
+
+use super::{cb::Constraint, StepTypeSetupContext};
+
+pub trait LookupBuilder<F> {
+    fn build(self, ctx: &StepTypeSetupContext<F>) -> Lookup<F>;
+}
+
+/// A helper struct for building lookup tables.
+pub struct InPlaceLookupBuilder<F> {
+    lookup: Lookup<F>,
+}
+
+impl<F> LookupBuilder<F> for InPlaceLookupBuilder<F> {
+    fn build(self, _: &StepTypeSetupContext<F>) -> Lookup<F> {
+        self.lookup
+    }
+}
+
+impl<F> Default for InPlaceLookupBuilder<F> {
+    fn default() -> Self {
+        InPlaceLookupBuilder {
+            lookup: Lookup::default(),
+        }
+    }
+}
+
+impl<F: Debug + Clone> InPlaceLookupBuilder<F> {
+    /// Adds a source column-lookup column pair to the lookup table. Because the function returns a
+    /// mutable reference to the `LookupBuilder<F>`, it can an chain multiple `add` and `enable`
+    /// function calls to build the lookup table. Requires calling `lookup` to create an empty
+    /// `LookupBuilder` instance at the very front.
+    pub fn add<C: Into<Constraint<F>>, E: Into<ASTExpr<F>>>(
+        mut self,
+        constraint: C,
+        expression: E,
+    ) -> Self {
+        let constraint = constraint.into();
+        self.lookup
+            .add(constraint.annotation, constraint.expr, expression.into());
+        self
+    }
+
+    /// Adds a selector column specific to the lookup table. Because the function returns a mutable
+    /// reference to the `LookupBuilder<F>`, it can an chain multiple `add` and `enable` function
+    /// calls to build the lookup table. Requires calling `lookup` to create an
+    /// empty `LookupBuilder` instance at the very front.
+    pub fn enable<C: Into<Constraint<F>>>(mut self, enable: C) -> Self {
+        let enable = enable.into();
+        self.lookup.enable(enable.annotation, enable.expr);
+        self
+    }
+}
+
+#[derive(Debug, Clone)]
+pub struct LookupTableStore<F> {
+    id: UUID,
+    dest: Vec<ASTExpr<F>>,
+}
+
+impl<F> Default for LookupTableStore<F> {
+    fn default() -> Self {
+        Self {
+            id: uuid(),
+            dest: Default::default(),
+        }
+    }
+}
+
+impl<F> LookupTableStore<F> {
+    #[allow(clippy::should_implement_trait)]
+    pub fn add<E: Into<ASTExpr<F>>>(mut self, expr: E) -> Self {
+        self.dest.push(expr.into());
+
+        self
+    }
+
+    pub fn uuid(&self) -> UUID {
+        self.id
+    }
+}
+
+impl<F: Debug + Clone> LookupTableStore<F> {
+    fn build(self, src: Vec<Constraint<F>>, enable: Option<Constraint<F>>) -> Lookup<F> {
+        assert_eq!(
+            self.dest.len(),
+            src.len(),
+            "number of source and destination parameters doesn't match"
+        );
+
+        let mut lookup = Lookup::default();
+
+        if let Some(enable) = enable {
+            lookup.enable(enable.annotation, enable.expr);
+        }
+
+        src.into_iter()
+            .zip(self.dest)
+            .for_each(|(src, dest)| lookup.add(src.annotation, src.expr, dest));
+
+        lookup
+    }
+}
+
+#[derive(Debug)]
+pub struct LookupTableRegistry<F>(Arc<Mutex<HashMap<UUID, LookupTableStore<F>>>>);
+
+impl<F> Clone for LookupTableRegistry<F> {
+    fn clone(&self) -> Self {
+        Self(Arc::clone(&self.0))
+    }
+}
+
+impl<F> Default for LookupTableRegistry<F> {
+    fn default() -> Self {
+        Self(Arc::new(Mutex::new(HashMap::new())))
+    }
+}
+
+impl<F> LookupTableRegistry<F> {
+    pub fn add(&self, table: LookupTableStore<F>) {
+        self.0.lock().as_mut().unwrap().insert(table.uuid(), table);
+    }
+}
+
+impl<F: Clone> LookupTableRegistry<F> {
+    pub fn get(&self, uuid: UUID) -> LookupTableStore<F> {
+        (*self.0.lock().unwrap().get(&uuid).unwrap()).clone()
+    }
+}
+
+#[derive(Debug, Clone, Copy)]
+pub struct LookupTable {
+    pub(crate) uuid: UUID,
+}
+
+impl LookupTable {
+    pub fn apply<F, C: Into<Constraint<F>>>(&self, constraint: C) -> LookupTableBuilder<F> {
+        LookupTableBuilder::new(self.uuid).apply(constraint)
+    }
+
+    /// Adds a selector column specific to the lookup table. Because the function returns a mutable
+    /// reference to the `LookupBuilder<F>`, it can an chain multiple `add` and `enable` function
+    /// calls to build the lookup table. Requires calling `lookup` to create an
+    /// empty `LookupBuilder` instance at the very front.
+    pub fn when<F, C: Into<Constraint<F>>>(&self, enable: C) -> LookupTableBuilder<F> {
+        LookupTableBuilder::new(self.uuid).when(enable)
+    }
+}
+
+pub struct LookupTableBuilder<F> {
+    id: UUID,
+    src: Vec<Constraint<F>>,
+    enable: Option<Constraint<F>>,
+}
+
+impl<F> LookupTableBuilder<F> {
+    fn new(id: UUID) -> Self {
+        Self {
+            id,
+            src: Default::default(),
+            enable: Default::default(),
+        }
+    }
+
+    #[allow(clippy::should_implement_trait)]
+    pub fn apply<C: Into<Constraint<F>>>(mut self, constraint: C) -> Self {
+        self.src.push(constraint.into());
+
+        self
+    }
+
+    /// Adds a selector column specific to the lookup table. Because the function returns a mutable
+    /// reference to the `LookupBuilder<F>`, it can an chain multiple `add` and `enable` function
+    /// calls to build the lookup table. Requires calling `lookup` to create an
+    /// empty `LookupBuilder` instance at the very front.
+    pub fn when<C: Into<Constraint<F>>>(mut self, enable: C) -> Self {
+        if self.enable.is_some() {
+            panic!("Cannot use when operator in lookup table more than once.")
+        }
+
+        self.enable = Some(enable.into());
+
+        self
+    }
+}
+
+impl<F: Clone + Debug> LookupBuilder<F> for LookupTableBuilder<F> {
+    fn build(self, ctx: &StepTypeSetupContext<F>) -> Lookup<F> {
+        let table = ctx.tables.get(self.id);
+
+        table.build(self.src, self.enable)
+    }
+}
+
\ No newline at end of file diff --git a/docs/apidocs/src/chiquito/frontend/dsl/mod.rs.html b/docs/apidocs/src/chiquito/frontend/dsl/mod.rs.html new file mode 100644 index 00000000..9f9ad55c --- /dev/null +++ b/docs/apidocs/src/chiquito/frontend/dsl/mod.rs.html @@ -0,0 +1,873 @@ +mod.rs - source
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+
use crate::{
+    ast::{query::Queriable, ASTExpr, Circuit, ExposeOffset, StepType, StepTypeUUID},
+    field::Field,
+    util::{uuid, UUID},
+    wit_gen::{FixedGenContext, StepInstance, TraceContext},
+};
+
+use halo2_proofs::plonk::{Advice, Column as Halo2Column, Fixed};
+
+use core::{fmt::Debug, hash::Hash};
+use std::marker::PhantomData;
+
+use self::{
+    cb::{eq, Constraint, Typing},
+    lb::{LookupBuilder, LookupTable, LookupTableRegistry, LookupTableStore},
+};
+
+pub use sc::*;
+
+#[derive(Debug)]
+/// A generic structure designed to handle the context of a circuit for generic types `F`,
+/// `TraceArgs` and `StepArgs`. The struct contains a `Circuit` instance and implements
+/// methods to build the circuit, add various components, and manipulate the circuit. `F` is a
+/// generic type representing the field of the circuit. `TraceArgs` is a generic type
+/// representing the arguments passed to the trace function. `StepArgs` is a generic type
+/// representing the arguments passed to the `step_type_def` function.
+pub struct CircuitContext<F, TraceArgs> {
+    circuit: Circuit<F, TraceArgs>,
+    tables: LookupTableRegistry<F>,
+}
+
+impl<F, TraceArgs> CircuitContext<F, TraceArgs> {
+    /// Adds a forward signal to the circuit with a name string and zero rotation and returns a
+    /// `Queriable` instance representing the added forward signal.
+    pub fn forward(&mut self, name: &str) -> Queriable<F> {
+        Queriable::Forward(self.circuit.add_forward(name, 0), false)
+    }
+
+    /// Adds a forward signal to the circuit with a name string and a specified phase and returns a
+    /// `Queriable` instance representing the added forward signal.
+    pub fn forward_with_phase(&mut self, name: &str, phase: usize) -> Queriable<F> {
+        Queriable::Forward(self.circuit.add_forward(name, phase), false)
+    }
+
+    /// Adds a shared signal to the circuit with a name string and zero rotation and returns a
+    /// `Queriable` instance representing the added shared signal.
+    pub fn shared(&mut self, name: &str) -> Queriable<F> {
+        Queriable::Shared(self.circuit.add_shared(name, 0), 0)
+    }
+
+    /// Adds a shared signal to the circuit with a name string and a specified phase and returns a
+    /// `Queriable` instance representing the added shared signal.
+    pub fn shared_with_phase(&mut self, name: &str, phase: usize) -> Queriable<F> {
+        Queriable::Shared(self.circuit.add_shared(name, phase), 0)
+    }
+
+    pub fn fixed(&mut self, name: &str) -> Queriable<F> {
+        Queriable::Fixed(self.circuit.add_fixed(name), 0)
+    }
+
+    /// Exposes the first step instance value of a forward signal as public.
+    pub fn expose(&mut self, queriable: Queriable<F>, offset: ExposeOffset) {
+        self.circuit.expose(queriable, offset);
+    }
+
+    /// Imports a halo2 advice column with a name string into the circuit and returns a
+    /// `Queriable` instance representing the imported column.
+    pub fn import_halo2_advice(&mut self, name: &str, column: Halo2Column<Advice>) -> Queriable<F> {
+        Queriable::Halo2AdviceQuery(self.circuit.add_halo2_advice(name, column), 0)
+    }
+
+    /// Imports a halo2 fixed column with a name string into the circuit and returns a
+    /// `Queriable` instance representing the imported column.
+    pub fn import_halo2_fixed(&mut self, name: &str, column: Halo2Column<Fixed>) -> Queriable<F> {
+        Queriable::Halo2FixedQuery(self.circuit.add_halo2_fixed(name, column), 0)
+    }
+
+    /// Adds a new step type with the specified name to the circuit and returns a
+    /// `StepTypeHandler` instance. The `StepTypeHandler` instance can be used to define the
+    /// step type using the `step_type_def` function.
+    pub fn step_type(&mut self, name: &str) -> StepTypeHandler {
+        let handler = StepTypeHandler::new(name.to_string());
+
+        self.circuit.add_step_type(handler, name);
+
+        handler
+    }
+
+    /// Defines a step type using the provided `StepTypeHandler` and a function that takes a
+    /// mutable reference to a `StepTypeContext`. This function typically adds constraints to a
+    /// step type and defines witness generation.
+    pub fn step_type_def<D, Args, S: Into<StepTypeDefInput>, R>(
+        &mut self,
+        step: S,
+        def: D,
+    ) -> StepTypeWGHandler<F, Args, R>
+    where
+        D: FnOnce(&mut StepTypeContext<F>) -> StepTypeWGHandler<F, Args, R>,
+        R: Fn(&mut StepInstance<F>, Args) + 'static,
+    {
+        let handler: StepTypeHandler = match step.into() {
+            StepTypeDefInput::Handler(h) => h,
+            StepTypeDefInput::String(name) => {
+                let handler = StepTypeHandler::new(name.to_string());
+
+                self.circuit.add_step_type(handler, name);
+
+                handler
+            }
+        };
+
+        let mut context = StepTypeContext::<F>::new(
+            handler.uuid(),
+            handler.annotation.to_string(),
+            self.tables.clone(),
+        );
+
+        let result = def(&mut context);
+
+        self.circuit.add_step_type_def(context.step_type);
+
+        result
+    }
+
+    /// Sets the trace function that builds the witness. The trace function is responsible for
+    /// adding step instances defined in `step_type_def`. The function is entirely left for
+    /// the user to implement and is Turing complete. Users typically use external parameters
+    /// of type `TraceArgs` to generate cell values for witness generation, and call the
+    /// `add` function to add step instances with witness values.
+    pub fn trace<D>(&mut self, def: D)
+    where
+        D: Fn(&mut TraceContext<F>, TraceArgs) + 'static,
+    {
+        self.circuit.set_trace(def);
+    }
+
+    pub fn new_table(&self, table: LookupTableStore<F>) -> LookupTable {
+        let uuid = table.uuid();
+        self.tables.add(table);
+
+        LookupTable { uuid }
+    }
+
+    /// Enforce the type of the first step by adding a constraint to the circuit. Takes a
+    /// `StepTypeHandler` parameter that represents the step type.
+    pub fn pragma_first_step<STH: Into<StepTypeHandler>>(&mut self, step_type: STH) {
+        self.circuit.first_step = Some(step_type.into().uuid());
+    }
+
+    /// Enforce the type of the last step by adding a constraint to the circuit. Takes a
+    /// `StepTypeHandler` parameter that represents the step type.
+    pub fn pragma_last_step<STH: Into<StepTypeHandler>>(&mut self, step_type: STH) {
+        self.circuit.last_step = Some(step_type.into().uuid());
+    }
+
+    pub fn pragma_num_steps(&mut self, num_steps: usize) {
+        self.circuit.num_steps = num_steps;
+    }
+
+    pub fn pragma_disable_q_enable(&mut self) {
+        self.circuit.q_enable = false;
+    }
+}
+
+impl<F: Field + Hash, TraceArgs> CircuitContext<F, TraceArgs> {
+    /// Executes the fixed generation function provided by the user and sets the fixed assignments
+    /// for the circuit. The fixed generation function is responsible for assigning fixed values to
+    /// fixed columns. It is entirely left for the user to implement and is Turing complete. Users
+    /// typically generate cell values and call the `assign` function to fill the fixed columns.
+    pub fn fixed_gen<D>(&mut self, def: D)
+    where
+        D: Fn(&mut FixedGenContext<F>) + 'static,
+    {
+        if self.circuit.num_steps == 0 {
+            panic!("circuit must call pragma_num_steps before calling fixed_gen");
+        }
+        let mut ctx = FixedGenContext::new(self.circuit.num_steps);
+        (def)(&mut ctx);
+
+        let assignments = ctx.get_assignments();
+
+        self.circuit.set_fixed_assignments(assignments);
+    }
+}
+
+pub enum StepTypeDefInput {
+    Handler(StepTypeHandler),
+    String(&'static str),
+}
+
+impl From<StepTypeHandler> for StepTypeDefInput {
+    fn from(h: StepTypeHandler) -> Self {
+        StepTypeDefInput::Handler(h)
+    }
+}
+
+impl From<&'static str> for StepTypeDefInput {
+    fn from(s: &'static str) -> Self {
+        StepTypeDefInput::String(s)
+    }
+}
+
+/// A generic structure designed to handle the context of a step type definition.  The struct
+/// contains a `StepType` instance and implements methods to build the step type, add components,
+/// and manipulate the step type. `F` is a generic type representing the field of the step type.
+/// `Args` is the type of the step instance witness generation arguments.
+pub struct StepTypeContext<F> {
+    step_type: StepType<F>,
+    tables: LookupTableRegistry<F>,
+}
+
+impl<F> StepTypeContext<F> {
+    pub fn new(uuid: UUID, name: String, tables: LookupTableRegistry<F>) -> Self {
+        Self {
+            step_type: StepType::new(uuid, name),
+            tables,
+        }
+    }
+
+    /// Adds an internal signal to the step type with the given name and returns a `Queriable`
+    /// instance representing the added signal.
+    pub fn internal(&mut self, name: &str) -> Queriable<F> {
+        Queriable::Internal(self.step_type.add_signal(name))
+    }
+
+    /// DEPRECATED
+    pub fn constr<C: Into<Constraint<F>>>(&mut self, constraint: C) {
+        println!("DEPRECATED constr: use setup for constraints in step types");
+
+        let constraint = constraint.into();
+
+        self.step_type
+            .add_constr(constraint.annotation, constraint.expr);
+    }
+
+    /// DEPRECATED
+    pub fn transition<C: Into<Constraint<F>>>(&mut self, constraint: C) {
+        println!("DEPRECATED transition: use setup for constraints in step types");
+
+        let constraint = constraint.into();
+
+        self.step_type
+            .add_transition(constraint.annotation, constraint.expr);
+    }
+
+    /// Define step constraints.
+    pub fn setup<D>(&mut self, def: D)
+    where
+        D: Fn(&mut StepTypeSetupContext<F>),
+    {
+        let mut ctx = StepTypeSetupContext {
+            step_type: &mut self.step_type,
+            tables: self.tables.clone(),
+        };
+
+        def(&mut ctx);
+    }
+
+    pub fn wg<Args, D>(&mut self, def: D) -> StepTypeWGHandler<F, Args, D>
+    where
+        D: Fn(&mut StepInstance<F>, Args) + 'static,
+    {
+        StepTypeWGHandler {
+            id: self.step_type.uuid(),
+            annotation: Box::leak(self.step_type.name.clone().into_boxed_str()),
+
+            wg: Box::new(def),
+
+            _p: PhantomData,
+        }
+    }
+}
+
+pub struct StepTypeSetupContext<'a, F> {
+    step_type: &'a mut StepType<F>,
+    tables: LookupTableRegistry<F>,
+}
+
+impl<'a, F> StepTypeSetupContext<'a, F> {
+    /// Adds a constraint to the step type. Involves internal signal(s) and forward signals without
+    /// SuperRotation only. Chiquito provides syntax sugar for defining complex constraints.
+    /// Refer to the `cb` (constraint builder) module for more information.
+    pub fn constr<C: Into<Constraint<F>>>(&mut self, constraint: C) {
+        let constraint = constraint.into();
+        Self::enforce_constraint_typing(&constraint);
+
+        self.step_type
+            .add_constr(constraint.annotation, constraint.expr);
+    }
+
+    /// Adds a transition constraint to the step type. It’s the same as a regular constraint except
+    /// that it can involve forward signal(s) with SuperRotation as well. Chiquito provides syntax
+    /// sugar for defining complex constraints. Refer to the `cb` (constraint builder) module
+    /// for more information.
+    pub fn transition<C: Into<Constraint<F>>>(&mut self, constraint: C) {
+        let constraint = constraint.into();
+        Self::enforce_constraint_typing(&constraint);
+
+        self.step_type
+            .add_transition(constraint.annotation, constraint.expr);
+    }
+
+    fn enforce_constraint_typing(constraint: &Constraint<F>) {
+        if constraint.typing != Typing::AntiBooly {
+            panic!(
+                "Expected AntiBooly constraint, got {:?} (constraint: {})",
+                constraint.typing, constraint.annotation
+            );
+        }
+    }
+}
+
+impl<'a, F: Eq + PartialEq + Hash + Debug + Clone> StepTypeSetupContext<'a, F> {
+    pub fn auto(&mut self, signal: Queriable<F>, expr: ASTExpr<F>) {
+        self.step_type.auto_signals.insert(signal, expr);
+    }
+
+    pub fn auto_eq(&mut self, signal: Queriable<F>, expr: ASTExpr<F>) {
+        self.auto(signal.clone(), expr.clone());
+
+        self.constr(eq(signal, expr));
+    }
+}
+
+impl<'a, F: Debug + Clone> StepTypeSetupContext<'a, F> {
+    /// Adds a lookup to the step type.
+    pub fn add_lookup<LB: LookupBuilder<F>>(&mut self, lookup_builder: LB) {
+        self.step_type.lookups.push(lookup_builder.build(self));
+    }
+}
+
+#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
+pub struct StepTypeHandler {
+    id: StepTypeUUID,
+    pub annotation: &'static str,
+}
+
+impl StepTypeHandler {
+    fn new(annotation: String) -> Self {
+        Self {
+            id: uuid(),
+            annotation: Box::leak(annotation.into_boxed_str()),
+        }
+    }
+
+    pub fn new_with_id(id: UUID, annotation: String) -> Self {
+        Self {
+            id,
+            annotation: Box::leak(annotation.into_boxed_str()),
+        }
+    }
+
+    pub fn uuid(&self) -> UUID {
+        self.id
+    }
+
+    pub fn next<F>(&self) -> Queriable<F> {
+        Queriable::StepTypeNext(*self)
+    }
+}
+
+impl<F, Args, D: Fn(&mut StepInstance<F>, Args) + 'static> From<&StepTypeWGHandler<F, Args, D>>
+    for StepTypeHandler
+{
+    fn from(h: &StepTypeWGHandler<F, Args, D>) -> Self {
+        StepTypeHandler {
+            id: h.id,
+            annotation: h.annotation,
+        }
+    }
+}
+
+pub struct StepTypeWGHandler<F, Args, D: Fn(&mut StepInstance<F>, Args) + 'static> {
+    id: UUID,
+    pub annotation: &'static str,
+    pub wg: Box<D>,
+
+    _p: PhantomData<(F, Args)>,
+}
+
+impl<F, Args, D: Fn(&mut StepInstance<F>, Args) + 'static> StepTypeWGHandler<F, Args, D> {
+    pub fn new(id: UUID, annotation: &'static str, wg: D) -> Self {
+        StepTypeWGHandler {
+            id,
+            annotation,
+            wg: Box::new(wg),
+            _p: PhantomData,
+        }
+    }
+
+    pub fn uuid(&self) -> UUID {
+        self.id
+    }
+}
+
+/// Creates a `Circuit` instance by providing a name and a definition closure that is applied to a
+/// mutable `CircuitContext`. The user customizes the definition closure by calling `CircuitContext`
+/// functions. This is the main function that users call to define a Chiquito circuit. Currently,
+/// the name is not used for annotation within the function, but it may be used in future
+/// implementations.
+pub fn circuit<F, TraceArgs, D>(_name: &str, def: D) -> Circuit<F, TraceArgs>
+where
+    D: Fn(&mut CircuitContext<F, TraceArgs>),
+{
+    // TODO annotate circuit
+    let mut context = CircuitContext {
+        circuit: Circuit::default(),
+        tables: LookupTableRegistry::default(),
+    };
+
+    def(&mut context);
+
+    context.circuit
+}
+
+pub mod cb;
+pub mod lb;
+pub mod sc;
+
+#[cfg(test)]
+mod tests {
+    use super::*;
+
+    #[test]
+    fn test_disable_q_enable() {
+        let circuit: Circuit<i32, i32> = Circuit::default();
+        let mut context = CircuitContext {
+            circuit,
+            tables: Default::default(),
+        };
+
+        context.pragma_disable_q_enable();
+
+        assert!(!context.circuit.q_enable);
+    }
+}
+
\ No newline at end of file diff --git a/docs/apidocs/src/chiquito/frontend/dsl/sc.rs.html b/docs/apidocs/src/chiquito/frontend/dsl/sc.rs.html new file mode 100644 index 00000000..547fd132 --- /dev/null +++ b/docs/apidocs/src/chiquito/frontend/dsl/sc.rs.html @@ -0,0 +1,231 @@ +sc.rs - source
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+
use std::{hash::Hash, rc::Rc};
+
+use crate::field::Field;
+
+use crate::{
+    ast::Circuit,
+    plonkish::{
+        compiler::{
+            cell_manager::CellManager, compile_phase1, compile_phase2,
+            step_selector::StepSelectorBuilder, unit::CompilationUnit, CompilerConfig,
+        },
+        ir::{
+            assignments::AssignmentGenerator,
+            sc::{MappingContext, SuperCircuit},
+        },
+    },
+};
+
+use super::{lb::LookupTableRegistry, CircuitContext};
+
+pub struct SuperCircuitContext<F, MappingArgs> {
+    super_circuit: SuperCircuit<F, MappingArgs>,
+    sub_circuit_phase1: Vec<CompilationUnit<F>>,
+    pub tables: LookupTableRegistry<F>,
+}
+
+impl<F, MappingArgs> Default for SuperCircuitContext<F, MappingArgs> {
+    fn default() -> Self {
+        Self {
+            super_circuit: Default::default(),
+            sub_circuit_phase1: Default::default(),
+            tables: LookupTableRegistry::default(),
+        }
+    }
+}
+
+impl<F: Field + Hash, MappingArgs> SuperCircuitContext<F, MappingArgs> {
+    pub fn sub_circuit<CM: CellManager, SSB: StepSelectorBuilder, TraceArgs, Imports, Exports, D>(
+        &mut self,
+        config: CompilerConfig<CM, SSB>,
+        sub_circuit_def: D,
+        imports: Imports,
+    ) -> (AssignmentGenerator<F, TraceArgs>, Exports)
+    where
+        D: Fn(&mut CircuitContext<F, TraceArgs>, Imports) -> Exports,
+    {
+        let mut sub_circuit_context = CircuitContext {
+            circuit: Circuit::default(),
+            tables: self.tables.clone(),
+        };
+        println!("super circuit table registry 2: {:?}", self.tables);
+        let exports = sub_circuit_def(&mut sub_circuit_context, imports);
+        println!("super circuit table registry 3: {:?}", self.tables);
+
+        let sub_circuit = sub_circuit_context.circuit;
+
+        let (unit, assignment) = compile_phase1(config, &sub_circuit);
+        let assignment = assignment.unwrap_or_else(|| AssignmentGenerator::empty(unit.uuid));
+
+        self.sub_circuit_phase1.push(unit);
+
+        (assignment, exports)
+    }
+
+    pub fn sub_circuit_with_ast<CM: CellManager, SSB: StepSelectorBuilder, TraceArgs>(
+        &mut self,
+        config: CompilerConfig<CM, SSB>,
+        sub_circuit: Circuit<F, TraceArgs>, // directly input ast
+    ) -> AssignmentGenerator<F, TraceArgs> {
+        let (unit, assignment) = compile_phase1(config, &sub_circuit);
+        let assignment = assignment.unwrap_or_else(|| AssignmentGenerator::empty(unit.uuid));
+
+        self.sub_circuit_phase1.push(unit);
+
+        assignment
+    }
+
+    pub fn mapping<D: Fn(&mut MappingContext<F>, MappingArgs) + 'static>(&mut self, def: D) {
+        self.super_circuit.set_mapping(def);
+    }
+
+    pub fn compile(mut self) -> SuperCircuit<F, MappingArgs> {
+        let other = Rc::new(self.sub_circuit_phase1.clone());
+        // let columns = other
+        // .iter()
+        // .map(|unit| unit.columns.clone())
+        // .collect::<Vec<Vec<ir::Column>>>()
+        // .concat();
+
+        for mut unit in self.sub_circuit_phase1 {
+            unit.other_sub_circuits = Rc::clone(&other);
+            // unit.columns = columns.clone();
+
+            compile_phase2(&mut unit);
+
+            self.super_circuit.add_sub_circuit(unit.into());
+        }
+
+        self.super_circuit
+    }
+}
+
+pub fn super_circuit<F: Field + Hash, MappingArgs, D>(
+    _name: &str,
+    def: D,
+) -> SuperCircuit<F, MappingArgs>
+where
+    D: Fn(&mut SuperCircuitContext<F, MappingArgs>),
+{
+    let mut ctx = SuperCircuitContext::<F, MappingArgs>::default();
+
+    def(&mut ctx);
+
+    ctx.compile()
+}
+
\ No newline at end of file diff --git a/docs/apidocs/src/chiquito/frontend/mod.rs.html b/docs/apidocs/src/chiquito/frontend/mod.rs.html new file mode 100644 index 00000000..c6cc8b1a --- /dev/null +++ b/docs/apidocs/src/chiquito/frontend/mod.rs.html @@ -0,0 +1,5 @@ +mod.rs - source
1
+2
+
pub mod dsl;
+pub mod python;
+
\ No newline at end of file diff --git a/docs/apidocs/src/chiquito/frontend/python/mod.rs.html b/docs/apidocs/src/chiquito/frontend/python/mod.rs.html new file mode 100644 index 00000000..1934ca8e --- /dev/null +++ b/docs/apidocs/src/chiquito/frontend/python/mod.rs.html @@ -0,0 +1,3821 @@ +mod.rs - source
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+465
+466
+467
+468
+469
+470
+471
+472
+473
+474
+475
+476
+477
+478
+479
+480
+481
+482
+483
+484
+485
+486
+487
+488
+489
+490
+491
+492
+493
+494
+495
+496
+497
+498
+499
+500
+501
+502
+503
+504
+505
+506
+507
+508
+509
+510
+511
+512
+513
+514
+515
+516
+517
+518
+519
+520
+521
+522
+523
+524
+525
+526
+527
+528
+529
+530
+531
+532
+533
+534
+535
+536
+537
+538
+539
+540
+541
+542
+543
+544
+545
+546
+547
+548
+549
+550
+551
+552
+553
+554
+555
+556
+557
+558
+559
+560
+561
+562
+563
+564
+565
+566
+567
+568
+569
+570
+571
+572
+573
+574
+575
+576
+577
+578
+579
+580
+581
+582
+583
+584
+585
+586
+587
+588
+589
+590
+591
+592
+593
+594
+595
+596
+597
+598
+599
+600
+601
+602
+603
+604
+605
+606
+607
+608
+609
+610
+611
+612
+613
+614
+615
+616
+617
+618
+619
+620
+621
+622
+623
+624
+625
+626
+627
+628
+629
+630
+631
+632
+633
+634
+635
+636
+637
+638
+639
+640
+641
+642
+643
+644
+645
+646
+647
+648
+649
+650
+651
+652
+653
+654
+655
+656
+657
+658
+659
+660
+661
+662
+663
+664
+665
+666
+667
+668
+669
+670
+671
+672
+673
+674
+675
+676
+677
+678
+679
+680
+681
+682
+683
+684
+685
+686
+687
+688
+689
+690
+691
+692
+693
+694
+695
+696
+697
+698
+699
+700
+701
+702
+703
+704
+705
+706
+707
+708
+709
+710
+711
+712
+713
+714
+715
+716
+717
+718
+719
+720
+721
+722
+723
+724
+725
+726
+727
+728
+729
+730
+731
+732
+733
+734
+735
+736
+737
+738
+739
+740
+741
+742
+743
+744
+745
+746
+747
+748
+749
+750
+751
+752
+753
+754
+755
+756
+757
+758
+759
+760
+761
+762
+763
+764
+765
+766
+767
+768
+769
+770
+771
+772
+773
+774
+775
+776
+777
+778
+779
+780
+781
+782
+783
+784
+785
+786
+787
+788
+789
+790
+791
+792
+793
+794
+795
+796
+797
+798
+799
+800
+801
+802
+803
+804
+805
+806
+807
+808
+809
+810
+811
+812
+813
+814
+815
+816
+817
+818
+819
+820
+821
+822
+823
+824
+825
+826
+827
+828
+829
+830
+831
+832
+833
+834
+835
+836
+837
+838
+839
+840
+841
+842
+843
+844
+845
+846
+847
+848
+849
+850
+851
+852
+853
+854
+855
+856
+857
+858
+859
+860
+861
+862
+863
+864
+865
+866
+867
+868
+869
+870
+871
+872
+873
+874
+875
+876
+877
+878
+879
+880
+881
+882
+883
+884
+885
+886
+887
+888
+889
+890
+891
+892
+893
+894
+895
+896
+897
+898
+899
+900
+901
+902
+903
+904
+905
+906
+907
+908
+909
+910
+911
+912
+913
+914
+915
+916
+917
+918
+919
+920
+921
+922
+923
+924
+925
+926
+927
+928
+929
+930
+931
+932
+933
+934
+935
+936
+937
+938
+939
+940
+941
+942
+943
+944
+945
+946
+947
+948
+949
+950
+951
+952
+953
+954
+955
+956
+957
+958
+959
+960
+961
+962
+963
+964
+965
+966
+967
+968
+969
+970
+971
+972
+973
+974
+975
+976
+977
+978
+979
+980
+981
+982
+983
+984
+985
+986
+987
+988
+989
+990
+991
+992
+993
+994
+995
+996
+997
+998
+999
+1000
+1001
+1002
+1003
+1004
+1005
+1006
+1007
+1008
+1009
+1010
+1011
+1012
+1013
+1014
+1015
+1016
+1017
+1018
+1019
+1020
+1021
+1022
+1023
+1024
+1025
+1026
+1027
+1028
+1029
+1030
+1031
+1032
+1033
+1034
+1035
+1036
+1037
+1038
+1039
+1040
+1041
+1042
+1043
+1044
+1045
+1046
+1047
+1048
+1049
+1050
+1051
+1052
+1053
+1054
+1055
+1056
+1057
+1058
+1059
+1060
+1061
+1062
+1063
+1064
+1065
+1066
+1067
+1068
+1069
+1070
+1071
+1072
+1073
+1074
+1075
+1076
+1077
+1078
+1079
+1080
+1081
+1082
+1083
+1084
+1085
+1086
+1087
+1088
+1089
+1090
+1091
+1092
+1093
+1094
+1095
+1096
+1097
+1098
+1099
+1100
+1101
+1102
+1103
+1104
+1105
+1106
+1107
+1108
+1109
+1110
+1111
+1112
+1113
+1114
+1115
+1116
+1117
+1118
+1119
+1120
+1121
+1122
+1123
+1124
+1125
+1126
+1127
+1128
+1129
+1130
+1131
+1132
+1133
+1134
+1135
+1136
+1137
+1138
+1139
+1140
+1141
+1142
+1143
+1144
+1145
+1146
+1147
+1148
+1149
+1150
+1151
+1152
+1153
+1154
+1155
+1156
+1157
+1158
+1159
+1160
+1161
+1162
+1163
+1164
+1165
+1166
+1167
+1168
+1169
+1170
+1171
+1172
+1173
+1174
+1175
+1176
+1177
+1178
+1179
+1180
+1181
+1182
+1183
+1184
+1185
+1186
+1187
+1188
+1189
+1190
+1191
+1192
+1193
+1194
+1195
+1196
+1197
+1198
+1199
+1200
+1201
+1202
+1203
+1204
+1205
+1206
+1207
+1208
+1209
+1210
+1211
+1212
+1213
+1214
+1215
+1216
+1217
+1218
+1219
+1220
+1221
+1222
+1223
+1224
+1225
+1226
+1227
+1228
+1229
+1230
+1231
+1232
+1233
+1234
+1235
+1236
+1237
+1238
+1239
+1240
+1241
+1242
+1243
+1244
+1245
+1246
+1247
+1248
+1249
+1250
+1251
+1252
+1253
+1254
+1255
+1256
+1257
+1258
+1259
+1260
+1261
+1262
+1263
+1264
+1265
+1266
+1267
+1268
+1269
+1270
+1271
+1272
+1273
+1274
+1275
+1276
+1277
+1278
+1279
+1280
+1281
+1282
+1283
+1284
+1285
+1286
+1287
+1288
+1289
+1290
+1291
+1292
+1293
+1294
+1295
+1296
+1297
+1298
+1299
+1300
+1301
+1302
+1303
+1304
+1305
+1306
+1307
+1308
+1309
+1310
+1311
+1312
+1313
+1314
+1315
+1316
+1317
+1318
+1319
+1320
+1321
+1322
+1323
+1324
+1325
+1326
+1327
+1328
+1329
+1330
+1331
+1332
+1333
+1334
+1335
+1336
+1337
+1338
+1339
+1340
+1341
+1342
+1343
+1344
+1345
+1346
+1347
+1348
+1349
+1350
+1351
+1352
+1353
+1354
+1355
+1356
+1357
+1358
+1359
+1360
+1361
+1362
+1363
+1364
+1365
+1366
+1367
+1368
+1369
+1370
+1371
+1372
+1373
+1374
+1375
+1376
+1377
+1378
+1379
+1380
+1381
+1382
+1383
+1384
+1385
+1386
+1387
+1388
+1389
+1390
+1391
+1392
+1393
+1394
+1395
+1396
+1397
+1398
+1399
+1400
+1401
+1402
+1403
+1404
+1405
+1406
+1407
+1408
+1409
+1410
+1411
+1412
+1413
+1414
+1415
+1416
+1417
+1418
+1419
+1420
+1421
+1422
+1423
+1424
+1425
+1426
+1427
+1428
+1429
+1430
+1431
+1432
+1433
+1434
+1435
+1436
+1437
+1438
+1439
+1440
+1441
+1442
+1443
+1444
+1445
+1446
+1447
+1448
+1449
+1450
+1451
+1452
+1453
+1454
+1455
+1456
+1457
+1458
+1459
+1460
+1461
+1462
+1463
+1464
+1465
+1466
+1467
+1468
+1469
+1470
+1471
+1472
+1473
+1474
+1475
+1476
+1477
+1478
+1479
+1480
+1481
+1482
+1483
+1484
+1485
+1486
+1487
+1488
+1489
+1490
+1491
+1492
+1493
+1494
+1495
+1496
+1497
+1498
+1499
+1500
+1501
+1502
+1503
+1504
+1505
+1506
+1507
+1508
+1509
+1510
+1511
+1512
+1513
+1514
+1515
+1516
+1517
+1518
+1519
+1520
+1521
+1522
+1523
+1524
+1525
+1526
+1527
+1528
+1529
+1530
+1531
+1532
+1533
+1534
+1535
+1536
+1537
+1538
+1539
+1540
+1541
+1542
+1543
+1544
+1545
+1546
+1547
+1548
+1549
+1550
+1551
+1552
+1553
+1554
+1555
+1556
+1557
+1558
+1559
+1560
+1561
+1562
+1563
+1564
+1565
+1566
+1567
+1568
+1569
+1570
+1571
+1572
+1573
+1574
+1575
+1576
+1577
+1578
+1579
+1580
+1581
+1582
+1583
+1584
+1585
+1586
+1587
+1588
+1589
+1590
+1591
+1592
+1593
+1594
+1595
+1596
+1597
+1598
+1599
+1600
+1601
+1602
+1603
+1604
+1605
+1606
+1607
+1608
+1609
+1610
+1611
+1612
+1613
+1614
+1615
+1616
+1617
+1618
+1619
+1620
+1621
+1622
+1623
+1624
+1625
+1626
+1627
+1628
+1629
+1630
+1631
+1632
+1633
+1634
+1635
+1636
+1637
+1638
+1639
+1640
+1641
+1642
+1643
+1644
+1645
+1646
+1647
+1648
+1649
+1650
+1651
+1652
+1653
+1654
+1655
+1656
+1657
+1658
+1659
+1660
+1661
+1662
+1663
+1664
+1665
+1666
+1667
+1668
+1669
+1670
+1671
+1672
+1673
+1674
+1675
+1676
+1677
+1678
+1679
+1680
+1681
+1682
+1683
+1684
+1685
+1686
+1687
+1688
+1689
+1690
+1691
+1692
+1693
+1694
+1695
+1696
+1697
+1698
+1699
+1700
+1701
+1702
+1703
+1704
+1705
+1706
+1707
+1708
+1709
+1710
+1711
+1712
+1713
+1714
+1715
+1716
+1717
+1718
+1719
+1720
+1721
+1722
+1723
+1724
+1725
+1726
+1727
+1728
+1729
+1730
+1731
+1732
+1733
+1734
+1735
+1736
+1737
+1738
+1739
+1740
+1741
+1742
+1743
+1744
+1745
+1746
+1747
+1748
+1749
+1750
+1751
+1752
+1753
+1754
+1755
+1756
+1757
+1758
+1759
+1760
+1761
+1762
+1763
+1764
+1765
+1766
+1767
+1768
+1769
+1770
+1771
+1772
+1773
+1774
+1775
+1776
+1777
+1778
+1779
+1780
+1781
+1782
+1783
+1784
+1785
+1786
+1787
+1788
+1789
+1790
+1791
+1792
+1793
+1794
+1795
+1796
+1797
+1798
+1799
+1800
+1801
+1802
+1803
+1804
+1805
+1806
+1807
+1808
+1809
+1810
+1811
+1812
+1813
+1814
+1815
+1816
+1817
+1818
+1819
+1820
+1821
+1822
+1823
+1824
+1825
+1826
+1827
+1828
+1829
+1830
+1831
+1832
+1833
+1834
+1835
+1836
+1837
+1838
+1839
+1840
+1841
+1842
+1843
+1844
+1845
+1846
+1847
+1848
+1849
+1850
+1851
+1852
+1853
+1854
+1855
+1856
+1857
+1858
+1859
+1860
+1861
+1862
+1863
+1864
+1865
+1866
+1867
+1868
+1869
+1870
+1871
+1872
+1873
+1874
+1875
+1876
+1877
+1878
+1879
+1880
+1881
+1882
+1883
+1884
+1885
+1886
+1887
+1888
+1889
+1890
+1891
+1892
+1893
+1894
+1895
+1896
+1897
+1898
+1899
+1900
+1901
+1902
+1903
+1904
+1905
+1906
+1907
+1908
+1909
+1910
+
use pyo3::{
+    prelude::*,
+    types::{PyDict, PyList, PyLong, PyString},
+};
+
+use crate::{
+    ast::{
+        query::Queriable, Circuit, Constraint, ExposeOffset, FixedSignal, ForwardSignal,
+        InternalSignal, Lookup, SharedSignal, StepType, StepTypeUUID, TransitionConstraint,
+    },
+    frontend::dsl::{StepTypeHandler, SuperCircuitContext},
+    plonkish::{
+        backend::halo2::{
+            chiquito2Halo2, chiquitoSuperCircuit2Halo2, ChiquitoHalo2, ChiquitoHalo2Circuit,
+            ChiquitoHalo2SuperCircuit,
+        },
+        compiler::{
+            cell_manager::SingleRowCellManager, compile, config,
+            step_selector::SimpleStepSelectorBuilder,
+        },
+        ir::{assignments::AssignmentGenerator, sc::MappingContext},
+    },
+    poly::Expr,
+    util::{uuid, UUID},
+    wit_gen::{StepInstance, TraceContext, TraceWitness},
+};
+
+use core::result::Result;
+use halo2_proofs::{dev::MockProver, halo2curves::bn256::Fr};
+use serde::de::{self, Deserialize, Deserializer, IgnoredAny, MapAccess, Visitor};
+use std::{cell::RefCell, collections::HashMap, fmt, rc::Rc};
+
+type CircuitMapStore = (
+    Circuit<Fr, ()>,
+    ChiquitoHalo2<Fr>,
+    Option<AssignmentGenerator<Fr, ()>>,
+);
+type CircuitMap = RefCell<HashMap<UUID, CircuitMapStore>>;
+
+thread_local! {
+    pub static CIRCUIT_MAP: CircuitMap = RefCell::new(HashMap::new());
+}
+
+/// Parses JSON into `ast::Circuit` and compile. Generates a Rust UUID. Inserts tuple of
+/// (`ast::Circuit`, `ChiquitoHalo2`, `AssignmentGenerator`, _) to `CIRCUIT_MAP` with the Rust UUID
+/// as the key. Return the Rust UUID to Python. The last field of the tuple, `TraceWitness`, is left
+/// as None, for `chiquito_add_witness_to_rust_id` to insert.
+pub fn chiquito_ast_to_halo2(ast_json: &str) -> UUID {
+    let circuit: Circuit<Fr, ()> =
+        serde_json::from_str(ast_json).expect("Json deserialization to Circuit failed.");
+
+    let config = config(SingleRowCellManager {}, SimpleStepSelectorBuilder {});
+    let (chiquito, assignment_generator) = compile(config, &circuit);
+    let chiquito_halo2 = chiquito2Halo2(chiquito);
+    let uuid = uuid();
+
+    CIRCUIT_MAP.with(|circuit_map| {
+        circuit_map
+            .borrow_mut()
+            .insert(uuid, (circuit, chiquito_halo2, assignment_generator));
+    });
+
+    uuid
+}
+
+// Internal function called by `sub_circuit` function in Python frontend. Used in conjunction with
+// the super circuit only. Parses AST JSON and stores AST in `CIRCUIT_MAP` without compiling it.
+// Compilation is done by `chiquito_super_circuit_halo2_mock_prover`.
+pub fn chiquito_ast_map_store(ast_json: &str) -> UUID {
+    let circuit: Circuit<Fr, ()> =
+        serde_json::from_str(ast_json).expect("Json deserialization to Circuit failed.");
+
+    let uuid = uuid();
+
+    CIRCUIT_MAP.with(|circuit_map| {
+        circuit_map
+            .borrow_mut()
+            .insert(uuid, (circuit, ChiquitoHalo2::default(), None));
+    });
+
+    uuid
+}
+
+fn add_assignment_generator_to_rust_id(
+    assignment_generator: AssignmentGenerator<Fr, ()>,
+    rust_id: UUID,
+) {
+    CIRCUIT_MAP.with(|circuit_map| {
+        let mut circuit_map = circuit_map.borrow_mut();
+        let circuit_map_store = circuit_map.get_mut(&rust_id).unwrap();
+        circuit_map_store.2 = Some(assignment_generator);
+    });
+}
+
+/// Compile a `ChiquitoHalo2SuperCircuit` object from a list of `rust_ids`, each corresponding to a
+/// sub-circuit. The `ChiquitoHalo2SuperCircuit` object is then passed to `MockProver` for
+/// verification. `TraceWitness`, if any, should have been inserted to each rust_id prior to
+/// invoking this function.
+pub fn chiquito_super_circuit_halo2_mock_prover(
+    rust_ids: Vec<UUID>,
+    super_witness: HashMap<UUID, &str>,
+    k: usize,
+) {
+    let mut super_circuit_ctx = SuperCircuitContext::<Fr, ()>::default();
+
+    // super_circuit def
+    let config = config(SingleRowCellManager {}, SimpleStepSelectorBuilder {});
+    for rust_id in rust_ids.clone() {
+        let circuit_map_store = rust_id_to_halo2(rust_id);
+        let (circuit, _, _) = circuit_map_store;
+        let assignment = super_circuit_ctx.sub_circuit_with_ast(config.clone(), circuit);
+        add_assignment_generator_to_rust_id(assignment, rust_id);
+    }
+
+    let super_circuit = super_circuit_ctx.compile();
+    let compiled = chiquitoSuperCircuit2Halo2(&super_circuit);
+
+    let mut mapping_ctx = MappingContext::default();
+    for rust_id in rust_ids {
+        let circuit_map_store = rust_id_to_halo2(rust_id);
+        let (_, _, assignment_generator) = circuit_map_store;
+
+        if let Some(witness_json) = super_witness.get(&rust_id) {
+            let witness: TraceWitness<Fr> = serde_json::from_str(witness_json)
+                .expect("Json deserialization to TraceWitness failed.");
+            mapping_ctx.map_with_witness(&assignment_generator.unwrap(), witness);
+        }
+    }
+
+    let super_assignments = mapping_ctx.get_super_assignments();
+
+    let circuit = ChiquitoHalo2SuperCircuit::new(compiled, super_assignments);
+
+    let prover = MockProver::<Fr>::run(k as u32, &circuit, circuit.instance()).unwrap();
+
+    let result = prover.verify_par();
+
+    println!("result = {:#?}", result);
+
+    if let Err(failures) = &result {
+        for failure in failures.iter() {
+            println!("{}", failure);
+        }
+    }
+}
+
+/// Returns the (`ast::Circuit`, `ChiquitoHalo2`, `AssignmentGenerator`, `TraceWitness`) tuple
+/// corresponding to `rust_id`.
+fn rust_id_to_halo2(uuid: UUID) -> CircuitMapStore {
+    CIRCUIT_MAP.with(|circuit_map| {
+        let circuit_map = circuit_map.borrow();
+        circuit_map.get(&uuid).unwrap().clone()
+    })
+}
+
+/// Runs `MockProver` for a single circuit given JSON of `TraceWitness` and `rust_id` of the
+/// circuit.
+pub fn chiquito_halo2_mock_prover(witness_json: &str, rust_id: UUID, k: usize) {
+    let trace_witness: TraceWitness<Fr> =
+        serde_json::from_str(witness_json).expect("Json deserialization to TraceWitness failed.");
+    let (_, compiled, assignment_generator) = rust_id_to_halo2(rust_id);
+    let circuit: ChiquitoHalo2Circuit<_> = ChiquitoHalo2Circuit::new(
+        compiled,
+        assignment_generator.map(|g| g.generate_with_witness(trace_witness)),
+    );
+
+    let prover = MockProver::<Fr>::run(k as u32, &circuit, circuit.instance()).unwrap();
+
+    let result = prover.verify_par();
+
+    println!("{:#?}", result);
+
+    if let Err(failures) = &result {
+        for failure in failures.iter() {
+            println!("{}", failure);
+        }
+    }
+}
+
+struct CircuitVisitor;
+
+impl<'de> Visitor<'de> for CircuitVisitor {
+    type Value = Circuit<Fr, ()>;
+
+    fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
+        formatter.write_str("struct Cricuit")
+    }
+
+    fn visit_map<A>(self, mut map: A) -> Result<Circuit<Fr, ()>, A::Error>
+    where
+        A: MapAccess<'de>,
+    {
+        let mut step_types = None;
+        let mut forward_signals = None;
+        let mut shared_signals = None;
+        let mut fixed_signals = None;
+        let mut exposed = None;
+        let mut annotations = None;
+        let mut fixed_assignments = None;
+        let mut first_step = None;
+        let mut last_step = None;
+        let mut num_steps = None;
+        let mut q_enable = None;
+        let mut id = None;
+
+        while let Some(key) = map.next_key::<String>()? {
+            match key.as_str() {
+                "step_types" => {
+                    if step_types.is_some() {
+                        return Err(de::Error::duplicate_field("step_types"));
+                    }
+                    step_types = Some(map.next_value::<HashMap<UUID, StepType<Fr>>>()?);
+                }
+                "forward_signals" => {
+                    if forward_signals.is_some() {
+                        return Err(de::Error::duplicate_field("forward_signals"));
+                    }
+                    forward_signals = Some(map.next_value::<Vec<ForwardSignal>>()?);
+                }
+                "shared_signals" => {
+                    if shared_signals.is_some() {
+                        return Err(de::Error::duplicate_field("shared_signals"));
+                    }
+                    shared_signals = Some(map.next_value::<Vec<SharedSignal>>()?);
+                }
+                "fixed_signals" => {
+                    if fixed_signals.is_some() {
+                        return Err(de::Error::duplicate_field("fixed_signals"));
+                    }
+                    fixed_signals = Some(map.next_value::<Vec<FixedSignal>>()?);
+                }
+                "exposed" => {
+                    if exposed.is_some() {
+                        return Err(de::Error::duplicate_field("exposed"));
+                    }
+                    exposed = Some(map.next_value::<Vec<(Queriable<Fr>, ExposeOffset)>>()?);
+                }
+                "annotations" => {
+                    if annotations.is_some() {
+                        return Err(de::Error::duplicate_field("annotations"));
+                    }
+                    annotations = Some(map.next_value::<HashMap<UUID, String>>()?);
+                }
+                "fixed_assignments" => {
+                    if fixed_assignments.is_some() {
+                        return Err(de::Error::duplicate_field("fixed_assignments"));
+                    }
+                    fixed_assignments =
+                        Some(map.next_value::<Option<HashMap<UUID, (Queriable<Fr>, Vec<Fr>)>>>()?);
+                }
+                "first_step" => {
+                    if first_step.is_some() {
+                        return Err(de::Error::duplicate_field("first_step"));
+                    }
+                    first_step = Some(map.next_value::<Option<StepTypeUUID>>()?);
+                }
+                "last_step" => {
+                    if last_step.is_some() {
+                        return Err(de::Error::duplicate_field("last_step"));
+                    }
+                    last_step = Some(map.next_value::<Option<StepTypeUUID>>()?);
+                }
+                "num_steps" => {
+                    if num_steps.is_some() {
+                        return Err(de::Error::duplicate_field("num_steps"));
+                    }
+                    num_steps = Some(map.next_value::<usize>()?);
+                }
+                "q_enable" => {
+                    if q_enable.is_some() {
+                        return Err(de::Error::duplicate_field("q_enable"));
+                    }
+                    q_enable = Some(map.next_value::<bool>()?);
+                }
+                "id" => {
+                    if id.is_some() {
+                        return Err(de::Error::duplicate_field("id"));
+                    }
+                    id = Some(map.next_value()?);
+                }
+                _ => {
+                    return Err(de::Error::unknown_field(
+                        &key,
+                        &[
+                            "step_types",
+                            "forward_signals",
+                            "shared_signals",
+                            "fixed_signals",
+                            "exposed",
+                            "annotations",
+                            "fixed_assignments",
+                            "first_step",
+                            "last_step",
+                            "num_steps",
+                            "q_enable",
+                            "id",
+                        ],
+                    ))
+                }
+            }
+        }
+        let step_types = step_types
+            .ok_or_else(|| de::Error::missing_field("step_types"))?
+            .into_iter()
+            .map(|(k, v)| (k, Rc::new(v)))
+            .collect();
+        let forward_signals =
+            forward_signals.ok_or_else(|| de::Error::missing_field("forward_signals"))?;
+        let shared_signals =
+            shared_signals.ok_or_else(|| de::Error::missing_field("shared_signals"))?;
+        let fixed_signals =
+            fixed_signals.ok_or_else(|| de::Error::missing_field("fixed_signals"))?;
+        let exposed = exposed.ok_or_else(|| de::Error::missing_field("exposed"))?;
+        let annotations = annotations.ok_or_else(|| de::Error::missing_field("annotations"))?;
+        let fixed_assignments = fixed_assignments
+            .ok_or_else(|| de::Error::missing_field("fixed_assignments"))?
+            .map(|inner| inner.into_values().collect());
+        let first_step = first_step.ok_or_else(|| de::Error::missing_field("first_step"))?;
+        let last_step = last_step.ok_or_else(|| de::Error::missing_field("last_step"))?;
+        let num_steps = num_steps.ok_or_else(|| de::Error::missing_field("num_steps"))?;
+        let q_enable = q_enable.ok_or_else(|| de::Error::missing_field("q_enable"))?;
+        let id = id.ok_or_else(|| de::Error::missing_field("id"))?;
+
+        Ok(Circuit {
+            step_types,
+            forward_signals,
+            shared_signals,
+            fixed_signals,
+            halo2_advice: Default::default(),
+            halo2_fixed: Default::default(),
+            exposed,
+            num_steps,
+            annotations,
+            trace: Some(Rc::new(|_: &mut TraceContext<_>, _: _| {})),
+            fixed_assignments,
+            first_step,
+            last_step,
+            q_enable,
+            id,
+        })
+    }
+}
+struct StepTypeVisitor;
+
+impl<'de> Visitor<'de> for StepTypeVisitor {
+    type Value = StepType<Fr>;
+
+    fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
+        formatter.write_str("struct StepType")
+    }
+
+    fn visit_map<A>(self, mut map: A) -> Result<StepType<Fr>, A::Error>
+    where
+        A: MapAccess<'de>,
+    {
+        let mut id = None;
+        let mut name = None;
+        let mut signals = None;
+        let mut constraints = None;
+        let mut transition_constraints = None;
+        let mut lookups = None;
+        let mut annotations = None;
+
+        while let Some(key) = map.next_key::<String>()? {
+            match key.as_str() {
+                "id" => {
+                    if id.is_some() {
+                        return Err(de::Error::duplicate_field("id"));
+                    }
+                    id = Some(map.next_value()?);
+                }
+                "name" => {
+                    if name.is_some() {
+                        return Err(de::Error::duplicate_field("name"));
+                    }
+                    name = Some(map.next_value::<String>()?);
+                }
+                "signals" => {
+                    if signals.is_some() {
+                        return Err(de::Error::duplicate_field("signals"));
+                    }
+                    signals = Some(map.next_value::<Vec<InternalSignal>>()?);
+                }
+                "constraints" => {
+                    if constraints.is_some() {
+                        return Err(de::Error::duplicate_field("constraints"));
+                    }
+                    constraints = Some(map.next_value::<Vec<Constraint<Fr>>>()?);
+                }
+                "transition_constraints" => {
+                    if transition_constraints.is_some() {
+                        return Err(de::Error::duplicate_field("transition_constraints"));
+                    }
+                    transition_constraints =
+                        Some(map.next_value::<Vec<TransitionConstraint<Fr>>>()?);
+                }
+                "lookups" => {
+                    if lookups.is_some() {
+                        return Err(de::Error::duplicate_field("lookups"));
+                    }
+                    lookups = Some(map.next_value::<Vec<Lookup<Fr>>>()?);
+                }
+                "annotations" => {
+                    if annotations.is_some() {
+                        return Err(de::Error::duplicate_field("annotations"));
+                    }
+                    annotations = Some(map.next_value::<HashMap<UUID, String>>()?);
+                }
+                _ => {
+                    return Err(de::Error::unknown_field(
+                        &key,
+                        &[
+                            "id",
+                            "name",
+                            "signals",
+                            "constraints",
+                            "transition_constraints",
+                            "lookups",
+                            "annotations",
+                        ],
+                    ))
+                }
+            }
+        }
+        let id = id.ok_or_else(|| de::Error::missing_field("id"))?;
+        let name = name.ok_or_else(|| de::Error::missing_field("name"))?;
+        let signals = signals.ok_or_else(|| de::Error::missing_field("signals"))?;
+        let constraints = constraints.ok_or_else(|| de::Error::missing_field("constraints"))?;
+        let transition_constraints = transition_constraints
+            .ok_or_else(|| de::Error::missing_field("transition_constraints"))?;
+        let lookups = lookups.ok_or_else(|| de::Error::missing_field("lookups"))?;
+        let annotations = annotations.ok_or_else(|| de::Error::missing_field("annotations"))?;
+
+        let mut step_type = StepType::<Fr>::new(id, name);
+        step_type.signals = signals;
+        step_type.constraints = constraints;
+        step_type.transition_constraints = transition_constraints;
+        step_type.lookups = lookups;
+        step_type.annotations = annotations;
+
+        Ok(step_type)
+    }
+}
+
+macro_rules! impl_visitor_constraint_transition {
+    ($name:ident, $type:ty, $display:expr) => {
+        struct $name;
+
+        impl<'de> Visitor<'de> for $name {
+            type Value = $type;
+
+            fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
+                formatter.write_str($display)
+            }
+
+            fn visit_map<A>(self, mut map: A) -> Result<$type, A::Error>
+            where
+                A: MapAccess<'de>,
+            {
+                let mut annotation = None;
+                let mut expr = None;
+                while let Some(key) = map.next_key::<String>()? {
+                    match key.as_str() {
+                        "annotation" => {
+                            if annotation.is_some() {
+                                return Err(de::Error::duplicate_field("annotation"));
+                            }
+                            annotation = Some(map.next_value::<String>()?);
+                        }
+                        "expr" => {
+                            if expr.is_some() {
+                                return Err(de::Error::duplicate_field("expr"));
+                            }
+                            expr = Some(map.next_value::<Expr<Fr, Queriable<Fr>>>()?);
+                        }
+                        _ => return Err(de::Error::unknown_field(&key, &["annotation", "expr"])),
+                    }
+                }
+                let annotation =
+                    annotation.ok_or_else(|| de::Error::missing_field("annotation"))?;
+                let expr = expr.ok_or_else(|| de::Error::missing_field("expr"))?;
+                Ok(Self::Value { annotation, expr })
+            }
+        }
+    };
+}
+
+impl_visitor_constraint_transition!(ConstraintVisitor, Constraint<Fr>, "struct Constraint");
+impl_visitor_constraint_transition!(
+    TransitionConstraintVisitor,
+    TransitionConstraint<Fr>,
+    "struct TransitionConstraint"
+);
+
+struct LookupVisitor;
+
+impl<'de> Visitor<'de> for LookupVisitor {
+    type Value = Lookup<Fr>;
+
+    fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
+        formatter.write_str("struct Lookup")
+    }
+
+    fn visit_map<A>(self, mut map: A) -> Result<Lookup<Fr>, A::Error>
+    where
+        A: MapAccess<'de>,
+    {
+        let mut annotation = None;
+        let mut exprs = None;
+        let mut enable = None;
+        while let Some(key) = map.next_key::<String>()? {
+            match key.as_str() {
+                "annotation" => {
+                    if annotation.is_some() {
+                        return Err(de::Error::duplicate_field("annotation"));
+                    }
+                    annotation = Some(map.next_value::<String>()?);
+                }
+                "exprs" => {
+                    if exprs.is_some() {
+                        return Err(de::Error::duplicate_field("exprs"));
+                    }
+                    exprs =
+                        Some(map.next_value::<Vec<(Constraint<Fr>, Expr<Fr, Queriable<Fr>>)>>()?);
+                }
+                "enable" => {
+                    if enable.is_some() {
+                        return Err(de::Error::duplicate_field("enable"));
+                    }
+                    enable = Some(map.next_value::<Option<Constraint<Fr>>>()?);
+                }
+                _ => {
+                    return Err(de::Error::unknown_field(
+                        &key,
+                        &["annotation", "exprs", "enable"],
+                    ))
+                }
+            }
+        }
+        let annotation = annotation.ok_or_else(|| de::Error::missing_field("annotation"))?;
+        let exprs = exprs.ok_or_else(|| de::Error::missing_field("exprs"))?;
+        let enable = enable.ok_or_else(|| de::Error::missing_field("enable"))?;
+        Ok(Self::Value {
+            annotation,
+            exprs,
+            enable,
+        })
+    }
+}
+
+struct ExprVisitor;
+
+impl<'de> Visitor<'de> for ExprVisitor {
+    type Value = Expr<Fr, Queriable<Fr>>;
+
+    fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
+        formatter.write_str("enum Expr")
+    }
+
+    fn visit_map<A>(self, mut map: A) -> Result<Expr<Fr, Queriable<Fr>>, A::Error>
+    where
+        A: MapAccess<'de>,
+    {
+        let key: String = map
+            .next_key()?
+            .ok_or_else(|| de::Error::custom("map is empty"))?;
+        match key.as_str() {
+            "Const" => map.next_value().map(Expr::Const),
+            "Sum" => map.next_value().map(Expr::Sum),
+            "Mul" => map.next_value().map(Expr::Mul),
+            "Neg" => map.next_value().map(Expr::Neg),
+            "Pow" => map.next_value().map(|(expr, pow)| Expr::Pow(expr, pow)),
+            "Internal" => map
+                .next_value()
+                .map(|signal| Expr::Query(Queriable::Internal(signal))),
+            "Forward" => map
+                .next_value()
+                .map(|(signal, rotation)| Expr::Query(Queriable::Forward(signal, rotation))),
+            "Shared" => map
+                .next_value()
+                .map(|(signal, rotation)| Expr::Query(Queriable::Shared(signal, rotation))),
+            "Fixed" => map
+                .next_value()
+                .map(|(signal, rotation)| Expr::Query(Queriable::Fixed(signal, rotation))),
+            "StepTypeNext" => map
+                .next_value()
+                .map(|step_type| Expr::Query(Queriable::StepTypeNext(step_type))),
+            _ => Err(de::Error::unknown_variant(
+                &key,
+                &[
+                    "Const",
+                    "Sum",
+                    "Mul",
+                    "Neg",
+                    "Pow",
+                    "Internal",
+                    "Forward",
+                    "Shared",
+                    "Fixed",
+                    "StepTypeNext",
+                ],
+            )),
+        }
+    }
+}
+
+struct QueriableVisitor;
+
+impl<'de> Visitor<'de> for QueriableVisitor {
+    type Value = Queriable<Fr>;
+
+    fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
+        formatter.write_str("enum Queriable")
+    }
+
+    fn visit_map<A>(self, mut map: A) -> Result<Queriable<Fr>, A::Error>
+    where
+        A: MapAccess<'de>,
+    {
+        let key: String = map
+            .next_key()?
+            .ok_or_else(|| de::Error::custom("map is empty"))?;
+        match key.as_str() {
+            "Internal" => map.next_value().map(Queriable::Internal),
+            "Forward" => map
+                .next_value()
+                .map(|(signal, rotation)| Queriable::Forward(signal, rotation)),
+            "Shared" => map
+                .next_value()
+                .map(|(signal, rotation)| Queriable::Shared(signal, rotation)),
+            "Fixed" => map
+                .next_value()
+                .map(|(signal, rotation)| Queriable::Fixed(signal, rotation)),
+            "StepTypeNext" => map.next_value().map(Queriable::StepTypeNext),
+            _ => Err(de::Error::unknown_variant(
+                &key,
+                &["Internal", "Forward", "Shared", "Fixed", "StepTypeNext"],
+            )),
+        }
+    }
+}
+
+struct ExposeOffsetVisitor;
+
+impl<'de> Visitor<'de> for ExposeOffsetVisitor {
+    type Value = ExposeOffset;
+
+    fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
+        formatter.write_str("enum ExposeOffset")
+    }
+
+    fn visit_map<A>(self, mut map: A) -> Result<ExposeOffset, A::Error>
+    where
+        A: MapAccess<'de>,
+    {
+        let key: String = map
+            .next_key()?
+            .ok_or_else(|| de::Error::custom("map is empty"))?;
+        match key.as_str() {
+            "First" => {
+                let _ = map.next_value::<IgnoredAny>()?;
+                Ok(ExposeOffset::First)
+            }
+            "Last" => {
+                let _ = map.next_value::<IgnoredAny>()?;
+                Ok(ExposeOffset::Last)
+            }
+            "Step" => map.next_value().map(ExposeOffset::Step),
+            _ => Err(de::Error::unknown_variant(&key, &["First", "Last", "Step"])),
+        }
+    }
+}
+
+macro_rules! impl_visitor_internal_fixed_steptypehandler {
+    ($name:ident, $type:ty, $display:expr) => {
+        struct $name;
+
+        impl<'de> Visitor<'de> for $name {
+            type Value = $type;
+
+            fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
+                formatter.write_str($display)
+            }
+
+            fn visit_map<A>(self, mut map: A) -> Result<$type, A::Error>
+            where
+                A: MapAccess<'de>,
+            {
+                let mut id = None;
+                let mut annotation = None;
+                while let Some(key) = map.next_key::<String>()? {
+                    match key.as_str() {
+                        "id" => {
+                            if id.is_some() {
+                                return Err(de::Error::duplicate_field("id"));
+                            }
+                            id = Some(map.next_value()?);
+                        }
+                        "annotation" => {
+                            if annotation.is_some() {
+                                return Err(de::Error::duplicate_field("annotation"));
+                            }
+                            annotation = Some(map.next_value::<String>()?);
+                        }
+                        _ => return Err(de::Error::unknown_field(&key, &["id", "annotation"])),
+                    }
+                }
+                let id = id.ok_or_else(|| de::Error::missing_field("id"))?;
+                let annotation =
+                    annotation.ok_or_else(|| de::Error::missing_field("annotation"))?;
+                Ok(<$type>::new_with_id(id, annotation))
+            }
+        }
+    };
+}
+
+impl_visitor_internal_fixed_steptypehandler!(
+    InternalSignalVisitor,
+    InternalSignal,
+    "struct InternalSignal"
+);
+impl_visitor_internal_fixed_steptypehandler!(FixedSignalVisitor, FixedSignal, "struct FixedSignal");
+impl_visitor_internal_fixed_steptypehandler!(
+    StepTypeHandlerVisitor,
+    StepTypeHandler,
+    "struct StepTypeHandler"
+);
+
+macro_rules! impl_visitor_forward_shared {
+    ($name:ident, $type:ty, $display:expr) => {
+        struct $name;
+
+        impl<'de> Visitor<'de> for $name {
+            type Value = $type;
+
+            fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
+                formatter.write_str($display)
+            }
+
+            fn visit_map<A>(self, mut map: A) -> Result<$type, A::Error>
+            where
+                A: MapAccess<'de>,
+            {
+                let mut id = None;
+                let mut phase = None;
+                let mut annotation = None;
+                while let Some(key) = map.next_key::<String>()? {
+                    match key.as_str() {
+                        "id" => {
+                            if id.is_some() {
+                                return Err(de::Error::duplicate_field("id"));
+                            }
+                            id = Some(map.next_value()?);
+                        }
+                        "phase" => {
+                            if phase.is_some() {
+                                return Err(de::Error::duplicate_field("phase"));
+                            }
+                            phase = Some(map.next_value()?);
+                        }
+                        "annotation" => {
+                            if annotation.is_some() {
+                                return Err(de::Error::duplicate_field("annotation"));
+                            }
+                            annotation = Some(map.next_value::<String>()?);
+                        }
+                        _ => {
+                            return Err(de::Error::unknown_field(
+                                &key,
+                                &["id", "phase", "annotation"],
+                            ))
+                        }
+                    }
+                }
+                let id = id.ok_or_else(|| de::Error::missing_field("id"))?;
+                let phase = phase.ok_or_else(|| de::Error::missing_field("phase"))?;
+                let annotation =
+                    annotation.ok_or_else(|| de::Error::missing_field("annotation"))?;
+                Ok(<$type>::new_with_id(id, phase, annotation))
+            }
+        }
+    };
+}
+
+impl_visitor_forward_shared!(ForwardSignalVisitor, ForwardSignal, "struct ForwardSignal");
+impl_visitor_forward_shared!(SharedSignalVisitor, SharedSignal, "struct SharedSignal");
+
+struct TraceWitnessVisitor;
+
+impl<'de> Visitor<'de> for TraceWitnessVisitor {
+    type Value = TraceWitness<Fr>;
+
+    fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
+        formatter.write_str("struct TraceWitness")
+    }
+
+    fn visit_map<A>(self, mut map: A) -> Result<TraceWitness<Fr>, A::Error>
+    where
+        A: MapAccess<'de>,
+    {
+        let mut step_instances = None;
+
+        while let Some(key) = map.next_key::<String>()? {
+            match key.as_str() {
+                "step_instances" => {
+                    if step_instances.is_some() {
+                        return Err(de::Error::duplicate_field("step_instances"));
+                    }
+                    step_instances = Some(map.next_value()?);
+                }
+                _ => return Err(de::Error::unknown_field(&key, &["step_instances"])),
+            }
+        }
+        let step_instances =
+            step_instances.ok_or_else(|| de::Error::missing_field("step_instances"))?;
+        Ok(Self::Value { step_instances })
+    }
+}
+
+struct StepInstanceVisitor;
+
+impl<'de> Visitor<'de> for StepInstanceVisitor {
+    type Value = StepInstance<Fr>;
+
+    fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
+        formatter.write_str("struct StepInstance")
+    }
+
+    fn visit_map<A>(self, mut map: A) -> Result<StepInstance<Fr>, A::Error>
+    where
+        A: MapAccess<'de>,
+    {
+        let mut step_type_uuid = None;
+        let mut assignments = None;
+
+        while let Some(key) = map.next_key::<String>()? {
+            match key.as_str() {
+                "step_type_uuid" => {
+                    if step_type_uuid.is_some() {
+                        return Err(de::Error::duplicate_field("step_type_uuid"));
+                    }
+                    step_type_uuid = Some(map.next_value()?);
+                }
+                "assignments" => {
+                    if assignments.is_some() {
+                        return Err(de::Error::duplicate_field("assignments"));
+                    }
+                    assignments = Some(map.next_value::<HashMap<UUID, (Queriable<Fr>, Fr)>>()?);
+                }
+                _ => {
+                    return Err(de::Error::unknown_field(
+                        &key,
+                        &["step_type_uuid", "assignments"],
+                    ))
+                }
+            }
+        }
+        let step_type_uuid =
+            step_type_uuid.ok_or_else(|| de::Error::missing_field("step_type_uuid"))?;
+
+        let assignments: HashMap<Queriable<Fr>, Fr> = assignments
+            .ok_or_else(|| de::Error::missing_field("assignments"))?
+            .into_values()
+            .collect();
+
+        Ok(Self::Value {
+            step_type_uuid,
+            assignments,
+        })
+    }
+}
+
+macro_rules! impl_deserialize {
+    ($name:ident, $type:ty) => {
+        impl<'de> Deserialize<'de> for $type {
+            fn deserialize<D>(deserializer: D) -> Result<$type, D::Error>
+            where
+                D: Deserializer<'de>,
+            {
+                deserializer.deserialize_map($name)
+            }
+        }
+    };
+}
+
+impl_deserialize!(ExprVisitor, Expr<Fr, Queriable<Fr>>);
+impl_deserialize!(QueriableVisitor, Queriable<Fr>);
+impl_deserialize!(ExposeOffsetVisitor, ExposeOffset);
+impl_deserialize!(InternalSignalVisitor, InternalSignal);
+impl_deserialize!(FixedSignalVisitor, FixedSignal);
+impl_deserialize!(ForwardSignalVisitor, ForwardSignal);
+impl_deserialize!(SharedSignalVisitor, SharedSignal);
+impl_deserialize!(StepTypeHandlerVisitor, StepTypeHandler);
+impl_deserialize!(ConstraintVisitor, Constraint<Fr>);
+impl_deserialize!(TransitionConstraintVisitor, TransitionConstraint<Fr>);
+impl_deserialize!(StepTypeVisitor, StepType<Fr>);
+impl_deserialize!(TraceWitnessVisitor, TraceWitness<Fr>);
+impl_deserialize!(StepInstanceVisitor, StepInstance<Fr>);
+impl_deserialize!(LookupVisitor, Lookup<Fr>);
+
+impl<'de> Deserialize<'de> for Circuit<Fr, ()> {
+    fn deserialize<D>(deserializer: D) -> Result<Circuit<Fr, ()>, D::Error>
+    where
+        D: Deserializer<'de>,
+    {
+        deserializer.deserialize_map(CircuitVisitor)
+    }
+}
+
+#[cfg(test)]
+mod tests {
+    use super::*;
+    #[test]
+    fn test_trace_witness() {
+        let json = r#"
+        {
+            "step_instances": [
+                {
+                    "step_type_uuid": 270606747459021742275781620564109167114,
+                    "assignments": {
+                        "270606737951642240564318377467548666378": [
+                            {
+                                "Forward": [
+                                    {
+                                        "id": 270606737951642240564318377467548666378,
+                                        "phase": 0,
+                                        "annotation": "a"
+                                    },
+                                    false
+                                ]
+                            },
+                            [
+                                55,
+                                0,
+                                0,
+                                0
+                            ]
+                        ],
+                        "270606743497613616562965561253747624458": [
+                            {
+                                "Forward": [
+                                    {
+                                        "id": 270606743497613616562965561253747624458,
+                                        "phase": 0,
+                                        "annotation": "b"
+                                    },
+                                    false
+                                ]
+                            },
+                            [
+                                89,
+                                0,
+                                0,
+                                0
+                            ]
+                        ],
+                        "270606753004993118272949371872716917258": [
+                            {
+                                "Internal": {
+                                    "id": 270606753004993118272949371872716917258,
+                                    "annotation": "c"
+                                }
+                            },
+                            [
+                                144,
+                                0,
+                                0,
+                                0
+                            ]
+                        ]
+                    }
+                },
+                {
+                    "step_type_uuid": 270606783111694873693576112554652600842,
+                    "assignments": {
+                        "270606737951642240564318377467548666378": [
+                            {
+                                "Forward": [
+                                    {
+                                        "id": 270606737951642240564318377467548666378,
+                                        "phase": 0,
+                                        "annotation": "a"
+                                    },
+                                    false
+                                ]
+                            },
+                            [
+                                89,
+                                0,
+                                0,
+                                0
+                            ]
+                        ],
+                        "270606743497613616562965561253747624458": [
+                            {
+                                "Forward": [
+                                    {
+                                        "id": 270606743497613616562965561253747624458,
+                                        "phase": 0,
+                                        "annotation": "b"
+                                    },
+                                    false
+                                ]
+                            },
+                            [
+                                144,
+                                0,
+                                0,
+                                0
+                            ]
+                        ],
+                        "270606786280821374261518951164072823306": [
+                            {
+                                "Internal": {
+                                    "id": 270606786280821374261518951164072823306,
+                                    "annotation": "c"
+                                }
+                            },
+                            [
+                                233,
+                                0,
+                                0,
+                                0
+                            ]
+                        ]
+                    }
+                }
+            ]
+        }
+        "#;
+        let trace_witness: TraceWitness<Fr> = serde_json::from_str(json).unwrap();
+        println!("{:?}", trace_witness);
+    }
+
+    #[test]
+    fn test_expose_offset() {
+        let mut json = r#"
+        {
+            "Step": 1
+        }
+        "#;
+        let _: ExposeOffset = serde_json::from_str(json).unwrap();
+        json = r#"
+        {
+            "Last": -1
+        }
+        "#;
+        let _: ExposeOffset = serde_json::from_str(json).unwrap();
+        json = r#"
+        {
+            "First": 1
+        }
+        "#;
+        let _: ExposeOffset = serde_json::from_str(json).unwrap();
+    }
+
+    #[test]
+    fn test_circuit() {
+        let json = r#"
+        {
+            "step_types": {
+                "258869595755756204079859764249309612554": {
+                    "id": 258869595755756204079859764249309612554,
+                    "name": "fibo_first_step",
+                    "signals": [
+                        {
+                            "id": 258869599717164329791616633222308956682,
+                            "annotation": "c"
+                        }
+                    ],
+                    "constraints": [
+                        {
+                            "annotation": "(a == 1)",
+                            "expr": {
+                                "Sum": [
+                                    {
+                                        "Forward": [
+                                            {
+                                                "id": 258869580702405326369584955980151130634,
+                                                "phase": 0,
+                                                "annotation": "a"
+                                            },
+                                            false
+                                        ]
+                                    },
+                                    {
+                                        "Neg": {
+                                            "Const": [
+                                                1,
+                                                0,
+                                                0,
+                                                0
+                                            ]
+                                        }
+                                    }
+                                ]
+                            }
+                        },
+                        {
+                            "annotation": "(b == 1)",
+                            "expr": {
+                                "Sum": [
+                                    {
+                                        "Forward": [
+                                            {
+                                                "id": 258869587040658327507391136965088381450,
+                                                "phase": 0,
+                                                "annotation": "b"
+                                            },
+                                            false
+                                        ]
+                                    },
+                                    {
+                                        "Neg": {
+                                            "Const": [
+                                                1,
+                                                0,
+                                                0,
+                                                0
+                                            ]
+                                        }
+                                    }
+                                ]
+                            }
+                        },
+                        {
+                            "annotation": "((a + b) == c)",
+                            "expr": {
+                                "Sum": [
+                                    {
+                                        "Forward": [
+                                            {
+                                                "id": 258869580702405326369584955980151130634,
+                                                "phase": 0,
+                                                "annotation": "a"
+                                            },
+                                            false
+                                        ]
+                                    },
+                                    {
+                                        "Forward": [
+                                            {
+                                                "id": 258869587040658327507391136965088381450,
+                                                "phase": 0,
+                                                "annotation": "b"
+                                            },
+                                            false
+                                        ]
+                                    },
+                                    {
+                                        "Neg": {
+                                            "Internal": {
+                                                "id": 258869599717164329791616633222308956682,
+                                                "annotation": "c"
+                                            }
+                                        }
+                                    }
+                                ]
+                            }
+                        }
+                    ],
+                    "transition_constraints": [
+                        {
+                            "annotation": "(b == next(a))",
+                            "expr": {
+                                "Sum": [
+                                    {
+                                        "Forward": [
+                                            {
+                                                "id": 258869587040658327507391136965088381450,
+                                                "phase": 0,
+                                                "annotation": "b"
+                                            },
+                                            false
+                                        ]
+                                    },
+                                    {
+                                        "Neg": {
+                                            "Forward": [
+                                                {
+                                                    "id": 258869580702405326369584955980151130634,
+                                                    "phase": 0,
+                                                    "annotation": "a"
+                                                },
+                                                true
+                                            ]
+                                        }
+                                    }
+                                ]
+                            }
+                        },
+                        {
+                            "annotation": "(c == next(b))",
+                            "expr": {
+                                "Sum": [
+                                    {
+                                        "Internal": {
+                                            "id": 258869599717164329791616633222308956682,
+                                            "annotation": "c"
+                                        }
+                                    },
+                                    {
+                                        "Neg": {
+                                            "Forward": [
+                                                {
+                                                    "id": 258869587040658327507391136965088381450,
+                                                    "phase": 0,
+                                                    "annotation": "b"
+                                                },
+                                                true
+                                            ]
+                                        }
+                                    }
+                                ]
+                            }
+                        },
+                        {
+                            "annotation": "(n == next(n))",
+                            "expr": {
+                                "Sum": [
+                                    {
+                                        "Forward": [
+                                            {
+                                                "id": 258869589417503202934383108674030275082,
+                                                "phase": 0,
+                                                "annotation": "n"
+                                            },
+                                            false
+                                        ]
+                                    },
+                                    {
+                                        "Neg": {
+                                            "Forward": [
+                                                {
+                                                    "id": 258869589417503202934383108674030275082,
+                                                    "phase": 0,
+                                                    "annotation": "n"
+                                                },
+                                                true
+                                            ]
+                                        }
+                                    }
+                                ]
+                            }
+                        }
+                    ],
+                    "lookups": [],
+                    "annotations": {
+                        "258869599717164329791616633222308956682": "c"
+                    }
+                },
+                "258869628239302834927102989021255174666": {
+                    "id": 258869628239302834927102989021255174666,
+                    "name": "fibo_step",
+                    "signals": [
+                        {
+                            "id": 258869632200710960639812650790420089354,
+                            "annotation": "c"
+                        }
+                    ],
+                    "constraints": [
+                        {
+                            "annotation": "((a + b) == c)",
+                            "expr": {
+                                "Sum": [
+                                    {
+                                        "Forward": [
+                                            {
+                                                "id": 258869580702405326369584955980151130634,
+                                                "phase": 0,
+                                                "annotation": "a"
+                                            },
+                                            false
+                                        ]
+                                    },
+                                    {
+                                        "Forward": [
+                                            {
+                                                "id": 258869587040658327507391136965088381450,
+                                                "phase": 0,
+                                                "annotation": "b"
+                                            },
+                                            false
+                                        ]
+                                    },
+                                    {
+                                        "Neg": {
+                                            "Internal": {
+                                                "id": 258869632200710960639812650790420089354,
+                                                "annotation": "c"
+                                            }
+                                        }
+                                    }
+                                ]
+                            }
+                        }
+                    ],
+                    "transition_constraints": [
+                        {
+                            "annotation": "(b == next(a))",
+                            "expr": {
+                                "Sum": [
+                                    {
+                                        "Forward": [
+                                            {
+                                                "id": 258869587040658327507391136965088381450,
+                                                "phase": 0,
+                                                "annotation": "b"
+                                            },
+                                            false
+                                        ]
+                                    },
+                                    {
+                                        "Neg": {
+                                            "Forward": [
+                                                {
+                                                    "id": 258869580702405326369584955980151130634,
+                                                    "phase": 0,
+                                                    "annotation": "a"
+                                                },
+                                                true
+                                            ]
+                                        }
+                                    }
+                                ]
+                            }
+                        },
+                        {
+                            "annotation": "(c == next(b))",
+                            "expr": {
+                                "Sum": [
+                                    {
+                                        "Internal": {
+                                            "id": 258869632200710960639812650790420089354,
+                                            "annotation": "c"
+                                        }
+                                    },
+                                    {
+                                        "Neg": {
+                                            "Forward": [
+                                                {
+                                                    "id": 258869587040658327507391136965088381450,
+                                                    "phase": 0,
+                                                    "annotation": "b"
+                                                },
+                                                true
+                                            ]
+                                        }
+                                    }
+                                ]
+                            }
+                        },
+                        {
+                            "annotation": "(n == next(n))",
+                            "expr": {
+                                "Sum": [
+                                    {
+                                        "Forward": [
+                                            {
+                                                "id": 258869589417503202934383108674030275082,
+                                                "phase": 0,
+                                                "annotation": "n"
+                                            },
+                                            false
+                                        ]
+                                    },
+                                    {
+                                        "Neg": {
+                                            "Forward": [
+                                                {
+                                                    "id": 258869589417503202934383108674030275082,
+                                                    "phase": 0,
+                                                    "annotation": "n"
+                                                },
+                                                true
+                                            ]
+                                        }
+                                    }
+                                ]
+                            }
+                        }
+                    ],
+                    "lookups": [],
+                    "annotations": {
+                        "258869632200710960639812650790420089354": "c"
+                    }
+                },
+                "258869646461780213207493341245063432714": {
+                    "id": 258869646461780213207493341245063432714,
+                    "name": "padding",
+                    "signals": [],
+                    "constraints": [],
+                    "transition_constraints": [
+                        {
+                            "annotation": "(b == next(b))",
+                            "expr": {
+                                "Sum": [
+                                    {
+                                        "Forward": [
+                                            {
+                                                "id": 258869587040658327507391136965088381450,
+                                                "phase": 0,
+                                                "annotation": "b"
+                                            },
+                                            false
+                                        ]
+                                    },
+                                    {
+                                        "Neg": {
+                                            "Forward": [
+                                                {
+                                                    "id": 258869587040658327507391136965088381450,
+                                                    "phase": 0,
+                                                    "annotation": "b"
+                                                },
+                                                true
+                                            ]
+                                        }
+                                    }
+                                ]
+                            }
+                        },
+                        {
+                            "annotation": "(n == next(n))",
+                            "expr": {
+                                "Sum": [
+                                    {
+                                        "Forward": [
+                                            {
+                                                "id": 258869589417503202934383108674030275082,
+                                                "phase": 0,
+                                                "annotation": "n"
+                                            },
+                                            false
+                                        ]
+                                    },
+                                    {
+                                        "Neg": {
+                                            "Forward": [
+                                                {
+                                                    "id": 258869589417503202934383108674030275082,
+                                                    "phase": 0,
+                                                    "annotation": "n"
+                                                },
+                                                true
+                                            ]
+                                        }
+                                    }
+                                ]
+                            }
+                        }
+                    ],
+                    "lookups": [],
+                    "annotations": {}
+                }
+            },
+            "forward_signals": [
+                {
+                    "id": 258869580702405326369584955980151130634,
+                    "phase": 0,
+                    "annotation": "a"
+                },
+                {
+                    "id": 258869587040658327507391136965088381450,
+                    "phase": 0,
+                    "annotation": "b"
+                },
+                {
+                    "id": 258869589417503202934383108674030275082,
+                    "phase": 0,
+                    "annotation": "n"
+                }
+            ],
+            "shared_signals": [],
+            "fixed_signals": [],
+            "exposed": [
+                [
+                    {
+                        "Forward": [
+                            {
+                                "id": 258869587040658327507391136965088381450,
+                                "phase": 0,
+                                "annotation": "b"
+                            },
+                            false
+                        ]
+                    },
+                    {
+                        "Last": -1
+                    }
+                ],
+                [
+                    {
+                        "Forward": [
+                            {
+                                "id": 258869589417503202934383108674030275082,
+                                "phase": 0,
+                                "annotation": "n"
+                            },
+                            false
+                        ]
+                    },
+                    {
+                        "Last": -1
+                    }
+                ]
+            ],
+            "annotations": {
+                "258869580702405326369584955980151130634": "a",
+                "258869587040658327507391136965088381450": "b",
+                "258869589417503202934383108674030275082": "n",
+                "258869595755756204079859764249309612554": "fibo_first_step",
+                "258869628239302834927102989021255174666": "fibo_step",
+                "258869646461780213207493341245063432714": "padding"
+            },
+            "fixed_assignments": null,
+            "first_step": 258869595755756204079859764249309612554,
+            "last_step": 258869646461780213207493341245063432714,
+            "num_steps": 10,
+            "q_enable": true,
+            "id": 258867373405797678961444396351437277706
+        }
+        "#;
+        let circuit: Circuit<Fr, ()> = serde_json::from_str(json).unwrap();
+        println!("{:?}", circuit);
+    }
+
+    #[test]
+    fn test_step_type() {
+        let json = r#"
+        {
+            "id":1,
+            "name":"fibo",
+            "signals":[
+                {
+                    "id":1,
+                    "annotation":"a"
+                },
+                {
+                    "id":2,
+                    "annotation":"b"
+                }
+            ],
+            "constraints":[
+                {
+                    "annotation":"constraint",
+                    "expr":{
+                        "Sum":[
+                            {
+                                "Const":[1, 0, 0, 0]
+                            },
+                            {
+                                "Mul":[
+                                    {
+                                        "Internal":{
+                                            "id":3,
+                                            "annotation":"c"
+                                        }
+                                    },
+                                    {
+                                        "Const":[3, 0, 0, 0]
+                                    }
+                                ]
+                            }
+                        ]
+                    }
+                },
+                {
+                    "annotation":"constraint",
+                    "expr":{
+                        "Sum":[
+                            {
+                                "Const":[1, 0, 0, 0]
+                            },
+                            {
+                                "Mul":[
+                                    {
+                                        "Shared":[
+                                            {
+                                                "id":4,
+                                                "phase":2,
+                                                "annotation":"d"
+                                            },
+                                            1
+                                        ]
+                                    },
+                                    {
+                                        "Const":[3, 0, 0, 0]
+                                    }
+                                ]
+                            }
+                        ]
+                    }
+                }
+            ],
+            "transition_constraints":[
+                {
+                    "annotation":"trans",
+                    "expr":{
+                        "Sum":[
+                            {
+                                "Const":[1, 0, 0, 0]
+                            },
+                            {
+                                "Mul":[
+                                    {
+                                        "Forward":[
+                                            {
+                                                "id":5,
+                                                "phase":1,
+                                                "annotation":"e"
+                                            },
+                                            true
+                                        ]
+                                    },
+                                    {
+                                        "Const":[3, 0, 0, 0]
+                                    }
+                                ]
+                            }
+                        ]
+                    }
+                },
+                {
+                    "annotation":"trans",
+                    "expr":{
+                        "Sum":[
+                            {
+                                "Const":[1, 0, 0, 0]
+                            },
+                            {
+                                "Mul":[
+                                    {
+                                        "Fixed":[
+                                            {
+                                                "id":6,
+                                                "annotation":"e"
+                                            },
+                                            2
+                                        ]
+                                    },
+                                    {
+                                        "Const":[3, 0, 0, 0]
+                                    }
+                                ]
+                            }
+                        ]
+                    }
+                }
+            ],
+            "lookups":[],
+            "annotations":{
+                "5":"a",
+                "6":"b",
+                "7":"c"
+            }
+        }
+        "#;
+        let step_type: StepType<Fr> = serde_json::from_str(json).unwrap();
+        println!("{:?}", step_type);
+    }
+
+    #[test]
+    fn test_constraint() {
+        let json = r#"
+        {"annotation": "constraint",
+        "expr": 
+        {
+            "Sum": [
+                {
+                "Internal": {
+                    "id": 27,
+                    "annotation": "a"
+                }
+                },
+                {
+                "Fixed": [
+                    {
+                        "id": 28,
+                        "annotation": "b"
+                    },
+                    1
+                ]
+                },
+                {
+                "Shared": [
+                    {
+                        "id": 29,
+                        "phase": 1,
+                        "annotation": "c"
+                    },
+                    2
+                ]
+                },
+                {
+                "Forward": [
+                    {
+                        "id": 30,
+                        "phase": 2,
+                        "annotation": "d"
+                    },
+                    true
+                ]
+                },
+                {
+                "StepTypeNext": {
+                    "id": 31,
+                    "annotation": "e"
+                }
+                },
+                {
+                "Const": [3, 0, 0, 0]
+                },
+                {
+                "Mul": [
+                    {
+                    "Const": [4, 0, 0, 0]
+                    },
+                    {
+                    "Const": [5, 0, 0, 0]
+                    }
+                ]
+                },
+                {
+                "Neg": {
+                    "Const": [2, 0, 0, 0]
+                }
+                },
+                {
+                "Pow": [
+                    {
+                    "Const": [3, 0, 0, 0]
+                    },
+                    4
+                ]
+                }
+            ]
+            }
+        }"#;
+        let constraint: Constraint<Fr> = serde_json::from_str(json).unwrap();
+        println!("{:?}", constraint);
+        let transition_constraint: TransitionConstraint<Fr> = serde_json::from_str(json).unwrap();
+        println!("{:?}", transition_constraint);
+    }
+
+    #[test]
+    fn test_expr() {
+        let json = r#"
+        {
+            "Sum": [
+                {
+                "Internal": {
+                    "id": 27,
+                    "annotation": "a"
+                }
+                },
+                {
+                "Fixed": [
+                    {
+                        "id": 28,
+                        "annotation": "b"
+                    },
+                    1
+                ]
+                },
+                {
+                "Shared": [
+                    {
+                        "id": 29,
+                        "phase": 1,
+                        "annotation": "c"
+                    },
+                    2
+                ]
+                },
+                {
+                "Forward": [
+                    {
+                        "id": 30,
+                        "phase": 2,
+                        "annotation": "d"
+                    },
+                    true
+                ]
+                },
+                {
+                "StepTypeNext": {
+                    "id": 31,
+                    "annotation": "e"
+                }
+                },
+                {
+                "Const": [3, 0, 0, 0]
+                },
+                {
+                "Mul": [
+                    {
+                    "Const": [4, 0, 0, 0]
+                    },
+                    {
+                    "Const": [5, 0, 0, 0]
+                    }
+                ]
+                },
+                {
+                "Neg": {
+                    "Const": [2, 0, 0, 0]
+                }
+                },
+                {
+                "Pow": [
+                    {
+                    "Const": [3, 0, 0, 0]
+                    },
+                    4
+                ]
+                }
+            ]
+            }"#;
+        let expr: Expr<Fr, Queriable<Fr>> = serde_json::from_str(json).unwrap();
+        println!("{:?}", expr);
+    }
+}
+
+#[pyfunction]
+fn convert_and_print_ast(json: &PyString) {
+    let circuit: Circuit<Fr, ()> =
+        serde_json::from_str(json.to_str().expect("PyString convertion failed."))
+            .expect("Json deserialization to Circuit failed.");
+    println!("{:?}", circuit);
+}
+
+#[pyfunction]
+fn convert_and_print_trace_witness(json: &PyString) {
+    let trace_witness: TraceWitness<Fr> =
+        serde_json::from_str(json.to_str().expect("PyString convertion failed."))
+            .expect("Json deserialization to TraceWitness failed.");
+    println!("{:?}", trace_witness);
+}
+
+#[pyfunction]
+fn ast_to_halo2(json: &PyString) -> u128 {
+    let uuid = chiquito_ast_to_halo2(json.to_str().expect("PyString convertion failed."));
+
+    uuid
+}
+
+#[pyfunction]
+fn ast_map_store(json: &PyString) -> u128 {
+    let uuid = chiquito_ast_map_store(json.to_str().expect("PyString convertion failed."));
+
+    uuid
+}
+
+#[pyfunction]
+fn halo2_mock_prover(witness_json: &PyString, rust_id: &PyLong, k: &PyLong) {
+    chiquito_halo2_mock_prover(
+        witness_json.to_str().expect("PyString convertion failed."),
+        rust_id.extract().expect("PyLong convertion failed."),
+        k.extract().expect("PyLong convertion failed."),
+    );
+}
+
+#[pyfunction]
+fn super_circuit_halo2_mock_prover(rust_ids: &PyList, super_witness: &PyDict, k: &PyLong) {
+    let uuids = rust_ids
+        .iter()
+        .map(|rust_id| {
+            rust_id
+                .downcast::<PyLong>()
+                .expect("PyAny downcast failed.")
+                .extract()
+                .expect("PyLong convertion failed.")
+        })
+        .collect::<Vec<UUID>>();
+
+    let super_witness = super_witness
+        .iter()
+        .map(|(key, value)| {
+            (
+                key.downcast::<PyLong>()
+                    .expect("PyAny downcast failed.")
+                    .extract()
+                    .expect("PyLong convertion failed."),
+                value
+                    .downcast::<PyString>()
+                    .expect("PyAny downcast failed.")
+                    .to_str()
+                    .expect("PyString convertion failed."),
+            )
+        })
+        .collect::<HashMap<u128, &str>>();
+
+    chiquito_super_circuit_halo2_mock_prover(
+        uuids,
+        super_witness,
+        k.extract().expect("PyLong convertion failed."),
+    )
+}
+
+#[pymodule]
+fn rust_chiquito(_py: Python, m: &PyModule) -> PyResult<()> {
+    m.add_function(wrap_pyfunction!(convert_and_print_ast, m)?)?;
+    m.add_function(wrap_pyfunction!(convert_and_print_trace_witness, m)?)?;
+    m.add_function(wrap_pyfunction!(ast_to_halo2, m)?)?;
+    m.add_function(wrap_pyfunction!(ast_map_store, m)?)?;
+    m.add_function(wrap_pyfunction!(halo2_mock_prover, m)?)?;
+    m.add_function(wrap_pyfunction!(super_circuit_halo2_mock_prover, m)?)?;
+    Ok(())
+}
+
\ No newline at end of file diff --git a/docs/apidocs/src/chiquito/lib.rs.html b/docs/apidocs/src/chiquito/lib.rs.html new file mode 100644 index 00000000..fa8e193c --- /dev/null +++ b/docs/apidocs/src/chiquito/lib.rs.html @@ -0,0 +1,17 @@ +lib.rs - source
1
+2
+3
+4
+5
+6
+7
+8
+
pub mod ast;
+pub mod field;
+pub mod frontend;
+pub mod plonkish;
+pub mod poly;
+pub mod stdlib;
+mod util;
+pub mod wit_gen;
+
\ No newline at end of file diff --git a/docs/apidocs/src/chiquito/plonkish/backend/halo2.rs.html b/docs/apidocs/src/chiquito/plonkish/backend/halo2.rs.html new file mode 100644 index 00000000..5bad51ee --- /dev/null +++ b/docs/apidocs/src/chiquito/plonkish/backend/halo2.rs.html @@ -0,0 +1,1035 @@ +halo2.rs - source
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+465
+466
+467
+468
+469
+470
+471
+472
+473
+474
+475
+476
+477
+478
+479
+480
+481
+482
+483
+484
+485
+486
+487
+488
+489
+490
+491
+492
+493
+494
+495
+496
+497
+498
+499
+500
+501
+502
+503
+504
+505
+506
+507
+508
+509
+510
+511
+512
+513
+514
+515
+516
+517
+
use std::{collections::HashMap, hash::Hash};
+
+use halo2_proofs::{
+    arithmetic::Field,
+    circuit::{Cell, Layouter, Region, RegionIndex, SimpleFloorPlanner, Value},
+    plonk::{
+        Advice, Any, Circuit as h2Circuit, Column, ConstraintSystem, Error, Expression, FirstPhase,
+        Fixed, Instance, SecondPhase, ThirdPhase, VirtualCells,
+    },
+    poly::Rotation,
+};
+
+use crate::{
+    field::Field as ChiquitoField,
+    plonkish::ir::{
+        assignments::Assignments,
+        sc::{SuperAssignments, SuperCircuit},
+        Circuit, Column as cColumn,
+        ColumnType::{Advice as cAdvice, Fixed as cFixed, Halo2Advice, Halo2Fixed},
+        PolyExpr,
+    },
+    poly::ToField,
+    util::UUID,
+};
+
+impl<T: Field + From<u64>> ChiquitoField for T {
+    const ZERO: Self = <Self as Field>::ZERO;
+    const ONE: Self = <Self as Field>::ONE;
+
+    fn mi(&self) -> Self {
+        self.invert().unwrap_or(Self::ZERO)
+    }
+
+    fn pow<S: AsRef<[u64]>>(&self, exp: S) -> Self {
+        Field::pow(self, exp)
+    }
+}
+
+#[allow(non_snake_case)]
+pub fn chiquito2Halo2<F: Field + From<u64> + Hash>(circuit: Circuit<F>) -> ChiquitoHalo2<F> {
+    ChiquitoHalo2::new(circuit)
+}
+
+#[allow(non_snake_case)]
+pub fn chiquitoSuperCircuit2Halo2<F: Field + From<u64> + Hash, MappingArgs>(
+    super_circuit: &SuperCircuit<F, MappingArgs>,
+) -> Vec<ChiquitoHalo2<F>> {
+    super_circuit
+        .get_sub_circuits()
+        .iter()
+        .map(|c| chiquito2Halo2((*c).clone()))
+        .collect()
+}
+
+#[derive(Clone, Debug, Default)]
+pub struct ChiquitoHalo2<F: Field + From<u64>> {
+    pub debug: bool,
+
+    circuit: Circuit<F>,
+
+    advice_columns: HashMap<UUID, Column<Advice>>,
+    fixed_columns: HashMap<UUID, Column<Fixed>>,
+    instance_column: Option<Column<Instance>>,
+
+    ir_id: UUID,
+}
+
+impl<F: Field + From<u64> + Hash> ChiquitoHalo2<F> {
+    pub fn new(circuit: Circuit<F>) -> ChiquitoHalo2<F> {
+        let ir_id = circuit.id;
+        ChiquitoHalo2 {
+            debug: true,
+            circuit,
+            advice_columns: Default::default(),
+            fixed_columns: Default::default(),
+            instance_column: Default::default(),
+            ir_id,
+        }
+    }
+
+    pub fn configure(&mut self, meta: &mut ConstraintSystem<F>) {
+        self.configure_columns_sub_circuit(meta);
+
+        self.configure_sub_circuit(meta);
+    }
+
+    fn configure_columns_sub_circuit(&mut self, meta: &mut ConstraintSystem<F>) {
+        let mut advice_columns = HashMap::<UUID, Column<Advice>>::new();
+        let mut fixed_columns = HashMap::<UUID, Column<Fixed>>::new();
+
+        for column in self.circuit.columns.iter() {
+            match column.ctype {
+                cAdvice => {
+                    let halo2_column = to_halo2_advice(meta, column);
+                    advice_columns.insert(column.uuid(), halo2_column);
+                    meta.annotate_lookup_any_column(halo2_column, || column.annotation.clone());
+                }
+                cFixed => {
+                    let halo2_column = meta.fixed_column();
+                    fixed_columns.insert(column.uuid(), halo2_column);
+                    meta.annotate_lookup_any_column(halo2_column, || column.annotation.clone());
+                }
+                Halo2Advice => {
+                    let halo2_column = column
+                        .halo2_advice
+                        .unwrap_or_else(|| {
+                            panic!("halo2 advice column not found {}", column.annotation)
+                        })
+                        .column;
+                    advice_columns.insert(column.uuid(), halo2_column);
+                    meta.annotate_lookup_any_column(halo2_column, || column.annotation.clone());
+                }
+                Halo2Fixed => {
+                    let halo2_column = column
+                        .halo2_fixed
+                        .unwrap_or_else(|| {
+                            panic!("halo2 advice column not found {}", column.annotation)
+                        })
+                        .column;
+                    fixed_columns.insert(column.uuid(), halo2_column);
+                    meta.annotate_lookup_any_column(halo2_column, || column.annotation.clone());
+                }
+            }
+        }
+
+        self.advice_columns = advice_columns;
+        self.fixed_columns = fixed_columns;
+    }
+
+    pub fn configure_sub_circuit(&mut self, meta: &mut ConstraintSystem<F>) {
+        if !self.circuit.exposed.is_empty() {
+            self.instance_column = Some(meta.instance_column());
+        }
+
+        if !self.circuit.polys.is_empty() {
+            meta.create_gate("main", |meta| {
+                let mut constraints: Vec<(&'static str, Expression<F>)> = Vec::new();
+
+                for poly in self.circuit.polys.iter() {
+                    let converted = self.convert_poly(meta, &poly.expr);
+                    let annotation = Box::leak(
+                        format!("{} => {:?}", poly.annotation, converted).into_boxed_str(),
+                    );
+                    constraints.push((annotation, converted));
+                }
+
+                constraints
+            });
+        }
+
+        for lookup in self.circuit.lookups.iter() {
+            let annotation: &'static str = Box::leak(lookup.annotation.clone().into_boxed_str());
+            meta.lookup_any(annotation, |meta| {
+                let mut exprs = Vec::new();
+                for (src, dest) in lookup.exprs.iter() {
+                    exprs.push((self.convert_poly(meta, src), self.convert_poly(meta, dest)))
+                }
+
+                exprs
+            });
+        }
+    }
+
+    pub fn synthesize(&self, layouter: &mut impl Layouter<F>, witness: Option<&Assignments<F>>) {
+        let _ = layouter.assign_region(
+            || "circuit",
+            |mut region| {
+                self.annotate_circuit(&mut region);
+
+                self.assign_fixed(&mut region, &self.circuit.fixed_assignments)?;
+
+                if let Some(witness) = &witness {
+                    self.assign_advice(&mut region, witness)?;
+                }
+
+                Ok(())
+            },
+        );
+
+        for (index, (column, rotation)) in self.circuit.exposed.iter().enumerate() {
+            let halo2_column =
+                Column::<Any>::from(*self.advice_columns.get(&column.uuid()).unwrap());
+            let cell = new_cell(
+                halo2_column,
+                // For single row cell manager, forward signal rotation is always zero.
+                // For max width cell manager, rotation can be non-zero.
+                // Offset is absolute row index calculated in `compile_exposed`.
+                *rotation as usize,
+            );
+            let _ = layouter.constrain_instance(cell, self.instance_column.unwrap(), index);
+        }
+    }
+
+    fn assign_advice(&self, region: &mut Region<F>, witness: &Assignments<F>) -> Result<(), Error> {
+        for (column, assignments) in witness.iter() {
+            let column = self.convert_advice_column(column);
+
+            for (offset, value) in assignments.iter().enumerate() {
+                region.assign_advice(|| "", column, offset, || Value::known(*value))?;
+            }
+        }
+
+        Ok(())
+    }
+
+    fn assign_fixed(&self, region: &mut Region<F>, fixed: &Assignments<F>) -> Result<(), Error> {
+        for (column, values) in fixed.iter() {
+            let column = self.convert_fixed_column(column);
+
+            for (offset, value) in values.iter().enumerate() {
+                region.assign_fixed(|| "", column, offset, || Value::known(*value))?;
+            }
+        }
+
+        Ok(())
+    }
+
+    fn instance(&self, witness: &Assignments<F>) -> Vec<F> {
+        let mut instance_values = Vec::new();
+        for (column, rotation) in &self.circuit.exposed {
+            let values = witness
+                .get(column)
+                .unwrap_or_else(|| panic!("exposed column not found: {}", column.annotation));
+
+            if let Some(value) = values.get(*rotation as usize) {
+                instance_values.push(*value);
+            } else {
+                panic!(
+                    "assignment index out of bounds for column: {}",
+                    column.annotation
+                );
+            }
+        }
+        instance_values
+    }
+
+    fn annotate_circuit(&self, region: &mut Region<F>) {
+        for column in self.circuit.columns.iter() {
+            match column.ctype {
+                cAdvice | Halo2Advice => {
+                    let halo2_column = self
+                        .advice_columns
+                        .get(&column.uuid())
+                        .expect("advice column not found");
+
+                    region.name_column(|| column.annotation.clone(), *halo2_column);
+                }
+                cFixed | Halo2Fixed => {
+                    let halo2_column = self
+                        .fixed_columns
+                        .get(&column.uuid())
+                        .expect("fixed column not found");
+
+                    region.name_column(|| column.annotation.clone(), *halo2_column);
+                }
+            }
+        }
+    }
+
+    fn convert_poly(&self, meta: &mut VirtualCells<'_, F>, src: &PolyExpr<F>) -> Expression<F> {
+        match src {
+            PolyExpr::Const(c) => Expression::Constant(*c),
+            PolyExpr::Sum(es) => {
+                let mut iter = es.iter();
+                let first = self.convert_poly(meta, iter.next().unwrap());
+                iter.fold(first, |acc, e| acc + self.convert_poly(meta, e))
+            }
+            PolyExpr::Mul(es) => {
+                let mut iter = es.iter();
+                let first = self.convert_poly(meta, iter.next().unwrap());
+                iter.fold(first, |acc, e| acc * self.convert_poly(meta, e))
+            }
+            PolyExpr::Neg(e) => -self.convert_poly(meta, e),
+            PolyExpr::Pow(e, n) => {
+                if *n == 0 {
+                    Expression::Constant(1.field())
+                } else {
+                    let e = self.convert_poly(meta, e);
+                    (1..*n).fold(e.clone(), |acc, _| acc * e.clone())
+                }
+            }
+            PolyExpr::Halo2Expr(e) => e.clone(),
+            PolyExpr::Query((column, rotation, _)) => self.convert_query(meta, column, *rotation),
+        }
+    }
+
+    fn convert_query(
+        &self,
+        meta: &mut VirtualCells<'_, F>,
+        column: &cColumn,
+        rotation: i32,
+    ) -> Expression<F> {
+        match column.ctype {
+            cAdvice | Halo2Advice => {
+                let c = self
+                    .advice_columns
+                    .get(&column.uuid())
+                    .unwrap_or_else(|| panic!("column not found {}", column.annotation));
+
+                meta.query_advice(*c, Rotation(rotation))
+            }
+            cFixed | Halo2Fixed => {
+                let c = self
+                    .fixed_columns
+                    .get(&column.uuid())
+                    .unwrap_or_else(|| panic!("column not found {}", column.annotation));
+
+                meta.query_fixed(*c, Rotation(rotation))
+            }
+        }
+    }
+
+    fn convert_advice_column(&self, column: &cColumn) -> Column<Advice> {
+        match column.ctype {
+            cAdvice | Halo2Advice => *self
+                .advice_columns
+                .get(&column.uuid())
+                .unwrap_or_else(|| panic!("column not found {}", column.annotation)),
+            _ => panic!("worng column type"),
+        }
+    }
+
+    fn convert_fixed_column(&self, column: &cColumn) -> Column<Fixed> {
+        match column.ctype {
+            cFixed | Halo2Fixed => *self
+                .fixed_columns
+                .get(&column.uuid())
+                .unwrap_or_else(|| panic!("column not found {}", column.annotation)),
+            _ => panic!("worng column type"),
+        }
+    }
+}
+
+#[allow(dead_code)]
+// From Plaf Halo2 backend.
+// _Cell is a helper struct used for constructing Halo2 Cell.
+struct _Cell {
+    region_index: RegionIndex,
+    row_offset: usize,
+    column: Column<Any>,
+}
+// From Plaf Halo2 backend.
+fn new_cell(column: Column<Any>, offset: usize) -> Cell {
+    let cell = _Cell {
+        region_index: RegionIndex::from(0),
+        row_offset: offset,
+        column,
+    };
+    // NOTE: We use unsafe here to construct a Cell, which doesn't have a public constructor.  This
+    // helps us set the copy constraints easily (without having to store all assigned cells
+    // previously)
+    unsafe { std::mem::transmute::<_Cell, Cell>(cell) }
+}
+
+pub fn to_halo2_advice<F: Field>(
+    meta: &mut ConstraintSystem<F>,
+    column: &cColumn,
+) -> Column<Advice> {
+    match column.phase {
+        0 => meta.advice_column_in(FirstPhase),
+        1 => meta.advice_column_in(SecondPhase),
+        2 => meta.advice_column_in(ThirdPhase),
+        _ => panic!("jarll wrong phase"),
+    }
+}
+
+#[derive(Clone, Default)]
+pub struct ChiquitoHalo2Circuit<F: Field + From<u64>> {
+    compiled: ChiquitoHalo2<F>,
+    witness: Option<Assignments<F>>,
+}
+
+impl<F: Field + From<u64> + Hash> ChiquitoHalo2Circuit<F> {
+    pub fn new(compiled: ChiquitoHalo2<F>, witness: Option<Assignments<F>>) -> Self {
+        Self { compiled, witness }
+    }
+
+    pub fn instance(&self) -> Vec<Vec<F>> {
+        if !self.compiled.circuit.exposed.is_empty() {
+            if let Some(witness) = &self.witness {
+                return vec![self.compiled.instance(witness)];
+            }
+        }
+        Vec::new()
+    }
+}
+
+impl<F: Field + From<u64> + Hash> h2Circuit<F> for ChiquitoHalo2Circuit<F> {
+    type Config = ChiquitoHalo2<F>;
+
+    type FloorPlanner = SimpleFloorPlanner;
+
+    type Params = ChiquitoHalo2<F>;
+
+    fn without_witnesses(&self) -> Self {
+        Self::default()
+    }
+
+    fn params(&self) -> Self::Params {
+        self.compiled.clone()
+    }
+
+    fn configure_with_params(
+        meta: &mut ConstraintSystem<F>,
+        mut compiled: Self::Params,
+    ) -> Self::Config {
+        compiled.configure(meta);
+
+        compiled
+    }
+
+    fn synthesize(
+        &self,
+        compiled: Self::Config,
+        mut layouter: impl Layouter<F>,
+    ) -> Result<(), Error> {
+        compiled.synthesize(&mut layouter, self.witness.as_ref());
+
+        Ok(())
+    }
+
+    fn configure(_: &mut ConstraintSystem<F>) -> Self::Config {
+        unreachable!()
+    }
+}
+
+#[derive(Debug, Default)]
+pub struct ChiquitoHalo2SuperCircuit<F: Field + From<u64>> {
+    sub_circuits: Vec<ChiquitoHalo2<F>>,
+    witness: SuperAssignments<F>,
+}
+
+impl<F: Field + From<u64> + Hash> ChiquitoHalo2SuperCircuit<F> {
+    pub fn new(sub_circuits: Vec<ChiquitoHalo2<F>>, witness: SuperAssignments<F>) -> Self {
+        Self {
+            sub_circuits,
+            witness,
+        }
+    }
+
+    pub fn instance(&self) -> Vec<Vec<F>> {
+        let mut result = Vec::new();
+
+        for sub_circuit in &self.sub_circuits {
+            if !sub_circuit.circuit.exposed.is_empty() {
+                let instance_values = sub_circuit.instance(
+                    self.witness
+                        .get(&sub_circuit.ir_id)
+                        .expect("No matching witness found for given UUID."),
+                );
+                result.push(instance_values);
+            }
+        }
+
+        result
+    }
+}
+
+impl<F: Field + From<u64> + Hash> h2Circuit<F> for ChiquitoHalo2SuperCircuit<F> {
+    type Config = Vec<ChiquitoHalo2<F>>;
+
+    type FloorPlanner = SimpleFloorPlanner;
+
+    type Params = Vec<ChiquitoHalo2<F>>;
+
+    fn without_witnesses(&self) -> Self {
+        Self::default()
+    }
+
+    fn params(&self) -> Self::Params {
+        self.sub_circuits.clone()
+    }
+
+    fn configure_with_params(
+        meta: &mut ConstraintSystem<F>,
+        mut sub_circuits: Self::Params,
+    ) -> Self::Config {
+        sub_circuits
+            .iter_mut()
+            .for_each(|c| c.configure_columns_sub_circuit(meta));
+
+        let advice_columns: HashMap<UUID, Column<Advice>> =
+            sub_circuits.iter().fold(HashMap::default(), |mut acc, s| {
+                acc.extend(s.advice_columns.clone());
+                acc
+            });
+        let fixed_columns: HashMap<UUID, Column<Fixed>> =
+            sub_circuits.iter().fold(HashMap::default(), |mut acc, s| {
+                acc.extend(s.fixed_columns.clone());
+                acc
+            });
+
+        sub_circuits.iter_mut().for_each(|sub_circuit| {
+            sub_circuit.advice_columns = advice_columns.clone();
+            sub_circuit.fixed_columns = fixed_columns.clone();
+            sub_circuit.configure_sub_circuit(meta)
+        });
+
+        sub_circuits
+    }
+
+    fn synthesize(
+        &self,
+        sub_circuits: Self::Config,
+        mut layouter: impl Layouter<F>,
+    ) -> Result<(), Error> {
+        for sub_circuit in sub_circuits {
+            sub_circuit.synthesize(&mut layouter, self.witness.get(&sub_circuit.ir_id))
+        }
+
+        Ok(())
+    }
+
+    fn configure(_: &mut ConstraintSystem<F>) -> Self::Config {
+        unreachable!()
+    }
+}
+
\ No newline at end of file diff --git a/docs/apidocs/src/chiquito/plonkish/backend/mod.rs.html b/docs/apidocs/src/chiquito/plonkish/backend/mod.rs.html new file mode 100644 index 00000000..144b7770 --- /dev/null +++ b/docs/apidocs/src/chiquito/plonkish/backend/mod.rs.html @@ -0,0 +1,5 @@ +mod.rs - source
1
+2
+
pub mod halo2;
+pub mod plaf;
+
\ No newline at end of file diff --git a/docs/apidocs/src/chiquito/plonkish/backend/plaf.rs.html b/docs/apidocs/src/chiquito/plonkish/backend/plaf.rs.html new file mode 100644 index 00000000..0329bd07 --- /dev/null +++ b/docs/apidocs/src/chiquito/plonkish/backend/plaf.rs.html @@ -0,0 +1,653 @@ +plaf.rs - source
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+
use std::{collections::HashMap, hash::Hash};
+
+use halo2_proofs::halo2curves::ff::PrimeField;
+
+use crate::{
+    plonkish::ir::{
+        assignments::Assignments,
+        Circuit as cCircuit, Column as cColumn,
+        ColumnType::{Advice as cAdvice, Fixed as cFixed, Halo2Advice, Halo2Fixed},
+        PolyExpr as cPolyExpr,
+    },
+    util::UUID,
+};
+
+use num_bigint::BigUint;
+use polyexen::{
+    expr::{get_field_p, Column as pColumn, ColumnKind, ColumnQuery, Expr as pExpr, PlonkVar},
+    plaf::{
+        ColumnFixed, ColumnPublic, ColumnWitness, CopyC as pCopyC, Lookup as pLookup, Plaf,
+        Poly as pPoly, Witness as pWitness,
+    },
+};
+
+#[allow(non_snake_case)]
+pub fn chiquito2Plaf<F: PrimeField<Repr = [u8; 32]>>(
+    circuit: cCircuit<F>,
+    k: u32,
+    debug: bool,
+) -> (Plaf, ChiquitoPlafWitGen) {
+    let mut chiquito_plaf = ChiquitoPlaf::new(circuit, debug);
+    let plaf = chiquito_plaf.get_plaf(k);
+    let empty_witness = plaf.gen_empty_witness();
+    let wit_gen =
+        ChiquitoPlafWitGen::new(empty_witness, chiquito_plaf.c_column_id_to_p_column_index);
+
+    (plaf, wit_gen)
+}
+
+#[derive(Clone, Debug)]
+pub struct ChiquitoPlaf<F: PrimeField> {
+    debug: bool,
+    circuit: cCircuit<F>,
+    // Chiquito column id doesn't start from zero.
+    // Plaf column index starts from 0 for each column type (advice, fixed, and instance).
+    // Therefore a mapping is needed to convert chiquito column id to plaf index.
+    c_column_id_to_p_column_index: HashMap<UUID, usize>,
+}
+
+impl<F: PrimeField<Repr = [u8; 32]>> ChiquitoPlaf<F> {
+    pub fn new(circuit: cCircuit<F>, debug: bool) -> ChiquitoPlaf<F> {
+        ChiquitoPlaf {
+            debug,
+            circuit,
+            c_column_id_to_p_column_index: HashMap::new(),
+        }
+    }
+
+    pub fn get_plaf(&mut self, k: u32) -> Plaf {
+        let mut plaf = Plaf::default();
+        let p = get_field_p::<F>();
+        plaf.info.p = p;
+
+        plaf.info.num_rows = 2usize.pow(k);
+
+        let mut c_column_id_to_p_column_index = HashMap::<UUID, usize>::new();
+        let mut advice_index = 0;
+        let mut fixed_index = 0;
+
+        for column in self.circuit.columns.iter() {
+            if self.debug {
+                println!("annotation: {}, id: {}", column.annotation, column.id);
+            }
+            self.convert_and_push_plaf_column(
+                column,
+                &mut plaf,
+                &mut c_column_id_to_p_column_index,
+                &mut advice_index,
+                &mut fixed_index,
+            );
+            if self.debug {
+                println!("MAP {:#?}", c_column_id_to_p_column_index);
+            }
+        }
+
+        self.c_column_id_to_p_column_index = c_column_id_to_p_column_index;
+
+        for c_poly in &mut self.circuit.polys.iter() {
+            let plaf_poly = pPoly {
+                name: c_poly.annotation.clone(),
+                exp: self.convert_plaf_poly(&c_poly.expr),
+            };
+            plaf.polys.push(plaf_poly);
+        }
+
+        for lookup in self.circuit.lookups.iter() {
+            let exps = lookup.exprs.clone().into_iter().fold(
+                (Vec::default(), Vec::default()),
+                |mut result, tuple| {
+                    result.0.push(self.convert_plaf_poly(&tuple.0));
+                    result.1.push(self.convert_plaf_poly(&tuple.1));
+                    result
+                },
+            );
+
+            let plaf_lookup = pLookup {
+                name: lookup.annotation.clone(),
+                exps,
+            };
+
+            plaf.lookups.push(plaf_lookup);
+        }
+
+        // Fixed
+        let mut fixed: Vec<Vec<Option<BigUint>>> = Vec::with_capacity(plaf.columns.fixed.len());
+        for _i in 0..plaf.columns.fixed.len() {
+            fixed.push(vec![None; plaf.info.num_rows]);
+        }
+
+        for (column, values) in self.circuit.fixed_assignments.clone().0.into_iter() {
+            let column = self
+                .c_column_id_to_p_column_index
+                .get(&column.uuid())
+                .expect("plaf column not found for fixed signal");
+
+            for (offset, value) in values.iter().enumerate() {
+                // region.assign_fixed(|| "", *column, offset, || Value::known(value.clone()));
+                fixed[*column][offset] = Some(BigUint::from_bytes_le(&value.to_repr()));
+            }
+        }
+        plaf.fixed = fixed;
+
+        if !self.circuit.exposed.is_empty() {
+            // Public column not pulled from Chiquito ir, because it's not stored anywhere.
+            // Therefore, we create a Plaf public column from scratch.
+            let plaf_public = ColumnPublic::new(String::from(
+                "exposed forward signal values in first step instance",
+            ));
+            plaf.columns.public.push(plaf_public);
+        }
+
+        for (index, (c_column, rotation)) in self.circuit.exposed.iter().enumerate() {
+            let public_column = pColumn {
+                kind: ColumnKind::Public,
+                index: 0, // Chiquito only has one public column, so the index is always 0.
+            };
+
+            let witness_index = self
+                .c_column_id_to_p_column_index
+                .get(&c_column.uuid())
+                .unwrap();
+
+            let witness_column = pColumn {
+                kind: ColumnKind::Witness,
+                index: *witness_index,
+            };
+
+            let copy = pCopyC {
+                columns: (public_column, witness_column),
+                offsets: vec![(index, *rotation as usize)],
+            };
+
+            plaf.copys.push(copy);
+        }
+
+        plaf
+    }
+
+    fn convert_and_push_plaf_column(
+        &self,
+        column: &cColumn,
+        plaf: &mut Plaf,
+        c_column_id_to_p_column_index: &mut HashMap<UUID, usize>,
+        advice_index: &mut usize,
+        fixed_index: &mut usize,
+    ) {
+        match column.ctype {
+            cAdvice => {
+                let plaf_witness = ColumnWitness::new(column.annotation.clone(), column.phase);
+                self.add_id_index_mapping(column, c_column_id_to_p_column_index, advice_index);
+                plaf.columns.witness.push(plaf_witness);
+            }
+            cFixed => {
+                let plaf_fixed = ColumnFixed::new(column.annotation.clone());
+                self.add_id_index_mapping(column, c_column_id_to_p_column_index, fixed_index);
+                plaf.columns.fixed.push(plaf_fixed);
+            }
+            Halo2Advice => {
+                panic!("Imported Halo2Advice is not supported");
+            }
+            Halo2Fixed => {
+                panic!("Imported Halo2Fixed is not supported");
+            }
+        }
+    }
+
+    fn convert_plaf_poly(&self, chiquito_poly: &cPolyExpr<F>) -> pExpr<PlonkVar> {
+        match chiquito_poly {
+            cPolyExpr::Const(c) => pExpr::Const(BigUint::from_bytes_le(&c.to_repr())),
+            cPolyExpr::Sum(es) => {
+                let mut iter = es.iter();
+                let first = self.convert_plaf_poly(iter.next().unwrap());
+                iter.fold(first, |acc, e| acc + self.convert_plaf_poly(e))
+            }
+            cPolyExpr::Mul(es) => {
+                let mut iter = es.iter();
+                let first = self.convert_plaf_poly(iter.next().unwrap());
+                iter.fold(first, |acc, e| acc * self.convert_plaf_poly(e))
+            }
+            cPolyExpr::Neg(e) => -self.convert_plaf_poly(e),
+            cPolyExpr::Pow(e, n) => {
+                if *n == 0 {
+                    pExpr::Const(BigUint::from(1u32))
+                } else {
+                    let e = self.convert_plaf_poly(e);
+                    (1..*n).fold(e.clone(), |acc, _| acc * e.clone())
+                }
+            }
+            cPolyExpr::Halo2Expr(e) => pExpr::from(e),
+            cPolyExpr::Query((column, rotation, annotation)) => {
+                let index = self
+                    .c_column_id_to_p_column_index
+                    .get(&column.uuid())
+                    .unwrap();
+                if self.debug {
+                    println!(
+                        "GET c column id {} match p column index {}",
+                        column.uuid(),
+                        index
+                    );
+                    println!("MAP {:#?}", self.c_column_id_to_p_column_index);
+                }
+                pExpr::Var(PlonkVar::Query(
+                    self.convert_plaf_query(column, rotation, annotation, *index),
+                ))
+            }
+        }
+    }
+
+    fn add_id_index_mapping(
+        &self,
+        column: &cColumn,
+        c_column_id_to_p_column_index: &mut HashMap<UUID, usize>,
+        counter: &mut usize,
+    ) {
+        c_column_id_to_p_column_index.insert(column.uuid(), *counter);
+        if self.debug {
+            println!(
+                "c column id {} match p column index {}",
+                column.uuid(),
+                counter
+            );
+        }
+        *counter += 1;
+    }
+
+    fn convert_plaf_query(
+        &self,
+        column: &cColumn,
+        rotation: &i32,
+        _annotation: &str,
+        index: usize, // Plaf index starts from 0 for each column type.
+    ) -> ColumnQuery {
+        match column.ctype {
+            cAdvice => ColumnQuery {
+                column: pColumn {
+                    kind: ColumnKind::Witness,
+                    index,
+                },
+                rotation: *rotation,
+            },
+            cFixed => ColumnQuery {
+                column: pColumn {
+                    kind: ColumnKind::Fixed,
+                    index,
+                },
+                rotation: *rotation,
+            },
+            Halo2Advice | Halo2Fixed => {
+                panic!("Imported Halo2Advice and Halo2Fixed are not supported")
+            }
+        }
+    }
+}
+
+pub struct ChiquitoPlafWitGen {
+    empty_witness: pWitness,
+    c_column_id_to_p_column_index: HashMap<UUID, usize>,
+}
+
+impl ChiquitoPlafWitGen {
+    fn new(empty_witness: pWitness, c_column_id_to_p_column_index: HashMap<UUID, usize>) -> Self {
+        Self {
+            empty_witness,
+            c_column_id_to_p_column_index,
+        }
+    }
+
+    pub fn generate<F: PrimeField<Repr = [u8; 32]> + Hash>(
+        &self,
+        witness: Option<Assignments<F>>,
+    ) -> pWitness {
+        let mut plaf_witness = pWitness {
+            num_rows: self.empty_witness.num_rows,
+            columns: self.empty_witness.columns.clone(),
+            witness: self.empty_witness.witness.clone(),
+        };
+
+        if let Some(witness) = &witness {
+            for (column, assignments) in witness.iter() {
+                let p_column_index = self
+                    .c_column_id_to_p_column_index
+                    .get(&column.uuid())
+                    .unwrap_or_else(|| panic!("plaf column not found for column {:?}", column));
+
+                for (offset, value) in assignments.iter().enumerate() {
+                    plaf_witness.witness[*p_column_index][offset] =
+                        Some(BigUint::from_bytes_le(&value.to_repr()));
+                }
+            }
+
+            plaf_witness
+        } else {
+            plaf_witness
+        }
+    }
+}
+
\ No newline at end of file diff --git a/docs/apidocs/src/chiquito/plonkish/compiler/cell_manager.rs.html b/docs/apidocs/src/chiquito/plonkish/compiler/cell_manager.rs.html new file mode 100644 index 00000000..9236ea9d --- /dev/null +++ b/docs/apidocs/src/chiquito/plonkish/compiler/cell_manager.rs.html @@ -0,0 +1,1037 @@ +cell_manager.rs - source
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+465
+466
+467
+468
+469
+470
+471
+472
+473
+474
+475
+476
+477
+478
+479
+480
+481
+482
+483
+484
+485
+486
+487
+488
+489
+490
+491
+492
+493
+494
+495
+496
+497
+498
+499
+500
+501
+502
+503
+504
+505
+506
+507
+508
+509
+510
+511
+512
+513
+514
+515
+516
+517
+518
+
use std::{collections::HashMap, fmt::Debug};
+
+use crate::ast::{FixedSignal, ForwardSignal, InternalSignal, SharedSignal, StepTypeUUID};
+
+use super::{Column, CompilationUnit};
+
+#[derive(Clone, Debug)]
+pub struct SignalPlacement {
+    pub column: Column,
+    pub rotation: i32,
+}
+
+impl SignalPlacement {
+    pub fn new(column: Column, rotation: i32) -> Self {
+        Self { column, rotation }
+    }
+}
+
+impl From<(Column, i32)> for SignalPlacement {
+    fn from((column, rotation): (Column, i32)) -> Self {
+        SignalPlacement::new(column, rotation)
+    }
+}
+
+impl From<SignalPlacement> for (Column, i32) {
+    fn from(placement: SignalPlacement) -> Self {
+        (placement.column, placement.rotation)
+    }
+}
+
+#[derive(Debug, Clone)]
+pub struct StepPlacement {
+    height: u32,
+    signals: HashMap<InternalSignal, SignalPlacement>,
+}
+
+#[derive(Debug, Clone, Default)]
+pub struct Placement {
+    pub forward: HashMap<ForwardSignal, SignalPlacement>,
+    pub shared: HashMap<SharedSignal, SignalPlacement>,
+    pub fixed: HashMap<FixedSignal, SignalPlacement>,
+    pub steps: HashMap<StepTypeUUID, StepPlacement>,
+    pub columns: Vec<Column>,
+
+    pub base_height: u32,
+}
+
+impl Placement {
+    pub fn get_forward_placement(&self, forward: &ForwardSignal) -> Option<SignalPlacement> {
+        self.forward.get(forward).cloned()
+    }
+
+    pub fn get_shared_placement(&self, shared: &SharedSignal) -> Option<SignalPlacement> {
+        self.shared.get(shared).cloned()
+    }
+
+    pub fn get_fixed_placement(&self, fixed: &FixedSignal) -> Option<SignalPlacement> {
+        self.fixed.get(fixed).cloned()
+    }
+
+    pub fn find_internal_signal_placement(
+        &self,
+        step_uuid: StepTypeUUID,
+        signal: &InternalSignal,
+    ) -> SignalPlacement {
+        self.steps
+            .get(&step_uuid)
+            .expect("step not found")
+            .signals
+            .get(signal)
+            .expect("signal not found")
+            .clone()
+    }
+
+    pub fn step_height(&self, step_uuid: StepTypeUUID) -> u32 {
+        self.steps.get(&step_uuid).expect("step not found").height
+    }
+
+    pub fn first_step_height(&self) -> u32 {
+        if let Some(step) = self.steps.values().next() {
+            step.height
+        } else {
+            self.base_height
+        }
+    }
+
+    // Returns true iff all steps have the same height.
+    pub fn same_height(&self) -> bool {
+        if self.steps.is_empty() {
+            return true;
+        }
+
+        let first = self.steps.values().next().unwrap().height;
+
+        self.steps.values().all(|step| step.height == first)
+    }
+}
+
+pub trait CellManager: Clone {
+    fn place<F>(&self, unit: &mut CompilationUnit<F>);
+}
+
+#[derive(Debug, Default, Clone)]
+pub struct SingleRowCellManager {}
+
+impl CellManager for SingleRowCellManager {
+    fn place<F>(&self, unit: &mut CompilationUnit<F>) {
+        let mut placement = Placement {
+            forward: HashMap::new(),
+            shared: HashMap::new(),
+            fixed: HashMap::new(),
+            steps: HashMap::new(),
+            columns: Vec::new(),
+            base_height: 1,
+        };
+
+        let mut forward_signals: u32 = 0;
+
+        for forward_signal in unit.forward_signals.iter() {
+            let column = if let Some(annotation) = unit.annotations.get(&forward_signal.uuid()) {
+                Column::advice(
+                    format!("srcm forward {}", annotation),
+                    forward_signal.phase(),
+                )
+            } else {
+                Column::advice("srcm forward", forward_signal.phase())
+            };
+
+            placement.columns.push(column.clone());
+
+            placement.forward.insert(
+                *forward_signal,
+                SignalPlacement {
+                    column,
+                    rotation: 0,
+                },
+            );
+
+            forward_signals += 1;
+        }
+
+        let mut shared_signals: u32 = 0;
+
+        for shared_signal in unit.shared_signals.iter() {
+            let column = if let Some(annotation) = unit.annotations.get(&shared_signal.uuid()) {
+                Column::advice(format!("srcm shared {}", annotation), shared_signal.phase())
+            } else {
+                Column::advice("srcm shared", shared_signal.phase())
+            };
+
+            placement.columns.push(column.clone());
+
+            placement.shared.insert(
+                *shared_signal,
+                SignalPlacement {
+                    column,
+                    rotation: 0,
+                },
+            );
+
+            shared_signals += 1;
+        }
+
+        let mut fixed_signals: u32 = 0;
+
+        for fixed_signal in unit.fixed_signals.iter() {
+            let column = if let Some(annotation) = unit.annotations.get(&fixed_signal.uuid()) {
+                Column::fixed(format!("srcm fixed {}", annotation))
+            } else {
+                Column::fixed("srcm fixed")
+            };
+
+            placement.columns.push(column.clone());
+
+            placement.fixed.insert(
+                *fixed_signal,
+                SignalPlacement {
+                    column,
+                    rotation: 0,
+                },
+            );
+
+            fixed_signals += 1;
+        }
+
+        let mut max_internal_width: u32 = 0;
+
+        for step in unit.step_types.values() {
+            let mut internal_signals: u32 = 0;
+
+            let mut step_placement = StepPlacement {
+                height: 1, // This cellmanager always have SuperRows with height 1
+                signals: HashMap::new(),
+            };
+
+            for signal in step.signals.iter() {
+                let column_pos =
+                    forward_signals + shared_signals + fixed_signals + internal_signals;
+                let column = if placement.columns.len() <= column_pos as usize {
+                    let column = if let Some(annotation) = unit.annotations.get(&signal.uuid()) {
+                        Column::advice(format!("srcm internal signal {}", annotation), 0)
+                    } else {
+                        Column::advice("srcm internal signal", 0)
+                    };
+
+                    placement.columns.push(column.clone());
+                    column
+                } else {
+                    placement.columns[column_pos as usize].clone()
+                };
+
+                step_placement.signals.insert(
+                    *signal,
+                    SignalPlacement {
+                        column,
+                        rotation: 0,
+                    },
+                );
+
+                internal_signals += 1;
+            }
+
+            placement.steps.insert(step.uuid(), step_placement);
+            max_internal_width = max_internal_width.max(internal_signals);
+        }
+
+        unit.columns.extend_from_slice(&placement.columns);
+        unit.placement = placement;
+    }
+}
+
+#[derive(Debug, Default, Clone)]
+pub struct MaxWidthCellManager {
+    max_width: usize,
+    same_height: bool,
+}
+
+impl MaxWidthCellManager {
+    pub fn new(max_width: usize, same_height: bool) -> Self {
+        Self {
+            max_width,
+            same_height,
+        }
+    }
+}
+
+impl CellManager for MaxWidthCellManager {
+    fn place<F>(&self, unit: &mut CompilationUnit<F>) {
+        if (!unit.shared_signals.is_empty() || !unit.fixed_signals.is_empty()) && !self.same_height
+        {
+            panic!("Shared signals and fixed signals are not supported for MaxWidthCellManager, which might return steps with variable heights.");
+        }
+
+        let mut placement = Placement {
+            forward: HashMap::new(),
+            shared: HashMap::new(),
+            fixed: HashMap::new(),
+            steps: HashMap::new(),
+            columns: Vec::new(),
+            base_height: 0,
+        };
+
+        let mut forward_signal_column: usize = 0;
+        let mut forward_signal_row: usize = 0;
+
+        for forward_signal in unit.forward_signals.iter() {
+            let column = if placement.columns.len() <= forward_signal_column {
+                let column = if let Some(annotation) = unit.annotations.get(&forward_signal.uuid())
+                {
+                    Column::advice(format!("mwcm forward signal {}", annotation), 0)
+                } else {
+                    Column::advice("mwcm forward signal", 0)
+                };
+
+                placement.columns.push(column.clone());
+                column
+            } else {
+                placement.columns[forward_signal_column].clone()
+            };
+
+            placement.forward.insert(
+                *forward_signal,
+                SignalPlacement {
+                    column,
+                    rotation: forward_signal_row as i32,
+                },
+            );
+
+            forward_signal_column += 1;
+            if forward_signal_column >= self.max_width {
+                forward_signal_column = 0;
+                forward_signal_row += 1;
+            }
+        }
+
+        placement.base_height = if forward_signal_column != 0 {
+            forward_signal_row + 1
+        } else {
+            forward_signal_row
+        } as u32;
+
+        for step in unit.step_types.values() {
+            let mut step_placement = StepPlacement {
+                height: if forward_signal_column > 0 {
+                    (forward_signal_row + 1) as u32
+                } else {
+                    forward_signal_row as u32
+                },
+                signals: HashMap::new(),
+            };
+
+            let mut internal_signal_column = forward_signal_column;
+            let mut internal_signal_row = forward_signal_row;
+
+            for signal in step.signals.iter() {
+                let column = if placement.columns.len() <= internal_signal_column {
+                    let column = if let Some(annotation) = unit.annotations.get(&signal.uuid()) {
+                        Column::advice(format!("mwcm internal signal {}", annotation), 0)
+                    } else {
+                        Column::advice("mwcm internal signal", 0)
+                    };
+
+                    placement.columns.push(column.clone());
+                    column
+                } else {
+                    placement.columns[internal_signal_column].clone()
+                };
+
+                step_placement.signals.insert(
+                    *signal,
+                    SignalPlacement {
+                        column,
+                        rotation: internal_signal_row as i32,
+                    },
+                );
+
+                step_placement.height = (internal_signal_row + 1) as u32;
+
+                internal_signal_column += 1;
+                if internal_signal_column >= self.max_width {
+                    internal_signal_column = 0;
+                    internal_signal_row += 1;
+                }
+            }
+
+            placement.steps.insert(step.uuid(), step_placement);
+        }
+
+        if self.same_height {
+            let height = placement
+                .steps
+                .values()
+                .map(|step| step.height)
+                .max()
+                .unwrap_or(0);
+
+            placement
+                .steps
+                .iter_mut()
+                .for_each(|(_, step)| step.height = height);
+        }
+
+        unit.columns.extend_from_slice(&placement.columns);
+        unit.placement = placement;
+    }
+}
+
+#[cfg(test)]
+mod tests {
+    use std::rc::Rc;
+
+    use crate::{
+        ast::{ForwardSignal, StepType},
+        plonkish::compiler::CompilationUnit,
+    };
+
+    use super::{CellManager, MaxWidthCellManager};
+
+    #[test]
+    fn test_max_width_cm_2_columns() {
+        let mut unit = CompilationUnit::<()> {
+            forward_signals: vec![
+                ForwardSignal::new_with_phase(0, "a".to_string()),
+                ForwardSignal::new_with_phase(0, "a".to_string()),
+            ],
+            ..Default::default()
+        };
+
+        let mut step1 = StepType::new(1500, "step1".to_string());
+        step1.add_signal("c1");
+        step1.add_signal("d");
+        step1.add_signal("e");
+        let mut step2 = StepType::new(1501, "step2".to_string());
+        step2.add_signal("c2");
+
+        let step1 = Rc::new(step1);
+        let step2 = Rc::new(step2);
+
+        unit.step_types.insert(1500, Rc::clone(&step1));
+        unit.step_types.insert(1501, Rc::clone(&step2));
+
+        // forward signals: a, b; step1 internal: c1, d, e; step2 internal c2
+
+        let cm = MaxWidthCellManager {
+            max_width: 2,
+            same_height: false,
+        };
+
+        cm.place(&mut unit);
+
+        assert_eq!(unit.placement.columns.len(), 2);
+        assert_eq!(unit.placement.forward.len(), 2);
+        assert_eq!(
+            unit.placement
+                .steps
+                .get(&step1.uuid())
+                .expect("should be there")
+                .height,
+            3
+        );
+        assert_eq!(
+            unit.placement
+                .steps
+                .get(&step1.uuid())
+                .expect("should be there")
+                .signals
+                .len(),
+            3
+        );
+        assert_eq!(
+            unit.placement
+                .steps
+                .get(&step2.uuid())
+                .expect("should be there")
+                .height,
+            2
+        );
+        assert_eq!(
+            unit.placement
+                .steps
+                .get(&step2.uuid())
+                .expect("should be there")
+                .signals
+                .len(),
+            1
+        );
+    }
+
+    #[test]
+    fn test_max_width_cm_2_columns_same_height() {
+        let mut unit = CompilationUnit::<()> {
+            forward_signals: vec![
+                ForwardSignal::new_with_phase(0, "a".to_string()),
+                ForwardSignal::new_with_phase(0, "a".to_string()),
+            ],
+            ..Default::default()
+        };
+
+        let mut step1 = StepType::new(1500, "step1".to_string());
+        step1.add_signal("c1");
+        step1.add_signal("d");
+        step1.add_signal("e");
+        let mut step2 = StepType::new(1501, "step2".to_string());
+        step2.add_signal("c2");
+
+        let step1 = Rc::new(step1);
+        let step2 = Rc::new(step2);
+
+        unit.step_types.insert(1500, Rc::clone(&step1));
+        unit.step_types.insert(1501, Rc::clone(&step2));
+
+        // forward signals: a, b; step1 internal: c1, d, e; step2 internal c2
+
+        let cm = MaxWidthCellManager {
+            max_width: 2,
+            same_height: true,
+        };
+
+        cm.place(&mut unit);
+
+        assert_eq!(unit.placement.columns.len(), 2);
+        assert_eq!(unit.placement.forward.len(), 2);
+        assert_eq!(
+            unit.placement
+                .steps
+                .get(&step1.uuid())
+                .expect("should be there")
+                .height,
+            3
+        );
+        assert_eq!(
+            unit.placement
+                .steps
+                .get(&step1.uuid())
+                .expect("should be there")
+                .signals
+                .len(),
+            3
+        );
+        assert_eq!(
+            unit.placement
+                .steps
+                .get(&step2.uuid())
+                .expect("should be there")
+                .height,
+            3 // it is 3 to be the same height, but one row is unused
+        );
+        assert_eq!(
+            unit.placement
+                .steps
+                .get(&step2.uuid())
+                .expect("should be there")
+                .signals
+                .len(),
+            1
+        );
+    }
+}
+
\ No newline at end of file diff --git a/docs/apidocs/src/chiquito/plonkish/compiler/mod.rs.html b/docs/apidocs/src/chiquito/plonkish/compiler/mod.rs.html new file mode 100644 index 00000000..186a9dd8 --- /dev/null +++ b/docs/apidocs/src/chiquito/plonkish/compiler/mod.rs.html @@ -0,0 +1,1117 @@ +mod.rs - source
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+465
+466
+467
+468
+469
+470
+471
+472
+473
+474
+475
+476
+477
+478
+479
+480
+481
+482
+483
+484
+485
+486
+487
+488
+489
+490
+491
+492
+493
+494
+495
+496
+497
+498
+499
+500
+501
+502
+503
+504
+505
+506
+507
+508
+509
+510
+511
+512
+513
+514
+515
+516
+517
+518
+519
+520
+521
+522
+523
+524
+525
+526
+527
+528
+529
+530
+531
+532
+533
+534
+535
+536
+537
+538
+539
+540
+541
+542
+543
+544
+545
+546
+547
+548
+549
+550
+551
+552
+553
+554
+555
+556
+557
+558
+
use crate::{
+    ast::{query::Queriable, ASTExpr, Circuit as astCircuit, ExposeOffset, StepType, StepTypeUUID},
+    field::Field,
+    plonkish::ir::{
+        assignments::{AssignmentGenerator, Assignments},
+        Circuit, Column, Poly, PolyExpr, PolyLookup,
+    },
+    poly::Expr,
+    wit_gen::{AutoTraceGenerator, FixedAssignment, TraceGenerator},
+};
+use std::{hash::Hash, rc::Rc};
+
+use cell_manager::{CellManager, SignalPlacement};
+use step_selector::StepSelectorBuilder;
+
+use unit::CompilationUnit;
+
+pub mod cell_manager;
+pub mod step_selector;
+pub(crate) mod unit;
+
+#[derive(Clone)]
+pub struct CompilerConfig<CM: CellManager, SSB: StepSelectorBuilder> {
+    cell_manager: CM,
+    step_selector_builder: SSB,
+}
+
+pub fn config<CM: CellManager, SSB: StepSelectorBuilder>(
+    cell_manager: CM,
+    step_selector_builder: SSB,
+) -> CompilerConfig<CM, SSB> {
+    CompilerConfig {
+        cell_manager,
+        step_selector_builder,
+    }
+}
+
+pub fn compile<F: Field + Hash + Clone, CM: CellManager, SSB: StepSelectorBuilder, TraceArgs>(
+    config: CompilerConfig<CM, SSB>,
+    ast: &astCircuit<F, TraceArgs>,
+) -> (Circuit<F>, Option<AssignmentGenerator<F, TraceArgs>>) {
+    let (mut unit, assignment) = compile_phase1(config, ast);
+
+    compile_phase2(&mut unit);
+
+    (unit.into(), assignment)
+}
+
+pub fn compile_phase1<
+    F: Field + Hash + Clone,
+    CM: CellManager,
+    SSB: StepSelectorBuilder,
+    TraceArgs,
+>(
+    config: CompilerConfig<CM, SSB>,
+    ast: &astCircuit<F, TraceArgs>,
+) -> (
+    CompilationUnit<F>,
+    Option<AssignmentGenerator<F, TraceArgs>>,
+) {
+    let mut unit = CompilationUnit::from(ast);
+
+    add_halo2_columns(&mut unit, ast);
+
+    config.cell_manager.place(&mut unit);
+
+    if (!unit.shared_signals.is_empty() || !unit.fixed_signals.is_empty())
+        && !unit.placement.same_height()
+    {
+        panic!("Shared signals and fixed signals are not supported for circuits with different step heights. Using a different cell manager might fix this problem.");
+    }
+
+    if !unit.placement.same_height() {
+        panic!("Cannot calculate the number of rows");
+    }
+    unit.num_rows = unit.num_steps * (unit.placement.first_step_height() as usize);
+
+    compile_fixed(ast, &mut unit);
+
+    compile_exposed(ast, &mut unit);
+
+    add_default_columns(&mut unit);
+
+    config.step_selector_builder.build::<F>(&mut unit);
+
+    let assignment = ast.trace.as_ref().map(|v| {
+        AssignmentGenerator::new(
+            unit.columns.clone(),
+            unit.placement.clone(),
+            unit.selector.clone(),
+            TraceGenerator::new(Rc::clone(v), ast.num_steps),
+            AutoTraceGenerator::from(ast),
+            unit.num_rows,
+            unit.uuid,
+        )
+    });
+
+    (unit, assignment)
+}
+
+pub fn compile_phase2<F: Field + Clone>(unit: &mut CompilationUnit<F>) {
+    for step in unit.step_types.clone().values() {
+        compile_step(unit, step);
+    }
+
+    if let Some(q_enable) = &unit.q_enable {
+        add_q_enable(unit, q_enable.clone());
+    }
+
+    if let Some((step_type, q_first)) = &unit.first_step {
+        add_q_first(unit, *step_type, q_first.clone());
+    }
+
+    if let Some((step_type, q_last)) = &unit.last_step {
+        add_q_last(unit, *step_type, q_last.clone());
+    }
+}
+
+fn compile_step<F: Field>(unit: &mut CompilationUnit<F>, step: &StepType<F>) {
+    let step_annotation = unit
+        .annotations
+        .get(&step.uuid())
+        .unwrap_or(&"??".to_string())
+        .to_owned();
+
+    for constr in step.constraints.iter() {
+        let constraint = transform_expr(unit, step, &constr.expr.clone());
+        let poly = unit.selector.select(step.uuid(), &constraint);
+
+        unit.polys.push(Poly {
+            expr: poly,
+            annotation: format!(
+                "{}::{} => {:?}",
+                step_annotation.clone(),
+                constr.annotation.clone(),
+                constr.expr
+            ),
+        })
+    }
+
+    // TODO only transition_constraints should have rotations
+    for constr in step.transition_constraints.iter() {
+        let constraint = transform_expr(unit, step, &constr.expr.clone());
+        let poly = unit.selector.select(step.uuid(), &constraint);
+        let poly = add_q_last_to_constraint(unit, poly);
+
+        unit.polys.push(Poly {
+            expr: poly,
+            annotation: format!(
+                "{}::{} => {:?}",
+                step_annotation.clone(),
+                constr.annotation.clone(),
+                constr.expr
+            ),
+        })
+    }
+
+    for lookup in step.lookups.iter() {
+        let poly_lookup = PolyLookup {
+            annotation: lookup.annotation.clone(),
+            exprs: lookup
+                .exprs
+                .iter()
+                .map(|(src, dest)| {
+                    let src_poly = transform_expr(unit, step, &src.expr);
+                    let dest_poly = transform_expr(unit, step, dest);
+                    let src_selected = unit.selector.select(step.uuid(), &src_poly);
+
+                    (src_selected, dest_poly)
+                })
+                .collect(),
+        };
+
+        unit.lookups.push(poly_lookup);
+    }
+}
+
+fn compile_exposed<F, TraceArgs>(ast: &astCircuit<F, TraceArgs>, unit: &mut CompilationUnit<F>) {
+    for (queriable, offset) in &ast.exposed {
+        let exposed = match queriable {
+            Queriable::Forward(forward_signal, _) => {
+                let placement = unit
+                    .placement
+                    .get_forward_placement(forward_signal)
+                    .expect("forward placement not found");
+                match offset {
+                    ExposeOffset::First => (placement.column, placement.rotation),
+                    ExposeOffset::Last => {
+                        let rot = placement.rotation
+                            + ((unit.num_steps - 1) as i32)
+                                * (unit.placement.first_step_height() as i32);
+                        (placement.column, rot)
+                    }
+                    ExposeOffset::Step(step) => {
+                        let rot = placement.rotation
+                            + (*step as i32) * (unit.placement.first_step_height() as i32);
+                        (placement.column, rot)
+                    }
+                }
+            }
+            Queriable::Shared(shared_signal, _) => {
+                let placement = unit
+                    .placement
+                    .get_shared_placement(shared_signal)
+                    .expect("shared placement not found");
+                match offset {
+                    ExposeOffset::First => (placement.column, placement.rotation),
+                    ExposeOffset::Last => {
+                        let rot = placement.rotation
+                            + ((unit.num_steps - 1) as i32)
+                                * (unit.placement.first_step_height() as i32);
+                        (placement.column, rot)
+                    }
+                    ExposeOffset::Step(step) => {
+                        let rot = placement.rotation
+                            + (*step as i32) * (unit.placement.first_step_height() as i32);
+                        (placement.column, rot)
+                    }
+                }
+            }
+            _ => panic!("Queriable was not Forward or Shared"),
+        };
+
+        unit.exposed.push(exposed);
+    }
+}
+
+fn compile_fixed<F: Field + Hash, TraceArgs>(
+    ast: &astCircuit<F, TraceArgs>,
+    unit: &mut CompilationUnit<F>,
+) {
+    if let Some(fixed_assignments) = &ast.fixed_assignments {
+        unit.fixed_assignments = place_fixed_assignments(unit, fixed_assignments.clone());
+    }
+}
+
+fn place_queriable<F: Clone>(
+    unit: &CompilationUnit<F>,
+    step: &StepType<F>,
+    q: Queriable<F>,
+) -> PolyExpr<F> {
+    match q {
+        Queriable::Internal(signal) => {
+            let placement = unit
+                .placement
+                .find_internal_signal_placement(step.uuid(), &signal);
+
+            let annotation = if let Some(annotation) = unit.annotations.get(&signal.uuid()) {
+                format!(
+                    "{}[{}, {}]",
+                    annotation, placement.column.annotation, placement.rotation
+                )
+            } else {
+                format!("[{}, {}]", placement.column.annotation, placement.rotation)
+            };
+
+            PolyExpr::Query((placement.column, placement.rotation, annotation))
+        }
+        Queriable::Forward(forward, next) => {
+            let placement = unit.get_forward_placement(&forward);
+
+            let super_rotation = placement.rotation
+                + if next {
+                    unit.placement.step_height(step.uuid()) as i32
+                } else {
+                    0
+                };
+
+            let annotation = if let Some(annotation) = unit.annotations.get(&forward.uuid()) {
+                if next {
+                    format!(
+                        "next({})[{}, {}]",
+                        annotation, placement.column.annotation, super_rotation
+                    )
+                } else {
+                    format!(
+                        "{}[{}, {}]",
+                        annotation, placement.column.annotation, super_rotation
+                    )
+                }
+            } else {
+                format!("[{}, {}]", placement.column.annotation, super_rotation)
+            };
+            PolyExpr::Query((placement.column, super_rotation, annotation))
+        }
+        Queriable::Shared(shared, rot) => {
+            let placement = unit.get_shared_placement(&shared);
+
+            let super_rotation =
+                placement.rotation + rot * (unit.placement.step_height(step.uuid()) as i32);
+
+            let annotation = if let Some(annotation) = unit.annotations.get(&shared.uuid()) {
+                if rot == 0 {
+                    format!(
+                        "{}[{}, {}]",
+                        annotation, placement.column.annotation, super_rotation
+                    )
+                } else {
+                    format!(
+                        "shared_rot_{}({})[{}, {}]",
+                        rot, annotation, placement.column.annotation, super_rotation
+                    )
+                }
+            } else {
+                format!("[{}, {}]", placement.column.annotation, super_rotation)
+            };
+            PolyExpr::Query((placement.column, super_rotation, annotation))
+        }
+        Queriable::Fixed(fixed, rot) => {
+            let placement = unit.get_fixed_placement(&fixed);
+
+            let super_rotation =
+                placement.rotation + rot * (unit.placement.step_height(step.uuid()) as i32);
+
+            let annotation = if let Some(annotation) = unit.annotations.get(&fixed.uuid()) {
+                if rot == 0 {
+                    format!(
+                        "{}[{}, {}]",
+                        annotation, placement.column.annotation, super_rotation
+                    )
+                } else {
+                    format!(
+                        "fixed_rot_{}({})[{}, {}]",
+                        rot, annotation, placement.column.annotation, super_rotation
+                    )
+                }
+            } else {
+                format!("[{}, {}]", placement.column.annotation, super_rotation)
+            };
+            PolyExpr::Query((placement.column, super_rotation, annotation))
+        }
+        Queriable::StepTypeNext(step_type_handle) => {
+            let super_rotation = unit.placement.step_height(step.uuid());
+            let dest_step = unit
+                .step_types
+                .get(&step_type_handle.uuid())
+                .expect("step not found");
+
+            unit.selector.next_expr(dest_step.uuid(), super_rotation)
+        }
+        Queriable::Halo2AdviceQuery(signal, rot) => {
+            let annotation = if let Some(annotation) = unit.annotations.get(&signal.uuid()) {
+                format!("[{}, {}]", annotation, rot)
+            } else {
+                format!("[halo2_advice?, {}]", rot)
+            };
+            PolyExpr::Query((
+                unit.find_halo2_advice(signal)
+                    .expect("halo2 advice column not found"),
+                rot,
+                annotation,
+            ))
+        }
+        Queriable::Halo2FixedQuery(signal, rot) => {
+            let annotation = if let Some(annotation) = unit.annotations.get(&signal.uuid()) {
+                format!("[{}, {}]", annotation, rot)
+            } else {
+                format!("[halo2_fixed?, {}]", rot)
+            };
+            PolyExpr::Query((
+                unit.find_halo2_fixed(signal)
+                    .expect("halo2 fixed column not found"),
+                rot,
+                annotation,
+            ))
+        }
+        Queriable::_unaccessible(_) => panic!("jarrl"),
+    }
+}
+
+fn transform_expr<F: Clone>(
+    unit: &CompilationUnit<F>,
+    step: &StepType<F>,
+    source: &ASTExpr<F>,
+) -> PolyExpr<F> {
+    match source.clone() {
+        Expr::Const(c) => PolyExpr::Const(c),
+        Expr::Sum(v) => PolyExpr::Sum(
+            v.into_iter()
+                .map(|e| transform_expr(unit, step, &e))
+                .collect(),
+        ),
+        Expr::Mul(v) => PolyExpr::Mul(
+            v.into_iter()
+                .map(|e| transform_expr(unit, step, &e))
+                .collect(),
+        ),
+        Expr::Neg(v) => PolyExpr::Neg(Box::new(transform_expr(unit, step, &v))),
+        Expr::Pow(v, exp) => PolyExpr::Pow(Box::new(transform_expr(unit, step, &v)), exp),
+        Expr::Query(q) => place_queriable(unit, step, q),
+        Expr::Halo2Expr(expr) => PolyExpr::Halo2Expr(expr),
+    }
+}
+
+fn place_fixed_assignments<F: Field>(
+    unit: &CompilationUnit<F>,
+    assignments: FixedAssignment<F>,
+) -> Assignments<F> {
+    let mut result = Assignments::default();
+    let step_height = unit.placement.first_step_height();
+    let empty = vec![F::ZERO; unit.num_rows];
+
+    for (queriable, assignments) in assignments {
+        let placement = match queriable {
+            Queriable::Fixed(fixed, rot) => {
+                if rot != 0 {
+                    panic!("cannot do fixed assignation of rotated queriable");
+                }
+                unit.placement
+                    .get_fixed_placement(&fixed)
+                    .expect("fixed placement not found")
+            }
+            Queriable::Halo2FixedQuery(signal, rot) => SignalPlacement::new(
+                unit.find_halo2_fixed(signal).expect("column not found"),
+                rot,
+            ),
+            _ => panic!("only can do fixed assignment to fixed signal"),
+        };
+
+        let mut column_values = if let Some(column_values) = result.get(&placement.column) {
+            column_values.clone()
+        } else {
+            empty.clone()
+        };
+
+        let mut offset = placement.rotation as usize;
+        for value in assignments {
+            column_values[offset] = value;
+            offset += step_height as usize;
+        }
+
+        result.insert(placement.column, column_values);
+    }
+
+    result
+}
+
+fn add_q_enable<F: Field>(unit: &mut CompilationUnit<F>, q_enable: Column) {
+    unit.polys = unit
+        .polys
+        .iter()
+        .map(|poly| Poly {
+            annotation: poly.annotation.clone(),
+            expr: q_enable.query(0, "q_enable".to_owned()) * poly.expr.clone(),
+        })
+        .collect();
+
+    unit.lookups = unit
+        .lookups
+        .iter()
+        .map(|lookup| PolyLookup {
+            annotation: lookup.annotation.clone(),
+            exprs: lookup
+                .exprs
+                .iter()
+                .map(|(src, dest)| {
+                    (
+                        q_enable.query(0, "q_enable".to_owned()) * src.clone(),
+                        dest.clone(),
+                    )
+                })
+                .collect(),
+        })
+        .collect();
+
+    let assignments = vec![F::ONE; unit.num_rows];
+    unit.fixed_assignments.insert(q_enable, assignments);
+}
+
+fn add_q_first<F: Field>(unit: &mut CompilationUnit<F>, step_uuid: StepTypeUUID, q_first: Column) {
+    let step = unit.step_types.get(&step_uuid).expect("step not found");
+
+    let poly = q_first.query(0, "q_first") * unit.selector.unselect(step.uuid());
+
+    unit.polys.push(Poly {
+        annotation: "q_first".to_string(),
+        expr: poly,
+    });
+
+    let mut assignments = vec![F::ZERO; unit.num_rows];
+    assignments[0] = F::ONE;
+    unit.fixed_assignments.insert(q_first, assignments);
+}
+
+fn add_q_last<F: Field>(
+    unit: &mut CompilationUnit<F>,
+    step_uuid: Option<StepTypeUUID>,
+    q_last: Column,
+) {
+    if let Some(step_uuid) = step_uuid {
+        let step = unit.step_types.get(&step_uuid).expect("step not found");
+
+        let poly = q_last.query(0, "q_last".to_owned()) * unit.selector.unselect(step.uuid());
+
+        unit.polys.push(Poly {
+            annotation: "q_last".to_string(),
+            expr: poly,
+        });
+    }
+
+    let mut assignments = vec![F::ZERO; unit.num_rows];
+    assignments[unit.num_rows - unit.placement.first_step_height() as usize] = F::ONE;
+    unit.fixed_assignments.insert(q_last, assignments);
+}
+
+fn add_q_last_to_constraint<F: Field>(
+    unit: &mut CompilationUnit<F>,
+    constraint: PolyExpr<F>,
+) -> PolyExpr<F> {
+    let q_last_column = unit.last_step.clone().expect("last column not found").1;
+    let q_last = q_last_column.query(0, "q_last".to_owned());
+    let not_q_last_expr = PolyExpr::Const(F::ONE) + (-q_last);
+
+    not_q_last_expr * constraint
+}
+
+fn add_default_columns<F>(unit: &mut CompilationUnit<F>) {
+    if let Some(q_enable) = &unit.q_enable {
+        unit.columns.push(q_enable.clone())
+    }
+
+    if let Some((_, q_first)) = &unit.first_step {
+        unit.columns.push(q_first.clone());
+    }
+
+    if let Some((_, q_last)) = &unit.last_step {
+        unit.columns.push(q_last.clone());
+    }
+}
+
+fn add_halo2_columns<F, TraceArgs>(unit: &mut CompilationUnit<F>, ast: &astCircuit<F, TraceArgs>) {
+    let halo2_advice_columns: Vec<Column> = ast
+        .halo2_advice
+        .iter()
+        .map(|signal| {
+            if let Some(annotation) = unit.annotations.get(&signal.uuid()) {
+                Column::new_halo2_advice(format!("halo2 advice {}", annotation), *signal)
+            } else {
+                Column::new_halo2_advice("halo2 advice", *signal)
+            }
+        })
+        .collect();
+
+    let halo2_fixed_columns: Vec<Column> = ast
+        .halo2_fixed
+        .iter()
+        .map(|signal| {
+            if let Some(annotation) = unit.annotations.get(&signal.uuid()) {
+                Column::new_halo2_fixed(format!("halo2 fixed {}", annotation), *signal)
+            } else {
+                Column::new_halo2_fixed("halo2 fixed", *signal)
+            }
+        })
+        .collect();
+
+    unit.columns.extend(halo2_advice_columns);
+    unit.columns.extend(halo2_fixed_columns);
+}
+
\ No newline at end of file diff --git a/docs/apidocs/src/chiquito/plonkish/compiler/step_selector.rs.html b/docs/apidocs/src/chiquito/plonkish/compiler/step_selector.rs.html new file mode 100644 index 00000000..0ed16418 --- /dev/null +++ b/docs/apidocs/src/chiquito/plonkish/compiler/step_selector.rs.html @@ -0,0 +1,701 @@ +step_selector.rs - source
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+
use std::{collections::HashMap, rc::Rc};
+
+use halo2_proofs::plonk::{Advice, Column as Halo2Column};
+
+use crate::{
+    ast::{StepType, StepTypeUUID},
+    field::Field,
+    util::UUID,
+};
+
+use super::{Column, CompilationUnit, PolyExpr};
+
+pub type SelectorAssignment<F> = (PolyExpr<F>, F);
+
+#[derive(Debug, Clone)]
+pub struct StepSelector<F> {
+    pub selector_expr: HashMap<StepTypeUUID, PolyExpr<F>>,
+    pub selector_expr_not: HashMap<StepTypeUUID, PolyExpr<F>>,
+    pub selector_assignment: HashMap<StepTypeUUID, Vec<SelectorAssignment<F>>>,
+    pub columns: Vec<Column>,
+}
+
+impl<F> Default for StepSelector<F> {
+    fn default() -> Self {
+        Self {
+            selector_expr: Default::default(),
+            selector_expr_not: Default::default(),
+            selector_assignment: Default::default(),
+            columns: Default::default(),
+        }
+    }
+}
+
+impl<F: Clone> StepSelector<F> {
+    pub fn select(&self, step_uuid: StepTypeUUID, constraint: &PolyExpr<F>) -> PolyExpr<F> {
+        let selector = self.selector_expr.get(&step_uuid).expect("step not found");
+        PolyExpr::Mul(vec![selector.clone(), constraint.clone()])
+    }
+
+    pub fn next_expr(&self, step_uuid: StepTypeUUID, step_height: u32) -> PolyExpr<F> {
+        let selector = self.selector_expr.get(&step_uuid).expect("step not found");
+
+        selector.rotate(step_height as i32)
+    }
+
+    pub fn unselect(&self, step_uuid: StepTypeUUID) -> PolyExpr<F> {
+        self.selector_expr_not
+            .get(&step_uuid)
+            .expect("step not found {}")
+            .clone()
+    }
+
+    pub fn get_selector_assignment(&self, step_uuid: StepTypeUUID) -> Vec<SelectorAssignment<F>> {
+        self.selector_assignment
+            .get(&step_uuid)
+            .expect("selector assignment for step not found")
+            .clone()
+    }
+}
+
+pub trait StepSelectorBuilder: Clone {
+    fn build<F: Field>(&self, unit: &mut CompilationUnit<F>);
+}
+
+#[derive(Debug, Default, Clone)]
+pub struct SimpleStepSelectorBuilder {}
+
+impl StepSelectorBuilder for SimpleStepSelectorBuilder {
+    fn build<F: Field>(&self, unit: &mut CompilationUnit<F>) {
+        let mut selector = StepSelector {
+            selector_expr: HashMap::new(),
+            selector_expr_not: HashMap::new(),
+            selector_assignment: HashMap::new(),
+            columns: Vec::new(),
+        };
+
+        for step in unit.step_types.values() {
+            let annotation = if let Some(annotation) = unit.annotations.get(&step.uuid()) {
+                format!("'step selector for {}'", annotation)
+            } else {
+                "'step selector'".to_string()
+            };
+
+            let column = Column::advice(annotation.clone(), 0);
+
+            selector.columns.push(column.clone());
+
+            selector
+                .selector_expr
+                .insert(step.uuid(), column.query(0, annotation.clone()));
+
+            selector.selector_expr_not.insert(
+                step.uuid(),
+                PolyExpr::Const(F::ONE) + (-column.query(0, annotation.clone())),
+            );
+
+            selector.selector_assignment.insert(
+                step.uuid(),
+                vec![(column.query(0, annotation.clone()), F::ONE)],
+            );
+        }
+
+        unit.columns.extend_from_slice(&selector.columns);
+        unit.selector = selector;
+    }
+}
+
+#[derive(Debug, Default, Clone)]
+pub struct TwoStepsSelectorBuilder {
+    pub halo2_column: Option<Halo2Column<Advice>>,
+    pub hint_one: Option<String>,
+}
+
+impl StepSelectorBuilder for TwoStepsSelectorBuilder {
+    fn build<F: Field>(&self, unit: &mut CompilationUnit<F>) {
+        if unit.step_types.len() != 2 {
+            panic!("jarll: must have two step types");
+        }
+
+        unit.selector = StepSelector {
+            selector_expr: HashMap::new(),
+            selector_expr_not: HashMap::new(),
+            selector_assignment: HashMap::new(),
+            columns: Vec::new(),
+        };
+
+        let (step_zero, step_one) = if let Some(step_one_name) = self.hint_one.clone() {
+            let hint_one = unit
+                .step_types
+                .values()
+                .find(|&step_type| *step_type.name == step_one_name)
+                .expect("step not found");
+
+            let one_uuid = hint_one.uuid();
+            let step_one = unit.step_types.get(&one_uuid).expect("step not found");
+            let step_zero = other_step_type(unit, one_uuid).expect("step not found");
+            (step_zero, step_one.clone())
+        } else {
+            let mut iter = unit.step_types.values();
+
+            (
+                Rc::clone(iter.next().expect("step not found")),
+                Rc::clone(iter.next().expect("step not found")),
+            )
+        };
+
+        let column = match self.halo2_column {
+            Some(advice) => unit
+                .find_halo2_advice_native(advice)
+                .expect("column not found"),
+            None => {
+                let column = Column::advice("step selector for two steps", 0);
+                unit.selector.columns.push(column.clone());
+                unit.columns.push(column.clone());
+                column
+            }
+        };
+
+        // Zero
+        unit.selector.selector_expr.insert(
+            step_zero.uuid(),
+            PolyExpr::Const(F::ONE) + (-column.query(0, "selector step zero")),
+        );
+
+        unit.selector
+            .selector_expr_not
+            .insert(step_zero.uuid(), column.query(0, "selector NOT step zero"));
+
+        unit.selector.selector_assignment.insert(
+            step_zero.uuid(),
+            vec![(column.query(0, "selector step zero"), F::ZERO)],
+        );
+
+        // One
+        unit.selector
+            .selector_expr
+            .insert(step_one.uuid(), column.query(0, "selector step one"));
+
+        unit.selector.selector_expr_not.insert(
+            step_one.uuid(),
+            PolyExpr::Const(F::ONE) + (-column.query(0, "selector NOT step one")),
+        );
+
+        unit.selector.selector_assignment.insert(
+            step_one.uuid(),
+            vec![(column.query(0, "selector step one"), F::ONE)],
+        );
+    }
+}
+
+#[derive(Debug, Default, Clone)]
+pub struct LogNSelectorBuilder {}
+
+impl StepSelectorBuilder for LogNSelectorBuilder {
+    fn build<F: Field>(&self, unit: &mut CompilationUnit<F>) {
+        let mut selector: StepSelector<F> = StepSelector {
+            selector_expr: HashMap::new(),
+            selector_expr_not: HashMap::new(),
+            selector_assignment: HashMap::new(),
+            columns: Vec::new(),
+        };
+
+        let n_step_types = unit.step_types.len() as u64;
+        let n_cols = (n_step_types as f64 + 1.0).log2().ceil() as u64;
+
+        let mut annotation;
+        for index in 0..n_cols {
+            annotation = format!("'binary selector column {}'", index);
+
+            let column = Column::advice(annotation.clone(), 0);
+            selector.columns.push(column.clone());
+        }
+
+        let mut step_value = 1;
+        for step in unit.step_types.values() {
+            let mut combined_expr = PolyExpr::Const(F::ONE);
+            let mut assignments = Vec::new();
+
+            for i in 0..n_cols {
+                let bit = (step_value >> i) & 1; // Extract the i-th bit of step_value
+                let column = &selector.columns[i as usize];
+
+                if bit == 1 {
+                    combined_expr = combined_expr * column.query(0, format!("Column {}", i));
+                    assignments.push((column.query(0, format!("Column {}", i)), F::ONE));
+                } else {
+                    combined_expr = combined_expr
+                        * (PolyExpr::Const(F::ONE) - column.query(0, format!("Column {}", i)));
+                }
+            }
+
+            selector
+                .selector_expr
+                .insert(step.uuid(), combined_expr.clone());
+            selector
+                .selector_expr_not
+                .insert(step.uuid(), PolyExpr::Const(F::ONE) - combined_expr.clone());
+            selector
+                .selector_assignment
+                .insert(step.uuid(), assignments);
+            step_value += 1;
+        }
+
+        unit.columns.extend_from_slice(&selector.columns);
+        unit.selector = selector;
+    }
+}
+
+fn other_step_type<F>(unit: &CompilationUnit<F>, uuid: UUID) -> Option<Rc<StepType<F>>> {
+    for step_type in unit.step_types.values() {
+        if step_type.uuid() != uuid {
+            return Some(Rc::clone(step_type));
+        }
+    }
+
+    None
+}
+
+#[cfg(test)]
+mod tests {
+    use halo2curves::bn256::Fr;
+    use uuid::Uuid;
+
+    use super::*;
+
+    fn mock_compilation_unit<F>() -> CompilationUnit<F> {
+        CompilationUnit::default()
+    }
+
+    fn add_step_types_to_unit<F>(unit: &mut CompilationUnit<F>, n_step_types: usize) {
+        for i in 0..n_step_types {
+            let uuid_value = Uuid::now_v1(&[1, 2, 3, 4, 5, 6]).as_u128();
+            unit.step_types.insert(
+                uuid_value,
+                Rc::new(StepType::new(uuid_value, format!("StepType{}", i))),
+            );
+        }
+    }
+
+    fn assert_common_tests<F>(unit: &CompilationUnit<F>, expected_cols: usize) {
+        assert_eq!(unit.columns.len(), expected_cols);
+        assert_eq!(unit.selector.columns.len(), expected_cols);
+        for step_type in unit.step_types.values() {
+            assert!(unit
+                .selector
+                .selector_assignment
+                .contains_key(&step_type.uuid()));
+            assert!(unit.selector.selector_expr.contains_key(&step_type.uuid()));
+        }
+    }
+
+    #[test]
+    fn test_log_n_selector_builder_3_step_types() {
+        let builder = LogNSelectorBuilder {};
+        let mut unit = mock_compilation_unit::<Fr>();
+
+        add_step_types_to_unit(&mut unit, 3);
+        builder.build(&mut unit);
+        assert_common_tests(&unit, 2);
+
+        // Asserts expressions for 3 step types
+        let expr10_temp = format!(
+            "(0x1 * {:#?} * (0x1 + (-{:#?})))",
+            &unit.selector.columns[0].query::<i32, &str>(0, "Column 0"),
+            &unit.selector.columns[1].query::<i32, &str>(0, "Column 1")
+        );
+        let expr01_temp = format!(
+            "(0x1 * (0x1 + (-{:#?})) * {:#?})",
+            &unit.selector.columns[0].query::<i32, &str>(0, "Column 0"),
+            &unit.selector.columns[1].query::<i32, &str>(0, "Column 1")
+        );
+        let expr11_temp = format!(
+            "(0x1 * {:#?} * {:#?})",
+            &unit.selector.columns[0].query::<i32, &str>(0, "Column 0"),
+            &unit.selector.columns[1].query::<i32, &str>(0, "Column 1")
+        );
+        let expected_exprs = [expr01_temp.trim(), expr10_temp.trim(), expr11_temp.trim()];
+
+        for expr in unit.selector.selector_expr.values() {
+            let expr_str = format!("{:#?}", expr);
+            assert!(
+                expected_exprs.contains(&expr_str.trim()),
+                "Unexpected expression: {}",
+                expr_str
+            );
+        }
+    }
+
+    #[test]
+    fn test_log_n_selector_builder_4_step_types() {
+        let builder = LogNSelectorBuilder {};
+        let mut unit = mock_compilation_unit::<Fr>();
+
+        add_step_types_to_unit(&mut unit, 4);
+        builder.build(&mut unit);
+        assert_common_tests(&unit, 3);
+    }
+
+    #[test]
+    fn test_log_n_selector_builder_10_step_types() {
+        let builder = LogNSelectorBuilder {};
+        let mut unit = mock_compilation_unit::<Fr>();
+
+        add_step_types_to_unit(&mut unit, 10);
+        builder.build(&mut unit);
+
+        let expected_cols = (10_f64 + 1.0).log2().ceil() as usize;
+        assert_common_tests(&unit, expected_cols);
+    }
+}
+
\ No newline at end of file diff --git a/docs/apidocs/src/chiquito/plonkish/compiler/unit.rs.html b/docs/apidocs/src/chiquito/plonkish/compiler/unit.rs.html new file mode 100644 index 00000000..e089c2db --- /dev/null +++ b/docs/apidocs/src/chiquito/plonkish/compiler/unit.rs.html @@ -0,0 +1,547 @@ +unit.rs - source
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+
use core::fmt::Debug;
+use std::{collections::HashMap, rc::Rc};
+
+use halo2_proofs::plonk::{Advice, Column as Halo2Column};
+
+use crate::{
+    ast::{
+        Circuit as astCircuit, FixedSignal, ForwardSignal, ImportedHalo2Advice, ImportedHalo2Fixed,
+        SharedSignal, StepType, StepTypeUUID,
+    },
+    plonkish::ir::{assignments::Assignments, Circuit, Column, ColumnType, Poly, PolyLookup},
+    util::{uuid, UUID},
+};
+
+use super::{
+    cell_manager::{Placement, SignalPlacement},
+    step_selector::StepSelector,
+};
+
+#[derive(Debug, Clone)]
+pub struct CompilationUnit<F> {
+    pub placement: Placement,
+    pub selector: StepSelector<F>,
+    pub step_types: HashMap<UUID, Rc<StepType<F>>>,
+    pub forward_signals: Vec<ForwardSignal>,
+    pub shared_signals: Vec<SharedSignal>,
+    pub fixed_signals: Vec<FixedSignal>,
+
+    pub annotations: HashMap<UUID, String>,
+
+    pub columns: Vec<Column>,
+    pub exposed: Vec<(Column, i32)>,
+
+    pub num_steps: usize,
+    pub q_enable: Option<Column>,
+    pub first_step: Option<(StepTypeUUID, Column)>,
+    pub last_step: Option<(Option<StepTypeUUID>, Column)>,
+
+    pub num_rows: usize,
+
+    pub polys: Vec<Poly<F>>,
+    pub lookups: Vec<PolyLookup<F>>,
+
+    pub fixed_assignments: Assignments<F>,
+
+    pub ast_id: UUID,
+    pub uuid: UUID,
+
+    pub other_sub_circuits: Rc<Vec<CompilationUnit<F>>>,
+    pub other_columns: Rc<Vec<Column>>,
+}
+
+impl<F> Default for CompilationUnit<F> {
+    fn default() -> Self {
+        Self {
+            placement: Default::default(),
+            selector: Default::default(),
+            step_types: Default::default(),
+            forward_signals: Default::default(),
+            shared_signals: Default::default(),
+            fixed_signals: Default::default(),
+
+            annotations: Default::default(),
+
+            columns: Default::default(),
+            exposed: Default::default(),
+
+            num_steps: Default::default(),
+            q_enable: Default::default(),
+            first_step: Default::default(),
+            last_step: Default::default(),
+
+            num_rows: Default::default(),
+
+            polys: Default::default(),
+            lookups: Default::default(),
+
+            fixed_assignments: Default::default(),
+
+            ast_id: Default::default(),
+            uuid: uuid(),
+
+            other_sub_circuits: Default::default(),
+            other_columns: Default::default(),
+        }
+    }
+}
+
+impl<F> CompilationUnit<F> {
+    pub(super) fn find_halo2_advice(&self, to_find: ImportedHalo2Advice) -> Option<Column> {
+        for column in self.columns.iter() {
+            if let Some(advice) = column.halo2_advice {
+                if advice == to_find {
+                    return Some(column.clone());
+                }
+            }
+        }
+
+        for sub_circuit in self.other_sub_circuits.iter() {
+            let found = sub_circuit.find_halo2_advice(to_find);
+            if found.is_some() {
+                return found;
+            }
+        }
+
+        None
+    }
+
+    pub(super) fn find_halo2_advice_native(&self, to_find: Halo2Column<Advice>) -> Option<Column> {
+        for column in self.columns.iter() {
+            if let Some(advice) = column.halo2_advice {
+                if advice.column == to_find {
+                    return Some(column.clone());
+                }
+            }
+        }
+
+        for sub_circuit in self.other_sub_circuits.iter() {
+            let found = sub_circuit.find_halo2_advice_native(to_find);
+            if found.is_some() {
+                return found;
+            }
+        }
+
+        None
+    }
+
+    pub(super) fn find_halo2_fixed(&self, to_find: ImportedHalo2Fixed) -> Option<Column> {
+        for column in self.columns.iter() {
+            if let Some(fixed) = column.halo2_fixed {
+                if fixed == to_find {
+                    return Some(column.clone());
+                }
+            }
+        }
+
+        for sub_circuit in self.other_sub_circuits.iter() {
+            let found = sub_circuit.find_halo2_fixed(to_find);
+            if found.is_some() {
+                return found;
+            }
+        }
+
+        None
+    }
+
+    pub fn get_forward_placement(&self, forward: &ForwardSignal) -> SignalPlacement {
+        if let Some(placement) = self.placement.get_forward_placement(forward) {
+            return placement;
+        }
+
+        for sub_circuit in self.other_sub_circuits.iter() {
+            if let Some(placement) = sub_circuit.placement.get_forward_placement(forward) {
+                return placement;
+            }
+        }
+
+        panic!("forward signal placement not found");
+    }
+    pub fn get_shared_placement(&self, shared: &SharedSignal) -> SignalPlacement {
+        if let Some(placement) = self.placement.get_shared_placement(shared) {
+            return placement;
+        }
+
+        for sub_circuit in self.other_sub_circuits.iter() {
+            if let Some(placement) = sub_circuit.placement.get_shared_placement(shared) {
+                return placement;
+            }
+        }
+
+        panic!("shared signal placement not found");
+    }
+
+    pub fn get_fixed_placement(&self, fixed: &FixedSignal) -> SignalPlacement {
+        if let Some(placement) = self.placement.get_fixed_placement(fixed) {
+            return placement;
+        }
+
+        for sub_circuit in self.other_sub_circuits.iter() {
+            if let Some(signal) = sub_circuit.placement.get_fixed_placement(fixed) {
+                return signal;
+            }
+        }
+
+        panic!("fixed signal placement not found");
+    }
+
+    fn has_transition_constraints<TraceArgs>(ast: &astCircuit<F, TraceArgs>) -> bool {
+        for step in ast.step_types.values() {
+            if !step.transition_constraints.is_empty() {
+                return true;
+            }
+        }
+
+        false
+    }
+}
+
+impl<F, TraceArgs> From<&astCircuit<F, TraceArgs>> for CompilationUnit<F> {
+    fn from(ast: &astCircuit<F, TraceArgs>) -> Self {
+        CompilationUnit::<F> {
+            annotations: {
+                let mut acc = ast.annotations.clone();
+                for step in ast.step_types.values() {
+                    acc.extend(step.annotations.clone());
+                }
+
+                acc
+            },
+            step_types: ast.step_types.clone(),
+            forward_signals: ast.forward_signals.clone(),
+            shared_signals: ast.shared_signals.clone(),
+            fixed_signals: ast.fixed_signals.clone(),
+            num_steps: ast.num_steps,
+            q_enable: if ast.q_enable {
+                Some(Column {
+                    annotation: "q_enable".to_owned(),
+                    ctype: ColumnType::Fixed,
+                    halo2_advice: None,
+                    halo2_fixed: None,
+                    phase: 0,
+                    id: uuid(),
+                })
+            } else {
+                None
+            },
+            first_step: ast.first_step.map(|step_type_uuid| {
+                (
+                    step_type_uuid,
+                    Column {
+                        annotation: "q_first".to_owned(),
+                        ctype: ColumnType::Fixed,
+                        halo2_advice: None,
+                        halo2_fixed: None,
+                        phase: 0,
+                        id: uuid(),
+                    },
+                )
+            }),
+            last_step: if ast.last_step.is_some() || Self::has_transition_constraints(ast) {
+                Some((
+                    ast.last_step,
+                    Column {
+                        annotation: "q_last".to_owned(),
+                        ctype: ColumnType::Fixed,
+                        halo2_advice: None,
+                        halo2_fixed: None,
+                        phase: 0,
+                        id: uuid(),
+                    },
+                ))
+            } else {
+                None
+            },
+            ast_id: ast.id,
+            ..Default::default()
+        }
+    }
+}
+
+impl<F> From<CompilationUnit<F>> for Circuit<F> {
+    fn from(unit: CompilationUnit<F>) -> Self {
+        Circuit::<F> {
+            columns: unit.columns,
+            exposed: unit.exposed,
+            polys: unit.polys,
+            lookups: unit.lookups,
+            fixed_assignments: unit.fixed_assignments,
+            id: unit.uuid,
+            ast_id: unit.ast_id,
+        }
+    }
+}
+
\ No newline at end of file diff --git a/docs/apidocs/src/chiquito/plonkish/ir/assignments.rs.html b/docs/apidocs/src/chiquito/plonkish/ir/assignments.rs.html new file mode 100644 index 00000000..97a0a292 --- /dev/null +++ b/docs/apidocs/src/chiquito/plonkish/ir/assignments.rs.html @@ -0,0 +1,605 @@ +assignments.rs - source
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+
use std::{
+    collections::HashMap,
+    fmt,
+    hash::Hash,
+    ops::{Deref, DerefMut},
+};
+
+use crate::{field::Field, wit_gen::AutoTraceGenerator};
+
+use halo2_proofs::plonk::{Advice, Column as Halo2Column};
+
+use crate::{
+    ast::{query::Queriable, ForwardSignal, SharedSignal, StepTypeUUID},
+    plonkish::compiler::{cell_manager::Placement, step_selector::StepSelector},
+    util::UUID,
+    wit_gen::{StepInstance, TraceGenerator, TraceWitness},
+};
+
+use super::{Column, PolyExpr};
+
+#[derive(Debug, Clone)]
+pub struct Assignments<F>(pub HashMap<Column, Vec<F>>);
+
+impl<F: fmt::Debug> fmt::Display for Assignments<F> {
+    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+        // get the decimal width based on the step_instances size, add extra one leading zero
+        let decimal_width = self.0.len().checked_ilog10().unwrap_or(0) + 2;
+        // offset(col_uuid): value0, value1, value2,...
+        for (i, (col, vals)) in self.0.iter().enumerate() {
+            let vals = vals.iter().fold(String::new(), |mut acc, val| {
+                acc.push_str(&format!("{:?}, ", val));
+                acc
+            });
+            writeln!(
+                f,
+                "{:0>width$}({}): {}",
+                i,
+                col.id,
+                vals,
+                width = decimal_width as usize,
+            )?;
+        }
+        Ok(())
+    }
+}
+
+impl<F> Default for Assignments<F> {
+    fn default() -> Self {
+        Self(HashMap::default())
+    }
+}
+
+impl<F> Deref for Assignments<F> {
+    type Target = HashMap<Column, Vec<F>>;
+
+    fn deref(&self) -> &Self::Target {
+        &self.0
+    }
+}
+
+impl<F> DerefMut for Assignments<F> {
+    fn deref_mut(&mut self) -> &mut Self::Target {
+        &mut self.0
+    }
+}
+
+pub struct AssignmentGenerator<F, TraceArgs> {
+    columns: Vec<Column>,
+    placement: Placement,
+    selector: StepSelector<F>,
+    trace_gen: TraceGenerator<F, TraceArgs>,
+    auto_trace_gen: AutoTraceGenerator<F>,
+
+    num_rows: usize,
+
+    ir_id: UUID,
+}
+
+impl<F: Clone, TraceArgs> Clone for AssignmentGenerator<F, TraceArgs> {
+    fn clone(&self) -> Self {
+        Self {
+            columns: self.columns.clone(),
+            placement: self.placement.clone(),
+            selector: self.selector.clone(),
+            trace_gen: self.trace_gen.clone(),
+            auto_trace_gen: self.auto_trace_gen.clone(),
+            num_rows: self.num_rows,
+            ir_id: self.ir_id,
+        }
+    }
+}
+
+impl<F: Clone, TraceArgs> Default for AssignmentGenerator<F, TraceArgs> {
+    fn default() -> Self {
+        Self {
+            columns: Default::default(),
+            placement: Default::default(),
+            selector: Default::default(),
+            trace_gen: Default::default(),
+            auto_trace_gen: Default::default(),
+            num_rows: Default::default(),
+            ir_id: Default::default(),
+        }
+    }
+}
+
+impl<F: Field + Hash, TraceArgs> AssignmentGenerator<F, TraceArgs> {
+    pub fn new(
+        columns: Vec<Column>,
+        placement: Placement,
+        selector: StepSelector<F>,
+        trace_gen: TraceGenerator<F, TraceArgs>,
+        auto_trace_gen: AutoTraceGenerator<F>,
+        num_rows: usize,
+        ir_id: UUID,
+    ) -> Self {
+        Self {
+            columns,
+            placement,
+            selector,
+            trace_gen,
+            auto_trace_gen,
+            num_rows,
+            ir_id,
+        }
+    }
+
+    pub fn empty(ir_id: UUID) -> Self {
+        Self {
+            ir_id,
+            ..Default::default()
+        }
+    }
+
+    pub fn generate(&self, args: TraceArgs) -> Assignments<F> {
+        let witness = self.trace_gen.generate(args);
+
+        self.generate_with_witness(witness)
+    }
+
+    pub fn generate_with_witness(&self, witness: TraceWitness<F>) -> Assignments<F> {
+        let mut offset: usize = 0;
+        let mut assignments: Assignments<F> = Default::default();
+
+        let witness = self.auto_trace_gen.generate(witness);
+
+        for step_instance in witness.step_instances.into_iter() {
+            self.assign_step(&mut offset, &mut assignments, &step_instance);
+        }
+
+        assignments
+    }
+
+    pub fn uuid(&self) -> UUID {
+        self.ir_id
+    }
+
+    fn assign_step(
+        &self,
+        offset: &mut usize,
+        assignments: &mut Assignments<F>,
+        step_instance: &StepInstance<F>,
+    ) {
+        for (lhs, rhs) in step_instance.assignments.iter() {
+            self.assign(offset, assignments, step_instance.step_type_uuid, lhs, rhs);
+        }
+
+        let selector_assignment = self
+            .selector
+            .get_selector_assignment(step_instance.step_type_uuid);
+
+        for (expr, value) in selector_assignment.iter() {
+            match expr {
+                PolyExpr::Query((column, rot, _)) => {
+                    self.set_value(assignments, column.clone(), *offset + *rot as usize, value)
+                }
+                _ => panic!("wrong type of expresion is selector assignment"),
+            }
+        }
+
+        *offset += self.placement.step_height(step_instance.step_type_uuid) as usize;
+    }
+
+    fn assign(
+        &self,
+        offset: &mut usize,
+        assignments: &mut Assignments<F>,
+        step_uuid: StepTypeUUID,
+        lhs: &Queriable<F>,
+        value: &F,
+    ) {
+        let (column, rotation) = self.find_placement(step_uuid, lhs);
+
+        let offset = (*offset as i32 + rotation) as usize;
+
+        self.set_value(assignments, column, offset, value);
+    }
+
+    fn find_placement(&self, step_uuid: StepTypeUUID, query: &Queriable<F>) -> (Column, i32) {
+        match query {
+            Queriable::Internal(signal) => self
+                .placement
+                .find_internal_signal_placement(step_uuid, signal)
+                .into(),
+
+            Queriable::Forward(forward, next) => {
+                self.get_forward_placement(step_uuid, forward, *next)
+            }
+
+            Queriable::Shared(shared, rot) => self.get_shared_placement(shared, *rot),
+
+            Queriable::Halo2AdviceQuery(signal, rotation) => {
+                let column = self
+                    .find_halo2_advice_native(signal.column)
+                    .expect("column not found");
+
+                (column, *rotation)
+            }
+
+            _ => panic!("invalid advice assignment on queriable {:?}", query),
+        }
+    }
+
+    fn set_value(
+        &self,
+        assignments: &mut Assignments<F>,
+        column: Column,
+        offset: usize,
+        value: &F,
+    ) {
+        if let Some(column_assignments) = assignments.get_mut(&column) {
+            column_assignments[offset] = *value;
+        } else {
+            let mut column_assignments = vec![F::ZERO; self.num_rows];
+            column_assignments[offset] = *value;
+
+            assignments.insert(column, column_assignments);
+        }
+    }
+
+    fn get_forward_placement(
+        &self,
+        step_uuid: StepTypeUUID,
+        forward: &ForwardSignal,
+        next: bool,
+    ) -> (Column, i32) {
+        let placement = self
+            .placement
+            .get_forward_placement(forward)
+            .expect("forward signal placement not found");
+
+        let super_rotation = placement.rotation
+            + if next {
+                self.placement.step_height(step_uuid) as i32
+            } else {
+                0
+            };
+
+        (placement.column, super_rotation)
+    }
+
+    fn get_shared_placement(&self, shared: &SharedSignal, rotation: i32) -> (Column, i32) {
+        let placement = self
+            .placement
+            .get_shared_placement(shared)
+            .expect("shared signal not found");
+
+        let super_rotation =
+            placement.rotation + rotation * (self.placement.first_step_height() as i32);
+
+        (placement.column, super_rotation)
+    }
+
+    fn find_halo2_advice_native(&self, halo2_advice: Halo2Column<Advice>) -> Option<Column> {
+        for column in self.columns.iter() {
+            if let Some(advice) = column.halo2_advice {
+                if advice.column == halo2_advice {
+                    return Some(column.clone());
+                }
+            }
+        }
+
+        None
+    }
+}
+
+#[cfg(test)]
+mod tests {
+    use super::*;
+
+    #[test]
+    fn pretty_print_assignments() {
+        let display = format!(
+            "{}",
+            Assignments::<i32>(HashMap::from([
+                (Column::advice("a", 1), vec![1, 2, 3]),
+                (Column::fixed("a"), vec![4, 5, 6]),
+            ])),
+        );
+        println!("{}", display);
+    }
+}
+
\ No newline at end of file diff --git a/docs/apidocs/src/chiquito/plonkish/ir/mod.rs.html b/docs/apidocs/src/chiquito/plonkish/ir/mod.rs.html new file mode 100644 index 00000000..012f97c9 --- /dev/null +++ b/docs/apidocs/src/chiquito/plonkish/ir/mod.rs.html @@ -0,0 +1,395 @@ +mod.rs - source
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+
use std::{fmt::Debug, hash::Hash};
+
+use crate::{
+    ast::{ImportedHalo2Advice, ImportedHalo2Fixed},
+    poly::Expr,
+    util::{uuid, UUID},
+};
+
+use self::{assignments::Assignments, query::Queriable};
+
+pub mod assignments;
+pub mod query;
+pub mod sc;
+
+#[derive(Clone, Default)]
+pub struct Circuit<F> {
+    pub columns: Vec<Column>,
+    pub exposed: Vec<(Column, i32)>,
+
+    pub polys: Vec<Poly<F>>,
+    pub lookups: Vec<PolyLookup<F>>,
+
+    pub fixed_assignments: Assignments<F>,
+
+    pub id: UUID,
+    pub ast_id: UUID,
+}
+
+impl<F: Debug> Debug for Circuit<F> {
+    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
+        f.debug_struct("Circuit")
+            .field("columns", &self.columns)
+            .field("polys", &self.polys)
+            .field("lookups", &self.lookups)
+            .finish()
+    }
+}
+
+#[derive(Clone, Debug, Hash)]
+pub enum ColumnType {
+    Advice,
+    Fixed,
+    Halo2Advice,
+    Halo2Fixed,
+}
+
+#[derive(Clone, Debug)]
+pub struct Column {
+    pub annotation: String,
+
+    pub ctype: ColumnType,
+    pub halo2_advice: Option<ImportedHalo2Advice>,
+    pub halo2_fixed: Option<ImportedHalo2Fixed>,
+
+    pub phase: usize,
+
+    pub(crate) id: UUID,
+}
+
+impl Column {
+    pub fn advice<A: Into<String>>(annotation: A, phase: usize) -> Column {
+        Column {
+            annotation: annotation.into(),
+            id: uuid(),
+            ctype: ColumnType::Advice,
+            phase,
+            halo2_advice: None,
+            halo2_fixed: None,
+        }
+    }
+
+    pub fn fixed<A: Into<String>>(annotation: A) -> Column {
+        Column {
+            annotation: annotation.into(),
+            id: uuid(),
+            ctype: ColumnType::Fixed,
+            phase: 0,
+            halo2_advice: None,
+            halo2_fixed: None,
+        }
+    }
+
+    pub fn new_halo2_advice<A: Into<String>>(
+        annotation: A,
+        halo2_advice: ImportedHalo2Advice,
+    ) -> Column {
+        Column {
+            annotation: annotation.into(),
+            id: uuid(),
+            phase: 0,
+            ctype: ColumnType::Halo2Advice,
+            halo2_advice: Some(halo2_advice),
+            halo2_fixed: None,
+        }
+    }
+
+    pub fn new_halo2_fixed<A: Into<String>>(
+        annotation: A,
+        halo2_fixed: ImportedHalo2Fixed,
+    ) -> Column {
+        Column {
+            annotation: annotation.into(),
+            id: uuid(),
+            phase: 0,
+            ctype: ColumnType::Halo2Fixed,
+            halo2_advice: None,
+            halo2_fixed: Some(halo2_fixed),
+        }
+    }
+
+    pub fn uuid(&self) -> UUID {
+        self.id
+    }
+
+    pub fn query<F, A: Into<String>>(&self, rotation: i32, annotation: A) -> PolyExpr<F> {
+        PolyExpr::Query((self.clone(), rotation, annotation.into()))
+    }
+}
+
+impl PartialEq for Column {
+    fn eq(&self, other: &Self) -> bool {
+        self.id == other.id
+    }
+}
+
+impl Hash for Column {
+    fn hash<H: std::hash::Hasher>(&self, state: &mut H) {
+        self.id.hash(state);
+    }
+}
+
+impl Eq for Column {}
+
+#[derive(Clone)]
+pub struct Poly<F> {
+    pub annotation: String,
+    pub expr: PolyExpr<F>,
+}
+
+impl<F: Debug> Debug for Poly<F> {
+    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
+        write!(f, "{} => {:?}", self.annotation, self.expr)
+    }
+}
+
+pub type PolyExpr<F> = Expr<F, Queriable>;
+
+impl<F: Clone> PolyExpr<F> {
+    pub fn rotate(&self, rot: i32) -> PolyExpr<F> {
+        match self {
+            PolyExpr::Const(_) => (*self).clone(),
+            PolyExpr::Query((c, orig_rot, annotation)) => PolyExpr::Query((
+                c.clone(),
+                orig_rot + rot,
+                format!("rot[{}, {}]", rot, annotation),
+            )),
+            PolyExpr::Sum(v) => PolyExpr::Sum(v.iter().map(|e| e.rotate(rot)).collect()),
+            PolyExpr::Mul(v) => PolyExpr::Mul(v.iter().map(|e| e.rotate(rot)).collect()),
+            PolyExpr::Neg(v) => PolyExpr::Neg(Box::new(v.rotate(rot))),
+            PolyExpr::Pow(v, exp) => PolyExpr::Pow(Box::new(v.rotate(rot)), *exp),
+            PolyExpr::Halo2Expr(_) => panic!("jarrl: cannot rotate polyexpr that contains halo2"),
+        }
+    }
+}
+
+#[derive(Clone, Debug)]
+pub struct PolyLookup<F> {
+    pub annotation: String,
+    pub exprs: Vec<(PolyExpr<F>, PolyExpr<F>)>,
+}
+
+#[cfg(test)]
+mod tests {
+    use super::PolyExpr;
+    use halo2_proofs::halo2curves::bn256::Fr;
+
+    #[test]
+    fn test_poly_expr_fmt() {
+        let a: Fr = 10.into();
+        let b: Fr = 20.into();
+
+        let expr1 = PolyExpr::Const(&a);
+        assert_eq!(format!("{:?}", expr1), "0xa");
+
+        let expr2 = PolyExpr::Sum(vec![PolyExpr::Const(&a), PolyExpr::Const(&b)]);
+        assert_eq!(format!("{:?}", expr2), "(0xa + 0x14)");
+
+        let expr3 = PolyExpr::Mul(vec![PolyExpr::Const(&a), PolyExpr::Const(&b)]);
+        assert_eq!(format!("{:?}", expr3), "(0xa * 0x14)");
+
+        let expr4 = PolyExpr::Neg(Box::new(PolyExpr::Const(&a)));
+        assert_eq!(format!("{:?}", expr4), "(-0xa)");
+
+        let expr5 = PolyExpr::Pow(Box::new(PolyExpr::Const(&a)), 2);
+        assert_eq!(format!("{:?}", expr5), "(0xa)^2");
+    }
+}
+
\ No newline at end of file diff --git a/docs/apidocs/src/chiquito/plonkish/ir/query.rs.html b/docs/apidocs/src/chiquito/plonkish/ir/query.rs.html new file mode 100644 index 00000000..09f60d6b --- /dev/null +++ b/docs/apidocs/src/chiquito/plonkish/ir/query.rs.html @@ -0,0 +1,7 @@ +query.rs - source
1
+2
+3
+
use super::Column;
+
+pub type Queriable = (Column, i32, String); // column, rotation, annotation
+
\ No newline at end of file diff --git a/docs/apidocs/src/chiquito/plonkish/ir/sc.rs.html b/docs/apidocs/src/chiquito/plonkish/ir/sc.rs.html new file mode 100644 index 00000000..c5a2dba9 --- /dev/null +++ b/docs/apidocs/src/chiquito/plonkish/ir/sc.rs.html @@ -0,0 +1,233 @@ +sc.rs - source
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+
use std::{collections::HashMap, hash::Hash, rc::Rc};
+
+use crate::{field::Field, util::UUID, wit_gen::TraceWitness};
+
+use super::{
+    assignments::{AssignmentGenerator, Assignments},
+    Circuit,
+};
+
+pub struct SuperCircuit<F, MappingArgs> {
+    sub_circuits: Vec<Circuit<F>>,
+    mapping: MappingGenerator<F, MappingArgs>,
+}
+
+impl<F, MappingArgs> Default for SuperCircuit<F, MappingArgs> {
+    fn default() -> Self {
+        Self {
+            sub_circuits: Default::default(),
+            mapping: Default::default(),
+        }
+    }
+}
+
+impl<F, MappingArgs> SuperCircuit<F, MappingArgs> {
+    pub fn add_sub_circuit(&mut self, sub_circuit: Circuit<F>) {
+        self.sub_circuits.push(sub_circuit);
+    }
+
+    pub fn get_mapping(&self) -> MappingGenerator<F, MappingArgs> {
+        self.mapping.clone()
+    }
+}
+
+impl<F: Field + Hash, MappingArgs> SuperCircuit<F, MappingArgs> {
+    pub fn set_mapping<M: Fn(&mut MappingContext<F>, MappingArgs) + 'static>(
+        &mut self,
+        mapping: M,
+    ) {
+        self.mapping = MappingGenerator::new(Rc::new(mapping));
+    }
+}
+
+impl<F: Clone, MappingArgs> SuperCircuit<F, MappingArgs> {
+    pub fn get_sub_circuits(&self) -> Vec<Circuit<F>> {
+        self.sub_circuits.clone()
+    }
+}
+
+pub type SuperAssignments<F> = HashMap<UUID, Assignments<F>>;
+
+pub struct MappingContext<F> {
+    assignments: SuperAssignments<F>,
+}
+
+impl<F> Default for MappingContext<F> {
+    fn default() -> Self {
+        Self {
+            assignments: Default::default(),
+        }
+    }
+}
+
+impl<F: Field + Hash> MappingContext<F> {
+    pub fn map<TraceArgs>(&mut self, gen: &AssignmentGenerator<F, TraceArgs>, args: TraceArgs) {
+        self.assignments.insert(gen.uuid(), gen.generate(args));
+    }
+
+    pub fn map_with_witness<TraceArgs>(
+        &mut self,
+        gen: &AssignmentGenerator<F, TraceArgs>,
+        witness: TraceWitness<F>,
+    ) {
+        self.assignments
+            .insert(gen.uuid(), gen.generate_with_witness(witness));
+    }
+
+    pub fn get_super_assignments(self) -> SuperAssignments<F> {
+        self.assignments
+    }
+}
+
+pub type Mapping<F, MappingArgs> = dyn Fn(&mut MappingContext<F>, MappingArgs) + 'static;
+
+pub struct MappingGenerator<F, MappingArgs> {
+    mapping: Rc<Mapping<F, MappingArgs>>,
+}
+
+impl<F, MappingArgs> Clone for MappingGenerator<F, MappingArgs> {
+    fn clone(&self) -> Self {
+        Self {
+            mapping: self.mapping.clone(),
+        }
+    }
+}
+
+impl<F, MappingArgs> Default for MappingGenerator<F, MappingArgs> {
+    fn default() -> Self {
+        Self {
+            mapping: Rc::new(|_, _| {}),
+        }
+    }
+}
+
+impl<F: Field + Hash, MappingArgs> MappingGenerator<F, MappingArgs> {
+    pub fn new(mapping: Rc<Mapping<F, MappingArgs>>) -> Self {
+        Self { mapping }
+    }
+
+    pub fn generate(&self, args: MappingArgs) -> SuperAssignments<F> {
+        let mut ctx = MappingContext::default();
+
+        (self.mapping)(&mut ctx, args);
+
+        ctx.get_super_assignments()
+    }
+}
+
\ No newline at end of file diff --git a/docs/apidocs/src/chiquito/plonkish/mod.rs.html b/docs/apidocs/src/chiquito/plonkish/mod.rs.html new file mode 100644 index 00000000..749a58f2 --- /dev/null +++ b/docs/apidocs/src/chiquito/plonkish/mod.rs.html @@ -0,0 +1,7 @@ +mod.rs - source
1
+2
+3
+
pub mod backend;
+pub mod compiler;
+pub mod ir;
+
\ No newline at end of file diff --git a/docs/apidocs/src/chiquito/poly.rs.html b/docs/apidocs/src/chiquito/poly.rs.html new file mode 100644 index 00000000..45342a73 --- /dev/null +++ b/docs/apidocs/src/chiquito/poly.rs.html @@ -0,0 +1,537 @@ +poly.rs - source
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+
use std::{
+    collections::HashMap,
+    fmt::Debug,
+    hash::Hash,
+    ops::{Add, Mul, Neg, Sub},
+};
+
+use halo2_proofs::plonk::Expression;
+
+use crate::field::Field;
+
+pub trait ToExpr<F, V> {
+    fn expr(&self) -> Expr<F, V>;
+}
+
+pub trait ToField<F> {
+    fn field(&self) -> F;
+}
+
+#[derive(Clone)]
+pub enum Expr<F, V> {
+    Const(F),
+    Sum(Vec<Expr<F, V>>),
+    Mul(Vec<Expr<F, V>>),
+    Neg(Box<Expr<F, V>>),
+    Pow(Box<Expr<F, V>>, u32),
+    Query(V),
+    Halo2Expr(Expression<F>),
+}
+
+impl<F: Debug, V: Debug> Debug for Expr<F, V> {
+    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
+        match self {
+            Self::Const(arg0) => {
+                let formatted = format!("{:?}", arg0);
+                if formatted.starts_with("0x") {
+                    let s = format!(
+                        "0x{}",
+                        formatted.trim_start_matches("0x").trim_start_matches('0')
+                    );
+                    write!(f, "{}", s)
+                } else {
+                    write!(f, "{}", formatted)
+                }
+            }
+            Self::Sum(arg0) => write!(
+                f,
+                "({})",
+                arg0.iter()
+                    .map(|v| format!("{:?}", v))
+                    .collect::<Vec<String>>()
+                    .join(" + ")
+            ),
+            Self::Mul(arg0) => write!(
+                f,
+                "({})",
+                arg0.iter()
+                    .map(|v| format!("{:?}", v))
+                    .collect::<Vec<String>>()
+                    .join(" * ")
+            ),
+            Self::Neg(arg0) => write!(f, "(-{:?})", arg0),
+            Self::Pow(arg0, arg1) => write!(f, "({:?})^{}", arg0, arg1),
+            Self::Query(arg0) => write!(f, "{:?}", arg0),
+            Self::Halo2Expr(arg0) => write!(f, "halo2({:?})", arg0),
+        }
+    }
+}
+
+pub type VarAssignments<F, V> = HashMap<V, F>;
+
+impl<F: Field + Hash, V: Eq + PartialEq + Hash> Expr<F, V> {
+    pub fn eval(&self, assignments: &VarAssignments<F, V>) -> Option<F> {
+        match self {
+            Expr::Const(v) => Some(*v),
+            Expr::Sum(ses) => ses
+                .iter()
+                .fold(Some(F::ZERO), |acc, se| Some(acc? + se.eval(assignments)?)),
+            Expr::Mul(ses) => ses
+                .iter()
+                .fold(Some(F::ONE), |acc, se| Some(acc? * se.eval(assignments)?)),
+            Expr::Neg(se) => Some(F::ZERO - se.eval(assignments)?),
+            Expr::Pow(se, exp) => Some(se.eval(assignments)?.pow([*exp as u64])),
+            Expr::Query(q) => assignments.get(q).copied(),
+
+            // Not implemented, and not necessary for aexpr
+            Expr::Halo2Expr(_) => None,
+        }
+    }
+}
+
+impl<F: Clone, V: Clone> ToExpr<F, V> for Expr<F, V> {
+    fn expr(&self) -> Expr<F, V> {
+        self.clone()
+    }
+}
+
+impl<F, V, RHS: Into<Expr<F, V>>> Add<RHS> for Expr<F, V> {
+    type Output = Self;
+    fn add(self, rhs: RHS) -> Self {
+        use Expr::*;
+        match self {
+            Sum(mut xs) => {
+                xs.push(rhs.into());
+                Sum(xs)
+            }
+            e => Sum(vec![e, rhs.into()]),
+        }
+    }
+}
+
+impl<F, V, RHS: Into<Expr<F, V>>> Sub<RHS> for Expr<F, V> {
+    type Output = Self;
+    fn sub(self, rhs: RHS) -> Self {
+        use Expr::*;
+        match self {
+            Sum(mut xs) => {
+                xs.push(rhs.into().neg());
+                Sum(xs)
+            }
+            e => Sum(vec![e, rhs.into().neg()]),
+        }
+    }
+}
+
+impl<F, V, RHS: Into<Expr<F, V>>> Mul<RHS> for Expr<F, V> {
+    type Output = Self;
+    fn mul(self, rhs: RHS) -> Self {
+        use Expr::*;
+        match self {
+            Mul(mut xs) => {
+                xs.push(rhs.into());
+                Mul(xs)
+            }
+            e => Mul(vec![e, rhs.into()]),
+        }
+    }
+}
+
+impl<F, V> Neg for Expr<F, V> {
+    type Output = Self;
+    fn neg(self) -> Self {
+        match self {
+            Expr::Neg(xs) => *xs,
+            e => Expr::Neg(Box::new(e)),
+        }
+    }
+}
+
+macro_rules! impl_expr_like {
+    ($type:ty) => {
+        impl<F: From<u64>, V> From<$type> for Expr<F, V> {
+            #[inline]
+            fn from(value: $type) -> Self {
+                Expr::Const(F::from(value as u64))
+            }
+        }
+
+        impl<F: From<u64>, V> $crate::poly::ToExpr<F, V> for $type {
+            #[inline]
+            fn expr(&self) -> Expr<F, V> {
+                Expr::Const(F::from(*self as u64))
+            }
+        }
+
+        impl<F: From<u64>> $crate::poly::ToField<F> for $type {
+            #[inline]
+            fn field(&self) -> F {
+                F::from(*self as u64)
+            }
+        }
+    };
+}
+
+impl_expr_like!(bool);
+impl_expr_like!(u8);
+impl_expr_like!(u32);
+impl_expr_like!(u64);
+impl_expr_like!(usize);
+
+impl<F: Field + From<u64>, V> From<i32> for Expr<F, V> {
+    #[inline]
+    fn from(value: i32) -> Self {
+        Expr::Const(
+            F::from(value.unsigned_abs() as u64)
+                * if value.is_negative() { -F::ONE } else { F::ONE },
+        )
+    }
+}
+
+impl<F: Field + From<u64>, V> ToExpr<F, V> for i32 {
+    #[inline]
+    fn expr(&self) -> Expr<F, V> {
+        Expr::Const(
+            F::from(self.unsigned_abs() as u64) * if self.is_negative() { -F::ONE } else { F::ONE },
+        )
+    }
+}
+
+impl<F: Field + From<u64>> ToField<F> for i32 {
+    #[inline]
+    fn field(&self) -> F {
+        F::from(self.unsigned_abs() as u64) * if self.is_negative() { -F::ONE } else { F::ONE }
+    }
+}
+
+impl<F, V> From<Expression<F>> for Expr<F, V> {
+    #[inline]
+    fn from(value: Expression<F>) -> Self {
+        Expr::Halo2Expr(value)
+    }
+}
+
+#[cfg(test)]
+mod test {
+    use halo2curves::bn256::Fr;
+
+    use crate::{field::Field, poly::VarAssignments};
+
+    use super::Expr;
+
+    #[test]
+    fn eval_const() {
+        use super::Expr::*;
+
+        let experiment: Expr<Fr, String> = Const(Fr::ONE);
+        let assignments: VarAssignments<Fr, String> = VarAssignments::default();
+
+        assert_eq!(experiment.eval(&assignments), Some(Fr::ONE))
+    }
+
+    #[test]
+    fn eval_var() {
+        use super::Expr::*;
+
+        let experiment: Expr<Fr, &str> = Query("a");
+        let mut assignments: VarAssignments<Fr, &str> = VarAssignments::default();
+        assignments.insert("a", Fr::ONE);
+
+        assert_eq!(experiment.eval(&assignments), Some(Fr::ONE))
+    }
+
+    #[test]
+    fn eval_expr() {
+        use super::Expr::*;
+
+        let experiment: Expr<Fr, &str> = (Query("a") * Query("b")) + Query("c") - Const(Fr::ONE);
+        let mut assignments: VarAssignments<Fr, &str> = VarAssignments::default();
+        assignments.insert("a", Fr::from(2));
+        assignments.insert("b", Fr::from(3));
+        assignments.insert("c", Fr::from(4));
+
+        assert_eq!(experiment.eval(&assignments), Some(Fr::from(9)))
+    }
+
+    #[test]
+    fn eval_expr_missing_var() {
+        use super::Expr::*;
+
+        let experiment: Expr<Fr, &str> = (Query("a") * Query("b")) + Query("c") - Const(Fr::ONE);
+        let mut assignments: VarAssignments<Fr, &str> = VarAssignments::default();
+        assignments.insert("a", Fr::from(2));
+        // REMOVE assignments.insert("b", Fr::from(3));
+        assignments.insert("c", Fr::from(4));
+
+        assert_eq!(experiment.eval(&assignments), None)
+    }
+}
+
\ No newline at end of file diff --git a/docs/apidocs/src/chiquito/stdlib.rs.html b/docs/apidocs/src/chiquito/stdlib.rs.html new file mode 100644 index 00000000..97a381cf --- /dev/null +++ b/docs/apidocs/src/chiquito/stdlib.rs.html @@ -0,0 +1,105 @@ +stdlib.rs - source
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+
use std::hash::Hash;
+
+use crate::field::Field;
+
+use crate::{
+    ast::query::Queriable,
+    frontend::dsl::{
+        cb::{Constraint, Typing},
+        StepTypeContext,
+    },
+    poly::ToExpr,
+    wit_gen::StepInstance,
+};
+
+pub struct IsZero<F> {
+    value_inv: Queriable<F>,
+    is_zero_constraint: Constraint<F>,
+}
+
+impl<F: Field + From<u64>> IsZero<F> {
+    pub fn setup<V: Into<Constraint<F>>>(
+        ctx: &mut StepTypeContext<F>,
+        value: V,
+        value_inv: Queriable<F>,
+    ) -> IsZero<F> {
+        let value: Constraint<F> = value.into();
+        let is_zero_expression = 1.expr() - (value.expr.clone() * value_inv);
+
+        ctx.constr(value.expr.clone() * is_zero_expression.clone());
+
+        let is_zero_constraint = Constraint {
+            expr: is_zero_expression,
+            annotation: format!("is_zero({:?})", value),
+            typing: Typing::Boolean,
+        };
+
+        IsZero {
+            value_inv,
+            is_zero_constraint,
+        }
+    }
+
+    pub fn is_zero(&self) -> Constraint<F> {
+        self.is_zero_constraint.clone()
+    }
+}
+
+impl<F: Field + Eq + Hash> IsZero<F> {
+    pub fn wg<WGC>(&self, ctx: &mut StepInstance<F>, value: F) {
+        ctx.assign(self.value_inv, value.mi());
+    }
+}
+
\ No newline at end of file diff --git a/docs/apidocs/src/chiquito/util.rs.html b/docs/apidocs/src/chiquito/util.rs.html new file mode 100644 index 00000000..7ee3876a --- /dev/null +++ b/docs/apidocs/src/chiquito/util.rs.html @@ -0,0 +1,17 @@ +util.rs - source
1
+2
+3
+4
+5
+6
+7
+8
+
use uuid::Uuid;
+
+#[allow(clippy::upper_case_acronyms)]
+pub type UUID = u128;
+
+pub fn uuid() -> UUID {
+    Uuid::now_v1(&[10; 6]).as_u128()
+}
+
\ No newline at end of file diff --git a/docs/apidocs/src/chiquito/wit_gen.rs.html b/docs/apidocs/src/chiquito/wit_gen.rs.html new file mode 100644 index 00000000..ee59b1bd --- /dev/null +++ b/docs/apidocs/src/chiquito/wit_gen.rs.html @@ -0,0 +1,963 @@ +wit_gen.rs - source
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+465
+466
+467
+468
+469
+470
+471
+472
+473
+474
+475
+476
+477
+478
+479
+480
+481
+
use std::{collections::HashMap, fmt, hash::Hash, rc::Rc};
+
+use crate::{
+    ast::{query::Queriable, ASTExpr, Circuit, StepTypeUUID},
+    field::Field,
+    frontend::dsl::StepTypeWGHandler,
+    util::UUID,
+};
+
+/// A struct that represents a witness generation context. It provides an interface for assigning
+/// values to witness columns in a circuit.
+#[derive(Debug, Default, Clone)]
+pub struct StepInstance<F> {
+    pub step_type_uuid: StepTypeUUID,
+    pub assignments: HashMap<Queriable<F>, F>,
+}
+
+impl<F: fmt::Debug> fmt::Display for StepInstance<F> {
+    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+        write!(f, "({}): ", self.step_type_uuid)?;
+        for (queriable, value) in self.assignments.iter() {
+            write!(f, "{:?} = {:?}, ", queriable, value)?;
+        }
+        Ok(())
+    }
+}
+
+impl<F> StepInstance<F> {
+    pub fn new(step_type_uuid: StepTypeUUID) -> StepInstance<F> {
+        StepInstance {
+            step_type_uuid,
+            assignments: HashMap::default(),
+        }
+    }
+}
+
+impl<F: Eq + Hash> StepInstance<F> {
+    /// Takes a `Queriable` object representing the witness column (lhs) and the value (rhs) to be
+    /// assigned.
+    pub fn assign(&mut self, lhs: Queriable<F>, rhs: F) {
+        self.assignments.insert(lhs, rhs);
+    }
+}
+
+pub type Witness<F> = Vec<StepInstance<F>>;
+
+#[derive(Debug, Default, Clone)]
+pub struct TraceWitness<F> {
+    pub step_instances: Witness<F>,
+}
+
+impl<F: fmt::Debug> fmt::Display for TraceWitness<F> {
+    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+        // get the decimal width based on the step_instances size, add extra one leading zero
+        let decimal_width = self.step_instances.len().checked_ilog10().unwrap_or(0) + 2;
+        // offset(step_uuid): assignations
+        for (i, step_instance) in self.step_instances.iter().enumerate() {
+            writeln!(
+                f,
+                "{:0>width$}{}",
+                i,
+                step_instance,
+                width = decimal_width as usize,
+            )?;
+        }
+        Ok(())
+    }
+}
+
+#[derive(Debug)]
+pub struct TraceContext<F> {
+    witness: TraceWitness<F>,
+    num_steps: usize,
+}
+
+impl<F: Default> TraceContext<F> {
+    pub fn new(num_steps: usize) -> Self {
+        Self {
+            witness: TraceWitness::default(),
+            num_steps,
+        }
+    }
+
+    pub fn get_witness(self) -> TraceWitness<F> {
+        self.witness
+    }
+}
+
+impl<F> TraceContext<F> {
+    pub fn add<Args, WG: Fn(&mut StepInstance<F>, Args) + 'static>(
+        &mut self,
+        step: &StepTypeWGHandler<F, Args, WG>,
+        args: Args,
+    ) {
+        let mut witness = StepInstance::new(step.uuid());
+
+        (*step.wg)(&mut witness, args);
+
+        self.witness.step_instances.push(witness);
+    }
+
+    // This function pads the rest of the circuit with the given StepTypeWGHandler
+    pub fn padding<Args, WG: Fn(&mut StepInstance<F>, Args) + 'static>(
+        &mut self,
+        step: &StepTypeWGHandler<F, Args, WG>,
+        args_fn: impl Fn() -> Args,
+    ) {
+        while self.witness.step_instances.len() < self.num_steps {
+            self.add(step, (args_fn)());
+        }
+    }
+}
+
+pub type Trace<F, TraceArgs> = dyn Fn(&mut TraceContext<F>, TraceArgs) + 'static;
+
+pub struct TraceGenerator<F, TraceArgs> {
+    trace: Rc<Trace<F, TraceArgs>>,
+    num_steps: usize,
+}
+
+impl<F, TraceArgs> Clone for TraceGenerator<F, TraceArgs> {
+    fn clone(&self) -> Self {
+        Self {
+            trace: self.trace.clone(),
+            num_steps: self.num_steps,
+        }
+    }
+}
+
+impl<F, TraceArgs> Default for TraceGenerator<F, TraceArgs> {
+    fn default() -> Self {
+        Self {
+            trace: Rc::new(|_, _| {}),
+            num_steps: 0,
+        }
+    }
+}
+
+impl<F: Default, TraceArgs> TraceGenerator<F, TraceArgs> {
+    pub fn new(trace: Rc<Trace<F, TraceArgs>>, num_steps: usize) -> Self {
+        Self { trace, num_steps }
+    }
+
+    pub fn generate(&self, args: TraceArgs) -> TraceWitness<F> {
+        let mut ctx = TraceContext::new(self.num_steps);
+
+        (self.trace)(&mut ctx, args);
+
+        ctx.get_witness()
+    }
+}
+
+#[derive(Debug, Clone)]
+pub struct AutoTraceGenerator<F> {
+    auto_signals: HashMap<UUID, HashMap<Queriable<F>, ASTExpr<F>>>,
+}
+
+impl<F> Default for AutoTraceGenerator<F> {
+    fn default() -> Self {
+        Self {
+            auto_signals: Default::default(),
+        }
+    }
+}
+
+impl<F: Clone, TraceArgs> From<&Circuit<F, TraceArgs>> for AutoTraceGenerator<F> {
+    fn from(circuit: &Circuit<F, TraceArgs>) -> Self {
+        let auto_signals = circuit
+            .step_types
+            .iter()
+            .map(|(&uuid, step_type)| (uuid, step_type.auto_signals.clone()))
+            .collect();
+
+        Self { auto_signals }
+    }
+}
+
+impl<F: Field + Eq + PartialEq + Hash + Clone> AutoTraceGenerator<F> {
+    pub fn generate(&self, mut witness: TraceWitness<F>) -> TraceWitness<F> {
+        for step_instance in witness.step_instances.iter_mut() {
+            let uuid = step_instance.step_type_uuid;
+
+            if let Some(auto_signals) = self.auto_signals.get(&uuid) {
+                self.step_gen(auto_signals, step_instance)
+            }
+        }
+
+        witness
+    }
+
+    fn step_gen(
+        &self,
+        auto_signals: &HashMap<Queriable<F>, ASTExpr<F>>,
+        witness: &mut StepInstance<F>,
+    ) {
+        let mut pending = auto_signals
+            .keys()
+            .filter(|s| witness.assignments.get(s).is_none())
+            .copied()
+            .collect::<Vec<Queriable<F>>>();
+
+        let mut pending_amount = pending.len();
+
+        while pending_amount > 0 {
+            pending = pending
+                .clone()
+                .into_iter()
+                .filter(|s| {
+                    if let Some(value) = auto_signals
+                        .get(s)
+                        .expect("auto definition not found")
+                        .eval(&witness.assignments)
+                    {
+                        witness.assign(*s, value)
+                    }
+
+                    witness.assignments.get(s).is_none()
+                })
+                .collect::<Vec<Queriable<F>>>()
+                .clone();
+
+            // in each round at least one new signal should be assigned
+            if pending.len() == pending_amount {
+                panic!("cannot infer some auto signals")
+            }
+            pending_amount = pending.len()
+        }
+    }
+}
+
+pub type FixedAssignment<F> = HashMap<Queriable<F>, Vec<F>>;
+
+/// A struct that can be used a fixed column generation context. It provides an interface for
+/// assigning values to fixed columns in a circuit at the specified offset.
+pub struct FixedGenContext<F> {
+    assignments: FixedAssignment<F>,
+    num_steps: usize,
+}
+
+impl<F: Field + Hash> FixedGenContext<F> {
+    pub fn new(num_steps: usize) -> Self {
+        Self {
+            assignments: Default::default(),
+            num_steps,
+        }
+    }
+
+    /// Takes a `Queriable` object representing the fixed column (lhs) and the value (rhs) to be
+    /// assigned.
+    pub fn assign(&mut self, offset: usize, lhs: Queriable<F>, rhs: F) {
+        if !Self::is_fixed_queriable(lhs) {
+            panic!("trying to assign non-fixed signal");
+        }
+
+        if let Some(assignments) = self.assignments.get_mut(&lhs) {
+            assignments[offset] = rhs;
+        } else {
+            let mut assignments = vec![F::ZERO; self.num_steps];
+            assignments[offset] = rhs;
+            self.assignments.insert(lhs, assignments);
+        }
+    }
+
+    pub fn get_assignments(self) -> FixedAssignment<F> {
+        self.assignments
+    }
+
+    fn is_fixed_queriable(q: Queriable<F>) -> bool {
+        matches!(q, Queriable::Halo2FixedQuery(_, _) | Queriable::Fixed(_, _))
+    }
+}
+
+#[cfg(test)]
+mod tests {
+    use super::*;
+    use crate::{
+        ast::{query::Queriable, FixedSignal, ForwardSignal},
+        frontend::dsl::StepTypeWGHandler,
+        util::uuid,
+    };
+    use halo2_proofs::halo2curves::bn256::Fr;
+
+    fn dummy_args_fn() {}
+
+    #[test]
+    fn test_padding_no_witness() {
+        let mut ctx = TraceContext::new(5);
+        let step = StepTypeWGHandler::new(uuid(), "dummy", |_: &mut StepInstance<i32>, _: ()| {});
+
+        assert_eq!(ctx.witness.step_instances.len(), 0);
+        ctx.padding(&step, dummy_args_fn);
+
+        assert_eq!(ctx.witness.step_instances.len(), 5);
+    }
+
+    #[test]
+    fn test_padding_partial_witness() {
+        let mut ctx = TraceContext::new(5);
+        let step = StepTypeWGHandler::new(uuid(), "dummy", |_: &mut StepInstance<i32>, _: ()| {});
+
+        dummy_args_fn();
+        ctx.add(&step, ());
+
+        assert_eq!(ctx.witness.step_instances.len(), 1);
+        ctx.padding(&step, dummy_args_fn);
+
+        assert_eq!(ctx.witness.step_instances.len(), 5);
+    }
+
+    #[test]
+    fn test_trace_witness_display() {
+        let display = format!(
+            "{}",
+            TraceWitness::<i32> {
+                step_instances: vec![
+                    StepInstance {
+                        step_type_uuid: 9,
+                        assignments: HashMap::from([
+                            (Queriable::Fixed(FixedSignal::new("a".into()), 0), 1),
+                            (Queriable::Fixed(FixedSignal::new("b".into()), 0), 2)
+                        ]),
+                    },
+                    StepInstance {
+                        step_type_uuid: 10,
+                        assignments: HashMap::from([
+                            (Queriable::Fixed(FixedSignal::new("a".into()), 0), 1),
+                            (Queriable::Fixed(FixedSignal::new("b".into()), 0), 2)
+                        ]),
+                    }
+                ]
+            }
+        );
+        println!("{}", display);
+    }
+
+    #[test]
+    fn test_fixed_gen_context() {
+        let mut ctx = FixedGenContext::new(3);
+        let fixed_signal = FixedSignal::new("dummy".to_owned());
+        let queriable = Queriable::Fixed(fixed_signal, 3);
+
+        ctx.assign(0, queriable, Fr::from(3));
+        let gt = vec![Fr::from(3), Fr::from(0), Fr::from(0)];
+        assert_eq!(*ctx.get_assignments().get_mut(&queriable).unwrap(), gt);
+    }
+
+    #[test]
+    fn test_fixed_gen_context_multiple() {
+        let mut ctx = FixedGenContext::new(3);
+        let fixed_signal = FixedSignal::new("dummy".to_owned());
+        let fixed_signal2 = FixedSignal::new("dummy2".to_owned());
+        let queriable = Queriable::Fixed(fixed_signal, 3);
+        let queriable2 = Queriable::Fixed(fixed_signal2, 3);
+
+        ctx.assign(0, queriable, Fr::from(3));
+        ctx.assign(2, queriable2, Fr::from(3));
+
+        let gt1 = vec![Fr::from(3), Fr::from(0), Fr::from(0)];
+        let gt2 = vec![Fr::from(0), Fr::from(0), Fr::from(3)];
+        let mut assignment = ctx.get_assignments();
+        assert_eq!(*assignment.get_mut(&queriable).unwrap(), gt1);
+        assert_eq!(*assignment.get_mut(&queriable2).unwrap(), gt2);
+    }
+
+    #[test]
+    fn test_auto_trace_gen() {
+        let a = Queriable::Forward(
+            ForwardSignal::new_with_id(uuid(), 0, "a".to_string()),
+            false,
+        );
+        let b = Queriable::Forward(
+            ForwardSignal::new_with_id(uuid(), 0, "b".to_string()),
+            false,
+        );
+        let c = Queriable::Forward(
+            ForwardSignal::new_with_id(uuid(), 0, "c".to_string()),
+            false,
+        );
+        let step_uuid = uuid();
+        let mut witness = TraceWitness::default();
+        witness.step_instances.push(StepInstance {
+            step_type_uuid: step_uuid,
+            assignments: HashMap::from([(a, Fr::ONE), (b, Fr::ONE)]),
+        });
+        witness.step_instances.push(StepInstance {
+            step_type_uuid: step_uuid,
+            assignments: HashMap::from([(a, Fr::ONE), (b, Fr::ONE), (c, Fr::ONE)]),
+        });
+
+        let generator = AutoTraceGenerator {
+            auto_signals: HashMap::from([(step_uuid, HashMap::from([(c, a + b)]))]),
+        };
+
+        let witness = generator.generate(witness);
+        assert_eq!(
+            witness.step_instances[0].assignments.get(&c),
+            Some(&Fr::from(2))
+        );
+        assert_eq!(
+            witness.step_instances[1].assignments.get(&c),
+            Some(&Fr::ONE)
+        );
+    }
+
+    #[test]
+    #[should_panic]
+    fn test_auto_trace_gen_panic() {
+        let a = Queriable::Forward(
+            ForwardSignal::new_with_id(uuid(), 0, "a".to_string()),
+            false,
+        );
+        let b = Queriable::Forward(
+            ForwardSignal::new_with_id(uuid(), 0, "b".to_string()),
+            false,
+        );
+        let c = Queriable::Forward(
+            ForwardSignal::new_with_id(uuid(), 0, "c".to_string()),
+            false,
+        );
+        let step_uuid = uuid();
+        let mut witness = TraceWitness::default();
+        witness.step_instances.push(StepInstance {
+            step_type_uuid: step_uuid,
+            assignments: HashMap::from([(a, Fr::ONE)]),
+        });
+
+        let generator = AutoTraceGenerator {
+            auto_signals: HashMap::from([(step_uuid, HashMap::from([(c, a + b)]))]),
+        };
+
+        generator.generate(witness);
+    }
+
+    #[test]
+    fn test_auto_trace_gen_dep() {
+        let a = Queriable::Forward(
+            ForwardSignal::new_with_id(uuid(), 0, "a".to_string()),
+            false,
+        );
+        let b = Queriable::Forward(
+            ForwardSignal::new_with_id(uuid(), 0, "b".to_string()),
+            false,
+        );
+        let c = Queriable::Forward(
+            ForwardSignal::new_with_id(uuid(), 0, "c".to_string()),
+            false,
+        );
+        let step_uuid = uuid();
+        let mut witness = TraceWitness::default();
+        witness.step_instances.push(StepInstance {
+            step_type_uuid: step_uuid,
+            assignments: HashMap::from([(a, Fr::ONE)]),
+        });
+        witness.step_instances.push(StepInstance {
+            step_type_uuid: step_uuid,
+            assignments: HashMap::from([(a, Fr::ONE), (c, Fr::ONE)]),
+        });
+
+        let generator = AutoTraceGenerator {
+            auto_signals: HashMap::from([(step_uuid, HashMap::from([(c, a + b), (b, a + 1)]))]),
+        };
+
+        let witness = generator.generate(witness);
+        assert_eq!(
+            witness.step_instances[0].assignments.get(&b),
+            Some(&Fr::from(2))
+        );
+        assert_eq!(
+            witness.step_instances[0].assignments.get(&c),
+            Some(&Fr::from(3))
+        );
+        assert_eq!(
+            witness.step_instances[1].assignments.get(&b),
+            Some(&Fr::from(2))
+        );
+        assert_eq!(
+            witness.step_instances[1].assignments.get(&c),
+            Some(&Fr::ONE)
+        );
+    }
+}
+
\ No newline at end of file diff --git a/docs/apidocs/static.files/COPYRIGHT-23e9bde6c69aea69.txt b/docs/apidocs/static.files/COPYRIGHT-23e9bde6c69aea69.txt new file mode 100644 index 00000000..1447df79 --- /dev/null +++ b/docs/apidocs/static.files/COPYRIGHT-23e9bde6c69aea69.txt @@ -0,0 +1,50 @@ +# REUSE-IgnoreStart + +These documentation pages include resources by third parties. This copyright +file applies only to those resources. The following third party resources are +included, and carry their own copyright notices and license terms: + +* Fira Sans (FiraSans-Regular.woff2, FiraSans-Medium.woff2): + + Copyright (c) 2014, Mozilla Foundation https://mozilla.org/ + with Reserved Font Name Fira Sans. + + Copyright (c) 2014, Telefonica S.A. + + Licensed under the SIL Open Font License, Version 1.1. + See FiraSans-LICENSE.txt. + +* rustdoc.css, main.js, and playpen.js: + + Copyright 2015 The Rust Developers. + Licensed under the Apache License, Version 2.0 (see LICENSE-APACHE.txt) or + the MIT license (LICENSE-MIT.txt) at your option. + +* normalize.css: + + Copyright (c) Nicolas Gallagher and Jonathan Neal. + Licensed under the MIT license (see LICENSE-MIT.txt). + +* Source Code Pro (SourceCodePro-Regular.ttf.woff2, + SourceCodePro-Semibold.ttf.woff2, SourceCodePro-It.ttf.woff2): + + Copyright 2010, 2012 Adobe Systems Incorporated (http://www.adobe.com/), + with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark + of Adobe Systems Incorporated in the United States and/or other countries. + + Licensed under the SIL Open Font License, Version 1.1. + See SourceCodePro-LICENSE.txt. + +* Source Serif 4 (SourceSerif4-Regular.ttf.woff2, SourceSerif4-Bold.ttf.woff2, + SourceSerif4-It.ttf.woff2): + + Copyright 2014-2021 Adobe (http://www.adobe.com/), with Reserved Font Name + 'Source'. All Rights Reserved. Source is a trademark of Adobe in the United + States and/or other countries. + + Licensed under the SIL Open Font License, Version 1.1. + See SourceSerif4-LICENSE.md. + +This copyright file is intended to be distributed with rustdoc output. + +# REUSE-IgnoreEnd diff --git a/docs/apidocs/static.files/FiraSans-LICENSE-db4b642586e02d97.txt b/docs/apidocs/static.files/FiraSans-LICENSE-db4b642586e02d97.txt new file mode 100644 index 00000000..d7e9c149 --- /dev/null +++ b/docs/apidocs/static.files/FiraSans-LICENSE-db4b642586e02d97.txt @@ -0,0 +1,98 @@ +// REUSE-IgnoreStart + +Digitized data copyright (c) 2012-2015, The Mozilla Foundation and Telefonica S.A. +with Reserved Font Name < Fira >, + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. + +// REUSE-IgnoreEnd diff --git a/docs/apidocs/static.files/FiraSans-Medium-8f9a781e4970d388.woff2 b/docs/apidocs/static.files/FiraSans-Medium-8f9a781e4970d388.woff2 new file mode 100644 index 00000000..7a1e5fc5 Binary files /dev/null and b/docs/apidocs/static.files/FiraSans-Medium-8f9a781e4970d388.woff2 differ diff --git a/docs/apidocs/static.files/FiraSans-Regular-018c141bf0843ffd.woff2 b/docs/apidocs/static.files/FiraSans-Regular-018c141bf0843ffd.woff2 new file mode 100644 index 00000000..e766e06c Binary files /dev/null and b/docs/apidocs/static.files/FiraSans-Regular-018c141bf0843ffd.woff2 differ diff --git a/docs/apidocs/static.files/LICENSE-APACHE-b91fa81cba47b86a.txt b/docs/apidocs/static.files/LICENSE-APACHE-b91fa81cba47b86a.txt new file mode 100644 index 00000000..16fe87b0 --- /dev/null +++ b/docs/apidocs/static.files/LICENSE-APACHE-b91fa81cba47b86a.txt @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + +Copyright [yyyy] [name of copyright owner] + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/docs/apidocs/static.files/LICENSE-MIT-65090b722b3f6c56.txt b/docs/apidocs/static.files/LICENSE-MIT-65090b722b3f6c56.txt new file mode 100644 index 00000000..31aa7938 --- /dev/null +++ b/docs/apidocs/static.files/LICENSE-MIT-65090b722b3f6c56.txt @@ -0,0 +1,23 @@ +Permission is hereby granted, free of charge, to any +person obtaining a copy of this software and associated +documentation files (the "Software"), to deal in the +Software without restriction, including without +limitation the rights to use, copy, modify, merge, +publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software +is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice +shall be included in all copies or substantial portions +of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF +ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED +TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT +SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR +IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. diff --git a/docs/apidocs/static.files/NanumBarunGothic-0f09457c7a19b7c6.ttf.woff2 b/docs/apidocs/static.files/NanumBarunGothic-0f09457c7a19b7c6.ttf.woff2 new file mode 100644 index 00000000..1866ad4b Binary files /dev/null and b/docs/apidocs/static.files/NanumBarunGothic-0f09457c7a19b7c6.ttf.woff2 differ diff --git a/docs/apidocs/static.files/NanumBarunGothic-LICENSE-18c5adf4b52b4041.txt b/docs/apidocs/static.files/NanumBarunGothic-LICENSE-18c5adf4b52b4041.txt new file mode 100644 index 00000000..4b3edc29 --- /dev/null +++ b/docs/apidocs/static.files/NanumBarunGothic-LICENSE-18c5adf4b52b4041.txt @@ -0,0 +1,103 @@ +// REUSE-IgnoreStart + +Copyright (c) 2010, NAVER Corporation (https://www.navercorp.com/), + +with Reserved Font Name Nanum, Naver Nanum, NanumGothic, Naver NanumGothic, +NanumMyeongjo, Naver NanumMyeongjo, NanumBrush, Naver NanumBrush, NanumPen, +Naver NanumPen, Naver NanumGothicEco, NanumGothicEco, Naver NanumMyeongjoEco, +NanumMyeongjoEco, Naver NanumGothicLight, NanumGothicLight, NanumBarunGothic, +Naver NanumBarunGothic, NanumSquareRound, NanumBarunPen, MaruBuri + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. + +// REUSE-IgnoreEnd diff --git a/docs/apidocs/static.files/SourceCodePro-It-1cc31594bf4f1f79.ttf.woff2 b/docs/apidocs/static.files/SourceCodePro-It-1cc31594bf4f1f79.ttf.woff2 new file mode 100644 index 00000000..462c34ef Binary files /dev/null and b/docs/apidocs/static.files/SourceCodePro-It-1cc31594bf4f1f79.ttf.woff2 differ diff --git a/docs/apidocs/static.files/SourceCodePro-LICENSE-d180d465a756484a.txt b/docs/apidocs/static.files/SourceCodePro-LICENSE-d180d465a756484a.txt new file mode 100644 index 00000000..0d2941e1 --- /dev/null +++ b/docs/apidocs/static.files/SourceCodePro-LICENSE-d180d465a756484a.txt @@ -0,0 +1,97 @@ +// REUSE-IgnoreStart + +Copyright 2010, 2012 Adobe Systems Incorporated (http://www.adobe.com/), with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of Adobe Systems Incorporated in the United States and/or other countries. + +This Font Software is licensed under the SIL Open Font License, Version 1.1. + +This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. + +// REUSE-IgnoreEnd diff --git a/docs/apidocs/static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2 b/docs/apidocs/static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2 new file mode 100644 index 00000000..10b558e0 Binary files /dev/null and b/docs/apidocs/static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2 differ diff --git a/docs/apidocs/static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2 b/docs/apidocs/static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2 new file mode 100644 index 00000000..5ec64eef Binary files /dev/null and b/docs/apidocs/static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2 differ diff --git a/docs/apidocs/static.files/SourceSerif4-Bold-a2c9cd1067f8b328.ttf.woff2 b/docs/apidocs/static.files/SourceSerif4-Bold-a2c9cd1067f8b328.ttf.woff2 new file mode 100644 index 00000000..181a07f6 Binary files /dev/null and b/docs/apidocs/static.files/SourceSerif4-Bold-a2c9cd1067f8b328.ttf.woff2 differ diff --git a/docs/apidocs/static.files/SourceSerif4-It-acdfaf1a8af734b1.ttf.woff2 b/docs/apidocs/static.files/SourceSerif4-It-acdfaf1a8af734b1.ttf.woff2 new file mode 100644 index 00000000..2ae08a7b Binary files /dev/null and b/docs/apidocs/static.files/SourceSerif4-It-acdfaf1a8af734b1.ttf.woff2 differ diff --git a/docs/apidocs/static.files/SourceSerif4-LICENSE-3bb119e13b1258b7.md b/docs/apidocs/static.files/SourceSerif4-LICENSE-3bb119e13b1258b7.md new file mode 100644 index 00000000..175fa4f4 --- /dev/null +++ b/docs/apidocs/static.files/SourceSerif4-LICENSE-3bb119e13b1258b7.md @@ -0,0 +1,98 @@ + + +Copyright 2014-2021 Adobe (http://www.adobe.com/), with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of Adobe in the United States and/or other countries. +Copyright 2014 - 2023 Adobe (http://www.adobe.com/), with Reserved Font Name ‘Source’. All Rights Reserved. Source is a trademark of Adobe in the United States and/or other countries. + +This Font Software is licensed under the SIL Open Font License, Version 1.1. + +This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. + + diff --git a/docs/apidocs/static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2 b/docs/apidocs/static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2 new file mode 100644 index 00000000..0263fc30 Binary files /dev/null and b/docs/apidocs/static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2 differ diff --git a/docs/apidocs/static.files/ayu-614652228113ac93.css b/docs/apidocs/static.files/ayu-614652228113ac93.css new file mode 100644 index 00000000..8fd09c9e --- /dev/null +++ b/docs/apidocs/static.files/ayu-614652228113ac93.css @@ -0,0 +1 @@ + :root{--main-background-color:#0f1419;--main-color:#c5c5c5;--settings-input-color:#ffb454;--settings-input-border-color:#999;--settings-button-color:#fff;--settings-button-border-focus:#e0e0e0;--sidebar-background-color:#14191f;--sidebar-background-color-hover:rgba(70,70,70,0.33);--code-block-background-color:#191f26;--scrollbar-track-background-color:transparent;--scrollbar-thumb-background-color:#5c6773;--scrollbar-color:#5c6773 #24292f;--headings-border-bottom-color:#5c6773;--border-color:#5c6773;--button-background-color:#141920;--right-side-color:grey;--code-attribute-color:#999;--toggles-color:#999;--toggle-filter:invert(100%);--search-input-focused-border-color:#5c6773;--copy-path-button-color:#fff;--copy-path-img-filter:invert(70%);--copy-path-img-hover-filter:invert(100%);--codeblock-error-hover-color:rgb(255,0,0);--codeblock-error-color:rgba(255,0,0,.5);--codeblock-ignore-hover-color:rgb(255,142,0);--codeblock-ignore-color:rgba(255,142,0,.6);--type-link-color:#ffa0a5;--trait-link-color:#39afd7;--assoc-item-link-color:#39afd7;--function-link-color:#fdd687;--macro-link-color:#a37acc;--keyword-link-color:#39afd7;--mod-link-color:#39afd7;--link-color:#39afd7;--sidebar-link-color:#53b1db;--sidebar-current-link-background-color:transparent;--search-result-link-focus-background-color:#3c3c3c;--search-result-border-color:#aaa3;--search-color:#fff;--search-error-code-background-color:#4f4c4c;--search-results-alias-color:#c5c5c5;--search-results-grey-color:#999;--search-tab-title-count-color:#888;--search-tab-button-not-selected-border-top-color:none;--search-tab-button-not-selected-background:transparent !important;--search-tab-button-selected-border-top-color:none;--search-tab-button-selected-background:#141920 !important;--stab-background-color:#314559;--stab-code-color:#e6e1cf;--code-highlight-kw-color:#ff7733;--code-highlight-kw-2-color:#ff7733;--code-highlight-lifetime-color:#ff7733;--code-highlight-prelude-color:#69f2df;--code-highlight-prelude-val-color:#ff7733;--code-highlight-number-color:#b8cc52;--code-highlight-string-color:#b8cc52;--code-highlight-literal-color:#ff7733;--code-highlight-attribute-color:#e6e1cf;--code-highlight-self-color:#36a3d9;--code-highlight-macro-color:#a37acc;--code-highlight-question-mark-color:#ff9011;--code-highlight-comment-color:#788797;--code-highlight-doc-comment-color:#a1ac88;--src-line-numbers-span-color:#5c6773;--src-line-number-highlighted-background-color:rgba(255,236,164,0.06);--test-arrow-color:#788797;--test-arrow-background-color:rgba(57,175,215,0.09);--test-arrow-hover-color:#c5c5c5;--test-arrow-hover-background-color:rgba(57,175,215,0.368);--target-background-color:rgba(255,236,164,0.06);--target-border-color:rgba(255,180,76,0.85);--kbd-color:#c5c5c5;--kbd-background:#314559;--kbd-box-shadow-color:#5c6773;--rust-logo-filter:drop-shadow(1px 0 0px #fff) drop-shadow(0 1px 0 #fff) drop-shadow(-1px 0 0 #fff) drop-shadow(0 -1px 0 #fff);--crate-search-div-filter:invert(41%) sepia(12%) saturate(487%) hue-rotate(171deg) brightness(94%) contrast(94%);--crate-search-div-hover-filter:invert(98%) sepia(12%) saturate(81%) hue-rotate(343deg) brightness(113%) contrast(76%);--crate-search-hover-border:#e0e0e0;--source-sidebar-background-selected:#14191f;--source-sidebar-background-hover:#14191f;--table-alt-row-background-color:#191f26;--codeblock-link-background:#333;--scrape-example-toggle-line-background:#999;--scrape-example-toggle-line-hover-background:#c5c5c5;--scrape-example-code-line-highlight:rgb(91,59,1);--scrape-example-code-line-highlight-focus:rgb(124,75,15);--scrape-example-help-border-color:#aaa;--scrape-example-help-color:#eee;--scrape-example-help-hover-border-color:#fff;--scrape-example-help-hover-color:#fff;--scrape-example-code-wrapper-background-start:rgba(15,20,25,1);--scrape-example-code-wrapper-background-end:rgba(15,20,25,0);}h1,h2,h3,h4,h1 a,.sidebar h2 a,.sidebar h3 a,#source-sidebar>.title{color:#fff;}h4{border:none;}.docblock code{color:#ffb454;}.docblock a>code{color:#39AFD7 !important;}.code-header,.docblock pre>code,pre,pre>code,.item-info code,.rustdoc.source .example-wrap{color:#e6e1cf;}.sidebar .current,.sidebar a:hover,#source-sidebar div.files>a:hover,details.dir-entry summary:hover,#source-sidebar div.files>a:focus,details.dir-entry summary:focus,#source-sidebar div.files>a.selected{color:#ffb44c;}.sidebar-elems .location{color:#ff7733;}.src-line-numbers .line-highlighted{color:#708090;padding-right:7px;border-right:1px solid #ffb44c;}.search-results a:hover,.search-results a:focus{color:#fff !important;background-color:#3c3c3c;}.search-results a{color:#0096cf;}.search-results a div.desc{color:#c5c5c5;}.result-name .primitive>i,.result-name .keyword>i{color:#788797;}#search-tabs>button.selected{border-bottom:1px solid #ffb44c !important;border-top:none;}#search-tabs>button:not(.selected){border:none;background-color:transparent !important;}#search-tabs>button:hover{border-bottom:1px solid rgba(242,151,24,0.3);}#settings-menu>a img{filter:invert(100);} \ No newline at end of file diff --git a/docs/apidocs/static.files/clipboard-7571035ce49a181d.svg b/docs/apidocs/static.files/clipboard-7571035ce49a181d.svg new file mode 100644 index 00000000..8adbd996 --- /dev/null +++ b/docs/apidocs/static.files/clipboard-7571035ce49a181d.svg @@ -0,0 +1 @@ + diff --git a/docs/apidocs/static.files/dark-1097f8e92a01e3cf.css b/docs/apidocs/static.files/dark-1097f8e92a01e3cf.css new file mode 100644 index 00000000..1e5e7d19 --- /dev/null +++ b/docs/apidocs/static.files/dark-1097f8e92a01e3cf.css @@ -0,0 +1 @@ +:root{--main-background-color:#353535;--main-color:#ddd;--settings-input-color:#2196f3;--settings-input-border-color:#999;--settings-button-color:#000;--settings-button-border-focus:#ffb900;--sidebar-background-color:#505050;--sidebar-background-color-hover:#676767;--code-block-background-color:#2A2A2A;--scrollbar-track-background-color:#717171;--scrollbar-thumb-background-color:rgba(32,34,37,.6);--scrollbar-color:rgba(32,34,37,.6) #5a5a5a;--headings-border-bottom-color:#d2d2d2;--border-color:#e0e0e0;--button-background-color:#f0f0f0;--right-side-color:grey;--code-attribute-color:#999;--toggles-color:#999;--toggle-filter:invert(100%);--search-input-focused-border-color:#008dfd;--copy-path-button-color:#999;--copy-path-img-filter:invert(50%);--copy-path-img-hover-filter:invert(65%);--codeblock-error-hover-color:rgb(255,0,0);--codeblock-error-color:rgba(255,0,0,.5);--codeblock-ignore-hover-color:rgb(255,142,0);--codeblock-ignore-color:rgba(255,142,0,.6);--type-link-color:#2dbfb8;--trait-link-color:#b78cf2;--assoc-item-link-color:#d2991d;--function-link-color:#2bab63;--macro-link-color:#09bd00;--keyword-link-color:#d2991d;--mod-link-color:#d2991d;--link-color:#d2991d;--sidebar-link-color:#fdbf35;--sidebar-current-link-background-color:#444;--search-result-link-focus-background-color:#616161;--search-result-border-color:#aaa3;--search-color:#111;--search-error-code-background-color:#484848;--search-results-alias-color:#fff;--search-results-grey-color:#ccc;--search-tab-title-count-color:#888;--search-tab-button-not-selected-border-top-color:#252525;--search-tab-button-not-selected-background:#252525;--search-tab-button-selected-border-top-color:#0089ff;--search-tab-button-selected-background:#353535;--stab-background-color:#314559;--stab-code-color:#e6e1cf;--code-highlight-kw-color:#ab8ac1;--code-highlight-kw-2-color:#769acb;--code-highlight-lifetime-color:#d97f26;--code-highlight-prelude-color:#769acb;--code-highlight-prelude-val-color:#ee6868;--code-highlight-number-color:#83a300;--code-highlight-string-color:#83a300;--code-highlight-literal-color:#ee6868;--code-highlight-attribute-color:#ee6868;--code-highlight-self-color:#ee6868;--code-highlight-macro-color:#3e999f;--code-highlight-question-mark-color:#ff9011;--code-highlight-comment-color:#8d8d8b;--code-highlight-doc-comment-color:#8ca375;--src-line-numbers-span-color:#3b91e2;--src-line-number-highlighted-background-color:#0a042f;--test-arrow-color:#dedede;--test-arrow-background-color:rgba(78,139,202,0.2);--test-arrow-hover-color:#dedede;--test-arrow-hover-background-color:#4e8bca;--target-background-color:#494a3d;--target-border-color:#bb7410;--kbd-color:#000;--kbd-background:#fafbfc;--kbd-box-shadow-color:#c6cbd1;--rust-logo-filter:drop-shadow(1px 0 0px #fff) drop-shadow(0 1px 0 #fff) drop-shadow(-1px 0 0 #fff) drop-shadow(0 -1px 0 #fff);--crate-search-div-filter:invert(94%) sepia(0%) saturate(721%) hue-rotate(255deg) brightness(90%) contrast(90%);--crate-search-div-hover-filter:invert(69%) sepia(60%) saturate(6613%) hue-rotate(184deg) brightness(100%) contrast(91%);--crate-search-hover-border:#2196f3;--source-sidebar-background-selected:#333;--source-sidebar-background-hover:#444;--table-alt-row-background-color:#2A2A2A;--codeblock-link-background:#333;--scrape-example-toggle-line-background:#999;--scrape-example-toggle-line-hover-background:#c5c5c5;--scrape-example-code-line-highlight:rgb(91,59,1);--scrape-example-code-line-highlight-focus:rgb(124,75,15);--scrape-example-help-border-color:#aaa;--scrape-example-help-color:#eee;--scrape-example-help-hover-border-color:#fff;--scrape-example-help-hover-color:#fff;--scrape-example-code-wrapper-background-start:rgba(53,53,53,1);--scrape-example-code-wrapper-background-end:rgba(53,53,53,0);} \ No newline at end of file diff --git a/docs/apidocs/static.files/favicon-16x16-8b506e7a72182f1c.png b/docs/apidocs/static.files/favicon-16x16-8b506e7a72182f1c.png new file mode 100644 index 00000000..ea4b45ca Binary files /dev/null and b/docs/apidocs/static.files/favicon-16x16-8b506e7a72182f1c.png differ diff --git a/docs/apidocs/static.files/favicon-2c020d218678b618.svg b/docs/apidocs/static.files/favicon-2c020d218678b618.svg new file mode 100644 index 00000000..8b34b511 --- /dev/null +++ b/docs/apidocs/static.files/favicon-2c020d218678b618.svg @@ -0,0 +1,24 @@ + + + + + diff --git a/docs/apidocs/static.files/favicon-32x32-422f7d1d52889060.png b/docs/apidocs/static.files/favicon-32x32-422f7d1d52889060.png new file mode 100644 index 00000000..69b8613c Binary files /dev/null and b/docs/apidocs/static.files/favicon-32x32-422f7d1d52889060.png differ diff --git a/docs/apidocs/static.files/light-0f8c037637f9eb3e.css b/docs/apidocs/static.files/light-0f8c037637f9eb3e.css new file mode 100644 index 00000000..21c3a859 --- /dev/null +++ b/docs/apidocs/static.files/light-0f8c037637f9eb3e.css @@ -0,0 +1 @@ +:root{--main-background-color:white;--main-color:black;--settings-input-color:#2196f3;--settings-input-border-color:#717171;--settings-button-color:#000;--settings-button-border-focus:#717171;--sidebar-background-color:#F5F5F5;--sidebar-background-color-hover:#E0E0E0;--code-block-background-color:#F5F5F5;--scrollbar-track-background-color:#dcdcdc;--scrollbar-thumb-background-color:rgba(36,37,39,0.6);--scrollbar-color:rgba(36,37,39,0.6) #d9d9d9;--headings-border-bottom-color:#ddd;--border-color:#e0e0e0;--button-background-color:#fff;--right-side-color:grey;--code-attribute-color:#999;--toggles-color:#999;--toggle-filter:none;--search-input-focused-border-color:#66afe9;--copy-path-button-color:#999;--copy-path-img-filter:invert(50%);--copy-path-img-hover-filter:invert(35%);--codeblock-error-hover-color:rgb(255,0,0);--codeblock-error-color:rgba(255,0,0,.5);--codeblock-ignore-hover-color:rgb(255,142,0);--codeblock-ignore-color:rgba(255,142,0,.6);--type-link-color:#ad378a;--trait-link-color:#6e4fc9;--assoc-item-link-color:#3873ad;--function-link-color:#ad7c37;--macro-link-color:#068000;--keyword-link-color:#3873ad;--mod-link-color:#3873ad;--link-color:#3873ad;--sidebar-link-color:#356da4;--sidebar-current-link-background-color:#fff;--search-result-link-focus-background-color:#ccc;--search-result-border-color:#aaa3;--search-color:#000;--search-error-code-background-color:#d0cccc;--search-results-alias-color:#000;--search-results-grey-color:#999;--search-tab-title-count-color:#888;--search-tab-button-not-selected-border-top-color:#e6e6e6;--search-tab-button-not-selected-background:#e6e6e6;--search-tab-button-selected-border-top-color:#0089ff;--search-tab-button-selected-background:#ffffff;--stab-background-color:#fff5d6;--stab-code-color:#000;--code-highlight-kw-color:#8959a8;--code-highlight-kw-2-color:#4271ae;--code-highlight-lifetime-color:#b76514;--code-highlight-prelude-color:#4271ae;--code-highlight-prelude-val-color:#c82829;--code-highlight-number-color:#718c00;--code-highlight-string-color:#718c00;--code-highlight-literal-color:#c82829;--code-highlight-attribute-color:#c82829;--code-highlight-self-color:#c82829;--code-highlight-macro-color:#3e999f;--code-highlight-question-mark-color:#ff9011;--code-highlight-comment-color:#8e908c;--code-highlight-doc-comment-color:#4d4d4c;--src-line-numbers-span-color:#c67e2d;--src-line-number-highlighted-background-color:#fdffd3;--test-arrow-color:#f5f5f5;--test-arrow-background-color:rgba(78,139,202,0.2);--test-arrow-hover-color:#f5f5f5;--test-arrow-hover-background-color:#4e8bca;--target-background-color:#fdffd3;--target-border-color:#ad7c37;--kbd-color:#000;--kbd-background:#fafbfc;--kbd-box-shadow-color:#c6cbd1;--rust-logo-filter:initial;--crate-search-div-filter:invert(100%) sepia(0%) saturate(4223%) hue-rotate(289deg) brightness(114%) contrast(76%);--crate-search-div-hover-filter:invert(44%) sepia(18%) saturate(23%) hue-rotate(317deg) brightness(96%) contrast(93%);--crate-search-hover-border:#717171;--source-sidebar-background-selected:#fff;--source-sidebar-background-hover:#e0e0e0;--table-alt-row-background-color:#F5F5F5;--codeblock-link-background:#eee;--scrape-example-toggle-line-background:#ccc;--scrape-example-toggle-line-hover-background:#999;--scrape-example-code-line-highlight:#fcffd6;--scrape-example-code-line-highlight-focus:#f6fdb0;--scrape-example-help-border-color:#555;--scrape-example-help-color:#333;--scrape-example-help-hover-border-color:#000;--scrape-example-help-hover-color:#000;--scrape-example-code-wrapper-background-start:rgba(255,255,255,1);--scrape-example-code-wrapper-background-end:rgba(255,255,255,0);} \ No newline at end of file diff --git a/docs/apidocs/static.files/main-f0540c1d82cde29b.js b/docs/apidocs/static.files/main-f0540c1d82cde29b.js new file mode 100644 index 00000000..2fa29025 --- /dev/null +++ b/docs/apidocs/static.files/main-f0540c1d82cde29b.js @@ -0,0 +1,7 @@ +"use strict";function resourcePath(basename,extension){return getVar("root-path")+basename+getVar("resource-suffix")+extension}function hideMain(){addClass(document.getElementById(MAIN_ID),"hidden")}function showMain(){removeClass(document.getElementById(MAIN_ID),"hidden")}function elemIsInParent(elem,parent){while(elem&&elem!==document.body){if(elem===parent){return true}elem=elem.parentElement}return false}function blurHandler(event,parentElem,hideCallback){if(!elemIsInParent(document.activeElement,parentElem)&&!elemIsInParent(event.relatedTarget,parentElem)){hideCallback()}}window.rootPath=getVar("root-path");window.currentCrate=getVar("current-crate");function setMobileTopbar(){const mobileLocationTitle=document.querySelector(".mobile-topbar h2");const locationTitle=document.querySelector(".sidebar h2.location");if(mobileLocationTitle&&locationTitle){mobileLocationTitle.innerHTML=locationTitle.innerHTML}}function getVirtualKey(ev){if("key"in ev&&typeof ev.key!=="undefined"){return ev.key}const c=ev.charCode||ev.keyCode;if(c===27){return"Escape"}return String.fromCharCode(c)}const MAIN_ID="main-content";const SETTINGS_BUTTON_ID="settings-menu";const ALTERNATIVE_DISPLAY_ID="alternative-display";const NOT_DISPLAYED_ID="not-displayed";const HELP_BUTTON_ID="help-button";function getSettingsButton(){return document.getElementById(SETTINGS_BUTTON_ID)}function getHelpButton(){return document.getElementById(HELP_BUTTON_ID)}function getNakedUrl(){return window.location.href.split("?")[0].split("#")[0]}function insertAfter(newNode,referenceNode){referenceNode.parentNode.insertBefore(newNode,referenceNode.nextSibling)}function getOrCreateSection(id,classes){let el=document.getElementById(id);if(!el){el=document.createElement("section");el.id=id;el.className=classes;insertAfter(el,document.getElementById(MAIN_ID))}return el}function getAlternativeDisplayElem(){return getOrCreateSection(ALTERNATIVE_DISPLAY_ID,"content hidden")}function getNotDisplayedElem(){return getOrCreateSection(NOT_DISPLAYED_ID,"hidden")}function switchDisplayedElement(elemToDisplay){const el=getAlternativeDisplayElem();if(el.children.length>0){getNotDisplayedElem().appendChild(el.firstElementChild)}if(elemToDisplay===null){addClass(el,"hidden");showMain();return}el.appendChild(elemToDisplay);hideMain();removeClass(el,"hidden")}function browserSupportsHistoryApi(){return window.history&&typeof window.history.pushState==="function"}function loadCss(cssUrl){const link=document.createElement("link");link.href=cssUrl;link.rel="stylesheet";document.getElementsByTagName("head")[0].appendChild(link)}function preLoadCss(cssUrl){const link=document.createElement("link");link.href=cssUrl;link.rel="preload";link.as="style";document.getElementsByTagName("head")[0].appendChild(link)}(function(){const isHelpPage=window.location.pathname.endsWith("/help.html");function loadScript(url){const script=document.createElement("script");script.src=url;document.head.append(script)}getSettingsButton().onclick=event=>{if(event.ctrlKey||event.altKey||event.metaKey){return}window.hideAllModals(false);addClass(getSettingsButton(),"rotate");event.preventDefault();loadCss(getVar("static-root-path")+getVar("settings-css"));loadScript(getVar("static-root-path")+getVar("settings-js"));preLoadCss(getVar("static-root-path")+getVar("theme-light-css"));preLoadCss(getVar("static-root-path")+getVar("theme-dark-css"));preLoadCss(getVar("static-root-path")+getVar("theme-ayu-css"));setTimeout(()=>{const themes=getVar("themes").split(",");for(const theme of themes){if(theme!==""){preLoadCss(getVar("root-path")+theme+".css")}}},0)};window.searchState={loadingText:"Loading search results...",input:document.getElementsByClassName("search-input")[0],outputElement:()=>{let el=document.getElementById("search");if(!el){el=document.createElement("section");el.id="search";getNotDisplayedElem().appendChild(el)}return el},title:document.title,titleBeforeSearch:document.title,timeout:null,currentTab:0,focusedByTab:[null,null,null],clearInputTimeout:()=>{if(searchState.timeout!==null){clearTimeout(searchState.timeout);searchState.timeout=null}},isDisplayed:()=>searchState.outputElement().parentElement.id===ALTERNATIVE_DISPLAY_ID,focus:()=>{searchState.input.focus()},defocus:()=>{searchState.input.blur()},showResults:search=>{if(search===null||typeof search==="undefined"){search=searchState.outputElement()}switchDisplayedElement(search);searchState.mouseMovedAfterSearch=false;document.title=searchState.title},hideResults:()=>{switchDisplayedElement(null);document.title=searchState.titleBeforeSearch;if(browserSupportsHistoryApi()){history.replaceState(null,"",getNakedUrl()+window.location.hash)}},getQueryStringParams:()=>{const params={};window.location.search.substring(1).split("&").map(s=>{const pair=s.split("=");params[decodeURIComponent(pair[0])]=typeof pair[1]==="undefined"?null:decodeURIComponent(pair[1])});return params},setup:()=>{const search_input=searchState.input;if(!searchState.input){return}let searchLoaded=false;function loadSearch(){if(!searchLoaded){searchLoaded=true;loadScript(getVar("static-root-path")+getVar("search-js"));loadScript(resourcePath("search-index",".js"))}}search_input.addEventListener("focus",()=>{search_input.origPlaceholder=search_input.placeholder;search_input.placeholder="Type your search here.";loadSearch()});if(search_input.value!==""){loadSearch()}const params=searchState.getQueryStringParams();if(params.search!==undefined){searchState.setLoadingSearch();loadSearch()}},setLoadingSearch:()=>{const search=searchState.outputElement();search.innerHTML="

"+searchState.loadingText+"

";searchState.showResults(search)},};const toggleAllDocsId="toggle-all-docs";let savedHash="";function handleHashes(ev){if(ev!==null&&searchState.isDisplayed()&&ev.newURL){switchDisplayedElement(null);const hash=ev.newURL.slice(ev.newURL.indexOf("#")+1);if(browserSupportsHistoryApi()){history.replaceState(null,"",getNakedUrl()+window.location.search+"#"+hash)}const elem=document.getElementById(hash);if(elem){elem.scrollIntoView()}}const pageId=window.location.hash.replace(/^#/,"");if(savedHash!==pageId){savedHash=pageId;if(pageId!==""){expandSection(pageId)}}}function onHashChange(ev){hideSidebar();handleHashes(ev)}function openParentDetails(elem){while(elem){if(elem.tagName==="DETAILS"){elem.open=true}elem=elem.parentNode}}function expandSection(id){openParentDetails(document.getElementById(id))}function handleEscape(ev){searchState.clearInputTimeout();searchState.hideResults();ev.preventDefault();searchState.defocus();window.hideAllModals(true)}function handleShortcut(ev){const disableShortcuts=getSettingValue("disable-shortcuts")==="true";if(ev.ctrlKey||ev.altKey||ev.metaKey||disableShortcuts){return}if(document.activeElement.tagName==="INPUT"&&document.activeElement.type!=="checkbox"&&document.activeElement.type!=="radio"){switch(getVirtualKey(ev)){case"Escape":handleEscape(ev);break}}else{switch(getVirtualKey(ev)){case"Escape":handleEscape(ev);break;case"s":case"S":ev.preventDefault();searchState.focus();break;case"+":ev.preventDefault();expandAllDocs();break;case"-":ev.preventDefault();collapseAllDocs();break;case"?":showHelp();break;default:break}}}document.addEventListener("keypress",handleShortcut);document.addEventListener("keydown",handleShortcut);function addSidebarItems(){if(!window.SIDEBAR_ITEMS){return}const sidebar=document.getElementsByClassName("sidebar-elems")[0];function block(shortty,id,longty){const filtered=window.SIDEBAR_ITEMS[shortty];if(!filtered){return}const h3=document.createElement("h3");h3.innerHTML=`${longty}`;const ul=document.createElement("ul");ul.className="block "+shortty;for(const name of filtered){let path;if(shortty==="mod"){path=name+"/index.html"}else{path=shortty+"."+name+".html"}const current_page=document.location.href.split("/").pop();const link=document.createElement("a");link.href=path;if(path===current_page){link.className="current"}link.textContent=name;const li=document.createElement("li");li.appendChild(link);ul.appendChild(li)}sidebar.appendChild(h3);sidebar.appendChild(ul)}if(sidebar){block("primitive","primitives","Primitive Types");block("mod","modules","Modules");block("macro","macros","Macros");block("struct","structs","Structs");block("enum","enums","Enums");block("union","unions","Unions");block("constant","constants","Constants");block("static","static","Statics");block("trait","traits","Traits");block("fn","functions","Functions");block("type","types","Type Definitions");block("foreigntype","foreign-types","Foreign Types");block("keyword","keywords","Keywords");block("traitalias","trait-aliases","Trait Aliases")}}window.register_implementors=imp=>{const implementors=document.getElementById("implementors-list");const synthetic_implementors=document.getElementById("synthetic-implementors-list");const inlined_types=new Set();const TEXT_IDX=0;const SYNTHETIC_IDX=1;const TYPES_IDX=2;if(synthetic_implementors){onEachLazy(synthetic_implementors.getElementsByClassName("impl"),el=>{const aliases=el.getAttribute("data-aliases");if(!aliases){return}aliases.split(",").forEach(alias=>{inlined_types.add(alias)})})}let currentNbImpls=implementors.getElementsByClassName("impl").length;const traitName=document.querySelector(".main-heading h1 > .trait").textContent;const baseIdName="impl-"+traitName+"-";const libs=Object.getOwnPropertyNames(imp);const script=document.querySelector("script[data-ignore-extern-crates]");const ignoreExternCrates=new Set((script?script.getAttribute("data-ignore-extern-crates"):"").split(","));for(const lib of libs){if(lib===window.currentCrate||ignoreExternCrates.has(lib)){continue}const structs=imp[lib];struct_loop:for(const struct of structs){const list=struct[SYNTHETIC_IDX]?synthetic_implementors:implementors;if(struct[SYNTHETIC_IDX]){for(const struct_type of struct[TYPES_IDX]){if(inlined_types.has(struct_type)){continue struct_loop}inlined_types.add(struct_type)}}const code=document.createElement("h3");code.innerHTML=struct[TEXT_IDX];addClass(code,"code-header");onEachLazy(code.getElementsByTagName("a"),elem=>{const href=elem.getAttribute("href");if(href&&!/^(?:[a-z+]+:)?\/\//.test(href)){elem.setAttribute("href",window.rootPath+href)}});const currentId=baseIdName+currentNbImpls;const anchor=document.createElement("a");anchor.href="#"+currentId;addClass(anchor,"anchor");const display=document.createElement("div");display.id=currentId;addClass(display,"impl");display.appendChild(anchor);display.appendChild(code);list.appendChild(display);currentNbImpls+=1}}};if(window.pending_implementors){window.register_implementors(window.pending_implementors)}function addSidebarCrates(){if(!window.ALL_CRATES){return}const sidebarElems=document.getElementsByClassName("sidebar-elems")[0];if(!sidebarElems){return}const h3=document.createElement("h3");h3.innerHTML="Crates";const ul=document.createElement("ul");ul.className="block crate";for(const crate of window.ALL_CRATES){const link=document.createElement("a");link.href=window.rootPath+crate+"/index.html";if(window.rootPath!=="./"&&crate===window.currentCrate){link.className="current"}link.textContent=crate;const li=document.createElement("li");li.appendChild(link);ul.appendChild(li)}sidebarElems.appendChild(h3);sidebarElems.appendChild(ul)}function expandAllDocs(){const innerToggle=document.getElementById(toggleAllDocsId);removeClass(innerToggle,"will-expand");onEachLazy(document.getElementsByClassName("toggle"),e=>{if(!hasClass(e,"type-contents-toggle")&&!hasClass(e,"more-examples-toggle")){e.open=true}});innerToggle.title="collapse all docs";innerToggle.children[0].innerText="\u2212"}function collapseAllDocs(){const innerToggle=document.getElementById(toggleAllDocsId);addClass(innerToggle,"will-expand");onEachLazy(document.getElementsByClassName("toggle"),e=>{if(e.parentNode.id!=="implementations-list"||(!hasClass(e,"implementors-toggle")&&!hasClass(e,"type-contents-toggle"))){e.open=false}});innerToggle.title="expand all docs";innerToggle.children[0].innerText="+"}function toggleAllDocs(){const innerToggle=document.getElementById(toggleAllDocsId);if(!innerToggle){return}if(hasClass(innerToggle,"will-expand")){expandAllDocs()}else{collapseAllDocs()}}(function(){const toggles=document.getElementById(toggleAllDocsId);if(toggles){toggles.onclick=toggleAllDocs}const hideMethodDocs=getSettingValue("auto-hide-method-docs")==="true";const hideImplementations=getSettingValue("auto-hide-trait-implementations")==="true";const hideLargeItemContents=getSettingValue("auto-hide-large-items")!=="false";function setImplementorsTogglesOpen(id,open){const list=document.getElementById(id);if(list!==null){onEachLazy(list.getElementsByClassName("implementors-toggle"),e=>{e.open=open})}}if(hideImplementations){setImplementorsTogglesOpen("trait-implementations-list",false);setImplementorsTogglesOpen("blanket-implementations-list",false)}onEachLazy(document.getElementsByClassName("toggle"),e=>{if(!hideLargeItemContents&&hasClass(e,"type-contents-toggle")){e.open=true}if(hideMethodDocs&&hasClass(e,"method-toggle")){e.open=false}})}());window.rustdoc_add_line_numbers_to_examples=()=>{onEachLazy(document.getElementsByClassName("rust-example-rendered"),x=>{const parent=x.parentNode;const line_numbers=parent.querySelectorAll(".example-line-numbers");if(line_numbers.length>0){return}const count=x.textContent.split("\n").length;const elems=[];for(let i=0;i{onEachLazy(document.getElementsByClassName("rust-example-rendered"),x=>{const parent=x.parentNode;const line_numbers=parent.querySelectorAll(".example-line-numbers");for(const node of line_numbers){parent.removeChild(node)}})};if(getSettingValue("line-numbers")==="true"){window.rustdoc_add_line_numbers_to_examples()}function showSidebar(){window.hideAllModals(false);const sidebar=document.getElementsByClassName("sidebar")[0];addClass(sidebar,"shown")}function hideSidebar(){const sidebar=document.getElementsByClassName("sidebar")[0];removeClass(sidebar,"shown")}window.addEventListener("resize",()=>{if(window.CURRENT_TOOLTIP_ELEMENT){const base=window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE;const force_visible=base.TOOLTIP_FORCE_VISIBLE;hideTooltip(false);if(force_visible){showTooltip(base);base.TOOLTIP_FORCE_VISIBLE=true}}});const mainElem=document.getElementById(MAIN_ID);if(mainElem){mainElem.addEventListener("click",hideSidebar)}onEachLazy(document.querySelectorAll("a[href^='#']"),el=>{el.addEventListener("click",()=>{expandSection(el.hash.slice(1));hideSidebar()})});onEachLazy(document.querySelectorAll(".toggle > summary:not(.hideme)"),el=>{el.addEventListener("click",e=>{if(e.target.tagName!=="SUMMARY"&&e.target.tagName!=="A"){e.preventDefault()}})});function showTooltip(e){const notable_ty=e.getAttribute("data-notable-ty");if(!window.NOTABLE_TRAITS&¬able_ty){const data=document.getElementById("notable-traits-data");if(data){window.NOTABLE_TRAITS=JSON.parse(data.innerText)}else{throw new Error("showTooltip() called with notable without any notable traits!")}}if(window.CURRENT_TOOLTIP_ELEMENT&&window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE===e){return}window.hideAllModals(false);const wrapper=document.createElement("div");if(notable_ty){wrapper.innerHTML="
"+window.NOTABLE_TRAITS[notable_ty]+"
"}else if(e.getAttribute("title")!==undefined){const titleContent=document.createElement("div");titleContent.className="content";titleContent.appendChild(document.createTextNode(e.getAttribute("title")));wrapper.appendChild(titleContent)}wrapper.className="tooltip popover";const focusCatcher=document.createElement("div");focusCatcher.setAttribute("tabindex","0");focusCatcher.onfocus=hideTooltip;wrapper.appendChild(focusCatcher);const pos=e.getBoundingClientRect();wrapper.style.top=(pos.top+window.scrollY+pos.height)+"px";wrapper.style.left=0;wrapper.style.right="auto";wrapper.style.visibility="hidden";const body=document.getElementsByTagName("body")[0];body.appendChild(wrapper);const wrapperPos=wrapper.getBoundingClientRect();const finalPos=pos.left+window.scrollX-wrapperPos.width+24;if(finalPos>0){wrapper.style.left=finalPos+"px"}else{wrapper.style.setProperty("--popover-arrow-offset",(wrapperPos.right-pos.right+4)+"px")}wrapper.style.visibility="";window.CURRENT_TOOLTIP_ELEMENT=wrapper;window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE=e;wrapper.onpointerleave=function(ev){if(ev.pointerType!=="mouse"){return}if(!e.TOOLTIP_FORCE_VISIBLE&&!elemIsInParent(event.relatedTarget,e)){hideTooltip(true)}}}function tooltipBlurHandler(event){if(window.CURRENT_TOOLTIP_ELEMENT&&!elemIsInParent(document.activeElement,window.CURRENT_TOOLTIP_ELEMENT)&&!elemIsInParent(event.relatedTarget,window.CURRENT_TOOLTIP_ELEMENT)&&!elemIsInParent(document.activeElement,window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE)&&!elemIsInParent(event.relatedTarget,window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE)){setTimeout(()=>hideTooltip(false),0)}}function hideTooltip(focus){if(window.CURRENT_TOOLTIP_ELEMENT){if(window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE.TOOLTIP_FORCE_VISIBLE){if(focus){window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE.focus()}window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE.TOOLTIP_FORCE_VISIBLE=false}const body=document.getElementsByTagName("body")[0];body.removeChild(window.CURRENT_TOOLTIP_ELEMENT);window.CURRENT_TOOLTIP_ELEMENT=null}}onEachLazy(document.getElementsByClassName("tooltip"),e=>{e.onclick=function(){this.TOOLTIP_FORCE_VISIBLE=this.TOOLTIP_FORCE_VISIBLE?false:true;if(window.CURRENT_TOOLTIP_ELEMENT&&!this.TOOLTIP_FORCE_VISIBLE){hideTooltip(true)}else{showTooltip(this);window.CURRENT_TOOLTIP_ELEMENT.setAttribute("tabindex","0");window.CURRENT_TOOLTIP_ELEMENT.focus();window.CURRENT_TOOLTIP_ELEMENT.onblur=tooltipBlurHandler}return false};e.onpointerenter=function(ev){if(ev.pointerType!=="mouse"){return}showTooltip(this)};e.onpointerleave=function(ev){if(ev.pointerType!=="mouse"){return}if(!this.TOOLTIP_FORCE_VISIBLE&&!elemIsInParent(ev.relatedTarget,window.CURRENT_TOOLTIP_ELEMENT)){hideTooltip(true)}}});const sidebar_menu_toggle=document.getElementsByClassName("sidebar-menu-toggle")[0];if(sidebar_menu_toggle){sidebar_menu_toggle.addEventListener("click",()=>{const sidebar=document.getElementsByClassName("sidebar")[0];if(!hasClass(sidebar,"shown")){showSidebar()}else{hideSidebar()}})}function helpBlurHandler(event){blurHandler(event,getHelpButton(),window.hidePopoverMenus)}function buildHelpMenu(){const book_info=document.createElement("span");book_info.className="top";book_info.innerHTML="You can find more information in \ + the rustdoc book.";const shortcuts=[["?","Show this help dialog"],["S","Focus the search field"],["↑","Move up in search results"],["↓","Move down in search results"],["← / →","Switch result tab (when results focused)"],["⏎","Go to active search result"],["+","Expand all sections"],["-","Collapse all sections"],].map(x=>"
"+x[0].split(" ").map((y,index)=>((index&1)===0?""+y+"":" "+y+" ")).join("")+"
"+x[1]+"
").join("");const div_shortcuts=document.createElement("div");addClass(div_shortcuts,"shortcuts");div_shortcuts.innerHTML="

Keyboard Shortcuts

"+shortcuts+"
";const infos=["Prefix searches with a type followed by a colon (e.g., fn:) to \ + restrict the search to a given item kind.","Accepted kinds are: fn, mod, struct, \ + enum, trait, type, macro, \ + and const.","Search functions by type signature (e.g., vec -> usize or \ + -> vec or String, enum:Cow -> bool)","You can look for items with an exact name by putting double quotes around \ + your request: \"string\"","Look for items inside another one by searching for a path: vec::Vec",].map(x=>"

"+x+"

").join("");const div_infos=document.createElement("div");addClass(div_infos,"infos");div_infos.innerHTML="

Search Tricks

"+infos;const rustdoc_version=document.createElement("span");rustdoc_version.className="bottom";const rustdoc_version_code=document.createElement("code");rustdoc_version_code.innerText="rustdoc "+getVar("rustdoc-version");rustdoc_version.appendChild(rustdoc_version_code);const container=document.createElement("div");if(!isHelpPage){container.className="popover"}container.id="help";container.style.display="none";const side_by_side=document.createElement("div");side_by_side.className="side-by-side";side_by_side.appendChild(div_shortcuts);side_by_side.appendChild(div_infos);container.appendChild(book_info);container.appendChild(side_by_side);container.appendChild(rustdoc_version);if(isHelpPage){const help_section=document.createElement("section");help_section.appendChild(container);document.getElementById("main-content").appendChild(help_section);container.style.display="block"}else{const help_button=getHelpButton();help_button.appendChild(container);container.onblur=helpBlurHandler;help_button.onblur=helpBlurHandler;help_button.children[0].onblur=helpBlurHandler}return container}window.hideAllModals=function(switchFocus){hideSidebar();window.hidePopoverMenus();hideTooltip(switchFocus)};window.hidePopoverMenus=function(){onEachLazy(document.querySelectorAll(".search-form .popover"),elem=>{elem.style.display="none"})};function getHelpMenu(buildNeeded){let menu=getHelpButton().querySelector(".popover");if(!menu&&buildNeeded){menu=buildHelpMenu()}return menu}function showHelp(){getHelpButton().querySelector("a").focus();const menu=getHelpMenu(true);if(menu.style.display==="none"){window.hideAllModals();menu.style.display=""}}if(isHelpPage){showHelp();document.querySelector(`#${HELP_BUTTON_ID} > a`).addEventListener("click",event=>{const target=event.target;if(target.tagName!=="A"||target.parentElement.id!==HELP_BUTTON_ID||event.ctrlKey||event.altKey||event.metaKey){return}event.preventDefault()})}else{document.querySelector(`#${HELP_BUTTON_ID} > a`).addEventListener("click",event=>{const target=event.target;if(target.tagName!=="A"||target.parentElement.id!==HELP_BUTTON_ID||event.ctrlKey||event.altKey||event.metaKey){return}event.preventDefault();const menu=getHelpMenu(true);const shouldShowHelp=menu.style.display==="none";if(shouldShowHelp){showHelp()}else{window.hidePopoverMenus()}})}setMobileTopbar();addSidebarItems();addSidebarCrates();onHashChange(null);window.addEventListener("hashchange",onHashChange);searchState.setup()}());(function(){let reset_button_timeout=null;const but=document.getElementById("copy-path");if(!but){return}but.onclick=()=>{const parent=but.parentElement;const path=[];onEach(parent.childNodes,child=>{if(child.tagName==="A"){path.push(child.textContent)}});const el=document.createElement("textarea");el.value=path.join("::");el.setAttribute("readonly","");el.style.position="absolute";el.style.left="-9999px";document.body.appendChild(el);el.select();document.execCommand("copy");document.body.removeChild(el);but.children[0].style.display="none";let tmp;if(but.childNodes.length<2){tmp=document.createTextNode("✓");but.appendChild(tmp)}else{onEachLazy(but.childNodes,e=>{if(e.nodeType===Node.TEXT_NODE){tmp=e;return true}});tmp.textContent="✓"}if(reset_button_timeout!==null){window.clearTimeout(reset_button_timeout)}function reset_button(){tmp.textContent="";reset_button_timeout=null;but.children[0].style.display=""}reset_button_timeout=window.setTimeout(reset_button,1000)}}()) \ No newline at end of file diff --git a/docs/apidocs/static.files/normalize-76eba96aa4d2e634.css b/docs/apidocs/static.files/normalize-76eba96aa4d2e634.css new file mode 100644 index 00000000..469959f1 --- /dev/null +++ b/docs/apidocs/static.files/normalize-76eba96aa4d2e634.css @@ -0,0 +1,2 @@ + /*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */ +html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}[type="button"],[type="reset"],[type="submit"],button{-webkit-appearance:button}[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none} \ No newline at end of file diff --git a/docs/apidocs/static.files/noscript-13285aec31fa243e.css b/docs/apidocs/static.files/noscript-13285aec31fa243e.css new file mode 100644 index 00000000..c32e0cb1 --- /dev/null +++ b/docs/apidocs/static.files/noscript-13285aec31fa243e.css @@ -0,0 +1 @@ + #main-content .attributes{margin-left:0 !important;}#copy-path{display:none;}nav.sub{display:none;}.source .sidebar{display:none;}.notable-traits{display:none;} \ No newline at end of file diff --git a/docs/apidocs/static.files/rust-logo-151179464ae7ed46.svg b/docs/apidocs/static.files/rust-logo-151179464ae7ed46.svg new file mode 100644 index 00000000..62424d8f --- /dev/null +++ b/docs/apidocs/static.files/rust-logo-151179464ae7ed46.svg @@ -0,0 +1,61 @@ + + + diff --git a/docs/apidocs/static.files/rustdoc-ba5701c5741a7b69.css b/docs/apidocs/static.files/rustdoc-ba5701c5741a7b69.css new file mode 100644 index 00000000..55584a76 --- /dev/null +++ b/docs/apidocs/static.files/rustdoc-ba5701c5741a7b69.css @@ -0,0 +1,8 @@ + :root{--nav-sub-mobile-padding:8px;}@font-face {font-family:'Fira Sans';font-style:normal;font-weight:400;src:local('Fira Sans'),url("FiraSans-Regular-018c141bf0843ffd.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Fira Sans';font-style:normal;font-weight:500;src:local('Fira Sans Medium'),url("FiraSans-Medium-8f9a781e4970d388.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Serif 4';font-style:normal;font-weight:400;src:local('Source Serif 4'),url("SourceSerif4-Regular-46f98efaafac5295.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Serif 4';font-style:italic;font-weight:400;src:local('Source Serif 4 Italic'),url("SourceSerif4-It-acdfaf1a8af734b1.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Serif 4';font-style:normal;font-weight:700;src:local('Source Serif 4 Bold'),url("SourceSerif4-Bold-a2c9cd1067f8b328.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Code Pro';font-style:normal;font-weight:400;src:url("SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Code Pro';font-style:italic;font-weight:400;src:url("SourceCodePro-It-1cc31594bf4f1f79.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Code Pro';font-style:normal;font-weight:600;src:url("SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'NanumBarunGothic';src:url("NanumBarunGothic-0f09457c7a19b7c6.ttf.woff2") format("woff2");font-display:swap;unicode-range:U+AC00-D7AF,U+1100-11FF,U+3130-318F,U+A960-A97F,U+D7B0-D7FF;}*{box-sizing:border-box;}body{font:1rem/1.5 "Source Serif 4",NanumBarunGothic,serif;margin:0;position:relative;overflow-wrap:break-word;overflow-wrap:anywhere;font-feature-settings:"kern","liga";background-color:var(--main-background-color);color:var(--main-color);}h1{font-size:1.5rem;}h2{font-size:1.375rem;}h3{font-size:1.25rem;}h1,h2,h3,h4,h5,h6{font-weight:500;}h1,h2,h3,h4{margin:25px 0 15px 0;padding-bottom:6px;}.docblock h3,.docblock h4,h5,h6{margin:15px 0 5px 0;}.docblock>h2:first-child,.docblock>h3:first-child,.docblock>h4:first-child,.docblock>h5:first-child,.docblock>h6:first-child{margin-top:0;}.main-heading h1{margin:0;padding:0;flex-grow:1;overflow-wrap:break-word;overflow-wrap:anywhere;}.main-heading{display:flex;flex-wrap:wrap;padding-bottom:6px;margin-bottom:15px;}.content h2,.top-doc .docblock>h3,.top-doc .docblock>h4{border-bottom:1px solid var(--headings-border-bottom-color);}h1,h2{line-height:1.25;padding-top:3px;padding-bottom:9px;}h3.code-header{font-size:1.125rem;}h4.code-header{font-size:1rem;}.code-header{font-weight:600;margin:0;padding:0;white-space:pre-wrap;}#crate-search,h1,h2,h3,h4,h5,h6,.sidebar,.mobile-topbar,.search-input,.search-results .result-name,.item-name>a,.out-of-band,span.since,a.srclink,#help-button>a,summary.hideme,.scraped-example-list,ul.all-items{font-family:"Fira Sans",Arial,NanumBarunGothic,sans-serif;}#toggle-all-docs,a.anchor,.small-section-header a,#source-sidebar a,.rust a,.sidebar h2 a,.sidebar h3 a,.mobile-topbar h2 a,h1 a,.search-results a,.stab,.result-name .primitive>i,.result-name .keyword>i{color:var(--main-color);}span.enum,a.enum,span.struct,a.struct,span.union,a.union,span.primitive,a.primitive,span.type,a.type,span.foreigntype,a.foreigntype{color:var(--type-link-color);}span.trait,a.trait,span.traitalias,a.traitalias{color:var(--trait-link-color);}span.associatedtype,a.associatedtype,span.constant,a.constant,span.static,a.static{color:var(--assoc-item-link-color);}span.fn,a.fn,span.method,a.method,span.tymethod,a.tymethod{color:var(--function-link-color);}span.attr,a.attr,span.derive,a.derive,span.macro,a.macro{color:var(--macro-link-color);}span.mod,a.mod{color:var(--mod-link-color);}span.keyword,a.keyword{color:var(--keyword-link-color);}a{color:var(--link-color);text-decoration:none;}ol,ul{padding-left:24px;}ul ul,ol ul,ul ol,ol ol{margin-bottom:.625em;}p{margin:0 0 .75em 0;}p:last-child{margin:0;}button{padding:1px 6px;cursor:pointer;}button#toggle-all-docs{padding:0;background:none;border:none;-webkit-appearance:none;opacity:1;}.rustdoc{display:flex;flex-direction:row;flex-wrap:nowrap;}main{position:relative;flex-grow:1;padding:10px 15px 40px 45px;min-width:0;}.source main{padding:15px;}.width-limiter{max-width:960px;margin-right:auto;}details:not(.toggle) summary{margin-bottom:.6em;}code,pre,a.test-arrow,.code-header{font-family:"Source Code Pro",monospace;}.docblock code,.docblock-short code{border-radius:3px;padding:0 0.125em;}.docblock pre code,.docblock-short pre code{padding:0;}pre{padding:14px;line-height:1.5;}pre.item-decl{overflow-x:auto;}.item-decl .type-contents-toggle{contain:initial;}.source .content pre{padding:20px;}.rustdoc.source .example-wrap pre.src-line-numbers{padding:20px 0 20px 4px;}img{max-width:100%;}.sub-logo-container,.logo-container{line-height:0;display:block;}.sub-logo-container{margin-right:32px;}.sub-logo-container>img{height:60px;width:60px;object-fit:contain;}.rust-logo{filter:var(--rust-logo-filter);}.sidebar{font-size:0.875rem;flex:0 0 200px;overflow-y:scroll;overscroll-behavior:contain;position:sticky;height:100vh;top:0;left:0;}.rustdoc.source .sidebar{flex-basis:50px;border-right:1px solid;overflow-x:hidden;overflow-y:hidden;z-index:1;}.sidebar,.mobile-topbar,.sidebar-menu-toggle,#src-sidebar-toggle,#source-sidebar{background-color:var(--sidebar-background-color);}#src-sidebar-toggle>button:hover,#src-sidebar-toggle>button:focus{background-color:var(--sidebar-background-color-hover);}.source .sidebar>*:not(#src-sidebar-toggle){visibility:hidden;}.source-sidebar-expanded .source .sidebar{overflow-y:auto;flex-basis:300px;}.source-sidebar-expanded .source .sidebar>*:not(#src-sidebar-toggle){visibility:visible;}#all-types{margin-top:1em;}*{scrollbar-width:initial;scrollbar-color:var(--scrollbar-color);}.sidebar{scrollbar-width:thin;scrollbar-color:var(--scrollbar-color);}::-webkit-scrollbar{width:12px;}.sidebar::-webkit-scrollbar{width:8px;}::-webkit-scrollbar-track{-webkit-box-shadow:inset 0;background-color:var(--scrollbar-track-background-color);}.sidebar::-webkit-scrollbar-track{background-color:var(--scrollbar-track-background-color);}::-webkit-scrollbar-thumb,.sidebar::-webkit-scrollbar-thumb{background-color:var(--scrollbar-thumb-background-color);}.hidden{display:none !important;}.sidebar .logo-container{margin-top:10px;margin-bottom:10px;text-align:center;}.version{overflow-wrap:break-word;}.logo-container>img{height:100px;width:100px;}ul.block,.block li{padding:0;margin:0;list-style:none;}.sidebar-elems a,.sidebar>h2 a{display:block;padding:0.25rem;margin-left:-0.25rem;}.sidebar h2{overflow-wrap:anywhere;padding:0;margin:0.7rem 0;}.sidebar h3{font-size:1.125rem;padding:0;margin:0;}.sidebar-elems,.sidebar>h2{padding-left:24px;}.sidebar a{color:var(--sidebar-link-color);}.sidebar .current,.sidebar a:hover:not(.logo-container){background-color:var(--sidebar-current-link-background-color);}.sidebar-elems .block{margin-bottom:2em;}.sidebar-elems .block li a{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;}.mobile-topbar{display:none;}.rustdoc .example-wrap{display:flex;position:relative;margin-bottom:10px;}.rustdoc .example-wrap:last-child{margin-bottom:0px;}.rustdoc .example-wrap pre{margin:0;flex-grow:1;}.rustdoc:not(.source) .example-wrap pre{overflow:auto hidden;}.rustdoc .example-wrap pre.example-line-numbers,.rustdoc .example-wrap pre.src-line-numbers{flex-grow:0;min-width:fit-content;overflow:initial;text-align:right;-webkit-user-select:none;user-select:none;padding:14px 8px;color:var(--src-line-numbers-span-color);}.rustdoc .example-wrap pre.src-line-numbers{padding:14px 0;}.src-line-numbers a,.src-line-numbers span{color:var(--src-line-numbers-span-color);padding:0 8px;}.src-line-numbers :target{background-color:transparent;border-right:none;padding:0 8px;}.src-line-numbers .line-highlighted{background-color:var(--src-line-number-highlighted-background-color);}.search-loading{text-align:center;}.docblock-short{overflow-wrap:break-word;overflow-wrap:anywhere;}.docblock :not(pre)>code,.docblock-short code{white-space:pre-wrap;}.top-doc .docblock h2{font-size:1.375rem;}.top-doc .docblock h3{font-size:1.25rem;}.top-doc .docblock h4,.top-doc .docblock h5{font-size:1.125rem;}.top-doc .docblock h6{font-size:1rem;}.docblock h5{font-size:1rem;}.docblock h6{font-size:0.875rem;}.docblock{margin-left:24px;position:relative;}.docblock>:not(.more-examples-toggle):not(.example-wrap){max-width:100%;overflow-x:auto;}.out-of-band{flex-grow:0;font-size:1.125rem;}.docblock code,.docblock-short code,pre,.rustdoc.source .example-wrap{background-color:var(--code-block-background-color);}#main-content{position:relative;}.docblock table{margin:.5em 0;border-collapse:collapse;}.docblock table td,.docblock table th{padding:.5em;border:1px solid var(--border-color);}.docblock table tbody tr:nth-child(2n){background:var(--table-alt-row-background-color);}.method .where,.fn .where,.where.fmt-newline{display:block;white-space:pre-wrap;font-size:0.875rem;}.item-info{display:block;margin-left:24px;}.item-info code{font-size:0.875rem;}#main-content>.item-info{margin-left:0;}nav.sub{flex-grow:1;flex-flow:row nowrap;margin:4px 0 25px 0;display:flex;align-items:center;}.search-form{position:relative;display:flex;height:34px;flex-grow:1;}.source nav.sub{margin:0 0 15px 0;}.small-section-header{display:block;position:relative;}.small-section-header:hover>.anchor,.impl:hover>.anchor,.trait-impl:hover>.anchor,.variant:hover>.anchor{display:initial;}.anchor{display:none;position:absolute;left:-0.5em;background:none !important;}.anchor.field{left:-5px;}.small-section-header>.anchor{left:-15px;padding-right:8px;}h2.small-section-header>.anchor{padding-right:6px;}.main-heading a:hover,.example-wrap .rust a:hover,.all-items a:hover,.docblock a:not(.test-arrow):not(.scrape-help):not(.tooltip):hover,.docblock-short a:not(.test-arrow):not(.scrape-help):not(.tooltip):hover,.item-info a{text-decoration:underline;}.crate.block a.current{font-weight:500;}table,.item-table{overflow-wrap:break-word;}.item-table{display:table;padding:0;margin:0;}.item-table>li{display:table-row;}.item-table>li>div{display:table-cell;}.item-table>li>.item-name{padding-right:1.25rem;}.search-results-title{margin-top:0;white-space:nowrap;display:flex;align-items:baseline;}#crate-search-div{position:relative;min-width:5em;}#crate-search{min-width:115px;padding:0 23px 0 4px;max-width:100%;text-overflow:ellipsis;border:1px solid var(--border-color);border-radius:4px;outline:none;cursor:pointer;-moz-appearance:none;-webkit-appearance:none;text-indent:0.01px;background-color:var(--main-background-color);color:inherit;line-height:1.5;font-weight:500;}#crate-search:hover,#crate-search:focus{border-color:var(--crate-search-hover-border);}@-moz-document url-prefix(){#crate-search{padding-left:0px;padding-right:19px;}}#crate-search-div::after{pointer-events:none;width:100%;height:100%;position:absolute;top:0;left:0;content:"";background-repeat:no-repeat;background-size:20px;background-position:calc(100% - 2px) 56%;background-image:url('data:image/svg+xml, \ + ');filter:var(--crate-search-div-filter);}#crate-search-div:hover::after,#crate-search-div:focus-within::after{filter:var(--crate-search-div-hover-filter);}#crate-search>option{font-size:1rem;}.search-input{-webkit-appearance:none;outline:none;border:1px solid var(--border-color);border-radius:2px;padding:8px;font-size:1rem;flex-grow:1;background-color:var(--button-background-color);color:var(--search-color);}.search-input:focus{border-color:var(--search-input-focused-border-color);}.search-results{display:none;}.search-results.active{display:block;}.search-results>a{display:flex;margin-left:2px;margin-right:2px;border-bottom:1px solid var(--search-result-border-color);gap:1em;}.search-results>a>div{flex:1;}.search-results>a>div.desc{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;}.search-results a:hover,.search-results a:focus{background-color:var(--search-result-link-focus-background-color);}.search-results .result-name span.alias{color:var(--search-results-alias-color);}.search-results .result-name span.grey{color:var(--search-results-grey-color);}.popover{position:absolute;top:100%;right:0;z-index:2;margin-top:7px;border-radius:3px;border:1px solid var(--border-color);background-color:var(--main-background-color);color:var(--main-color);--popover-arrow-offset:11px;}.popover::before{content:'';position:absolute;right:var(--popover-arrow-offset);border:solid var(--border-color);border-width:1px 1px 0 0;background-color:var(--main-background-color);padding:4px;transform:rotate(-45deg);top:-5px;}#help.popover{max-width:600px;--popover-arrow-offset:48px;}#help dt{float:left;clear:left;margin-right:0.5rem;}#help span.top,#help span.bottom{text-align:center;display:block;font-size:1.125rem;}#help span.top{margin:10px 0;border-bottom:1px solid var(--border-color);padding-bottom:4px;margin-bottom:6px;}#help span.bottom{clear:both;border-top:1px solid var(--border-color);}.side-by-side>div{width:50%;float:left;padding:0 20px 20px 17px;}.item-info .stab{min-height:36px;display:flex;padding:3px;margin-bottom:5px;}.item-name .stab{margin-left:0.3125em;}.stab{padding:0 2px;font-size:0.875rem;font-weight:normal;color:var(--main-color);background-color:var(--stab-background-color);width:fit-content;align-items:center;white-space:pre-wrap;border-radius:3px;display:inline-flex;vertical-align:text-bottom;}.stab.portability>code{background:none;color:var(--stab-code-color);}.stab .emoji{font-size:1.25rem;margin-right:0.3rem;}.emoji{text-shadow:1px 0 0 black,-1px 0 0 black,0 1px 0 black,0 -1px 0 black;}.since{font-weight:normal;font-size:initial;}.rightside{padding-left:12px;float:right;}.rightside:not(a),.out-of-band{color:var(--right-side-color);}pre.rust{tab-size:4;-moz-tab-size:4;}pre.rust .kw{color:var(--code-highlight-kw-color);}pre.rust .kw-2{color:var(--code-highlight-kw-2-color);}pre.rust .lifetime{color:var(--code-highlight-lifetime-color);}pre.rust .prelude-ty{color:var(--code-highlight-prelude-color);}pre.rust .prelude-val{color:var(--code-highlight-prelude-val-color);}pre.rust .string{color:var(--code-highlight-string-color);}pre.rust .number{color:var(--code-highlight-number-color);}pre.rust .bool-val{color:var(--code-highlight-literal-color);}pre.rust .self{color:var(--code-highlight-self-color);}pre.rust .attr{color:var(--code-highlight-attribute-color);}pre.rust .macro,pre.rust .macro-nonterminal{color:var(--code-highlight-macro-color);}pre.rust .question-mark{font-weight:bold;color:var(--code-highlight-question-mark-color);}pre.rust .comment{color:var(--code-highlight-comment-color);}pre.rust .doccomment{color:var(--code-highlight-doc-comment-color);}.rustdoc.source .example-wrap pre.rust a{background:var(--codeblock-link-background);}.example-wrap.compile_fail,.example-wrap.should_panic{border-left:2px solid var(--codeblock-error-color);}.ignore.example-wrap{border-left:2px solid var(--codeblock-ignore-color);}.example-wrap.compile_fail:hover,.example-wrap.should_panic:hover{border-left:2px solid var(--codeblock-error-hover-color);}.example-wrap.ignore:hover{border-left:2px solid var(--codeblock-ignore-hover-color);}.example-wrap.compile_fail .tooltip,.example-wrap.should_panic .tooltip{color:var(--codeblock-error-color);}.example-wrap.ignore .tooltip{color:var(--codeblock-ignore-color);}.example-wrap.compile_fail:hover .tooltip,.example-wrap.should_panic:hover .tooltip{color:var(--codeblock-error-hover-color);}.example-wrap.ignore:hover .tooltip{color:var(--codeblock-ignore-hover-color);}.example-wrap .tooltip{position:absolute;display:block;left:-25px;top:5px;margin:0;line-height:1;}.example-wrap.compile_fail .tooltip,.example-wrap.should_panic .tooltip,.example-wrap.ignore .tooltip{font-weight:bold;font-size:1.25rem;}a.test-arrow{visibility:hidden;position:absolute;padding:5px 10px 5px 10px;border-radius:5px;font-size:1.375rem;top:5px;right:5px;z-index:1;color:var(--test-arrow-color);background-color:var(--test-arrow-background-color);}a.test-arrow:hover{color:var(--test-arrow-hover-color);background-color:var(--test-arrow-hover-background-color);}.example-wrap:hover .test-arrow{visibility:visible;}.code-attribute{font-weight:300;color:var(--code-attribute-color);}.item-spacer{width:100%;height:12px;display:block;}.out-of-band>span.since{font-size:1.25rem;}.sub-variant h4{font-size:1rem;font-weight:400;margin-top:0;margin-bottom:0;}.sub-variant{margin-left:24px;margin-bottom:40px;}.sub-variant>.sub-variant-field{margin-left:24px;}:target{padding-right:3px;background-color:var(--target-background-color);border-right:3px solid var(--target-border-color);}.code-header a.tooltip{color:inherit;margin-right:15px;position:relative;}a.tooltip:hover::after{position:absolute;top:calc(100% - 10px);left:-15px;right:-15px;height:20px;content:"\00a0";}.popover.tooltip .content{margin:0.25em 0.5em;}.popover.tooltip .content pre,.popover.tooltip .content code{background:transparent;margin:0;padding:0;font-size:1.25rem;white-space:pre-wrap;}.popover.tooltip .content>h3:first-child{margin:0 0 5px 0;}.search-failed{text-align:center;margin-top:20px;display:none;}.search-failed.active{display:block;}.search-failed>ul{text-align:left;max-width:570px;margin-left:auto;margin-right:auto;}#search-tabs{display:flex;flex-direction:row;gap:1px;margin-bottom:4px;}#search-tabs button{text-align:center;font-size:1.125rem;border:0;border-top:2px solid;flex:1;line-height:1.5;color:inherit;}#search-tabs button:not(.selected){background-color:var(--search-tab-button-not-selected-background);border-top-color:var(--search-tab-button-not-selected-border-top-color);}#search-tabs button:hover,#search-tabs button.selected{background-color:var(--search-tab-button-selected-background);border-top-color:var(--search-tab-button-selected-border-top-color);}#search-tabs .count{font-size:1rem;color:var(--search-tab-title-count-color);}#search .error code{border-radius:3px;background-color:var(--search-error-code-background-color);}#src-sidebar-toggle{position:sticky;top:0;left:0;font-size:1.25rem;border-bottom:1px solid;display:flex;height:40px;justify-content:stretch;align-items:stretch;z-index:10;}#source-sidebar{width:100%;overflow:auto;}#source-sidebar>.title{font-size:1.5rem;text-align:center;border-bottom:1px solid var(--border-color);margin-bottom:6px;}#source-sidebar div.files>a:hover,details.dir-entry summary:hover,#source-sidebar div.files>a:focus,details.dir-entry summary:focus{background-color:var(--source-sidebar-background-hover);}#source-sidebar div.files>a.selected{background-color:var(--source-sidebar-background-selected);}#src-sidebar-toggle>button{font-size:inherit;font-weight:bold;background:none;color:inherit;text-align:center;border:none;outline:none;flex:1 1;-webkit-appearance:none;opacity:1;}#settings-menu,#help-button{margin-left:4px;display:flex;}#settings-menu>a,#help-button>a{display:flex;align-items:center;justify-content:center;background-color:var(--button-background-color);border:1px solid var(--border-color);border-radius:2px;color:var(--settings-button-color);font-size:20px;width:33px;}#settings-menu>a:hover,#settings-menu>a:focus,#help-button>a:hover,#help-button>a:focus{border-color:var(--settings-button-border-focus);}#copy-path{color:var(--copy-path-button-color);background:var(--main-background-color);height:34px;margin-left:10px;padding:0;padding-left:2px;border:0;width:33px;}#copy-path>img{filter:var(--copy-path-img-filter);}#copy-path:hover>img{filter:var(--copy-path-img-hover-filter);}@keyframes rotating{from{transform:rotate(0deg);}to{transform:rotate(360deg);}}#settings-menu.rotate>a img{animation:rotating 2s linear infinite;}kbd{display:inline-block;padding:3px 5px;font:15px monospace;line-height:10px;vertical-align:middle;border:solid 1px var(--border-color);border-radius:3px;color:var(--kbd-color);background-color:var(--kbd-background);box-shadow:inset 0 -1px 0 var(--kbd-box-shadow-color);}ul.all-items>li{list-style:none;}details.dir-entry{padding-left:4px;}details.dir-entry>summary{margin:0 0 0 -4px;padding:0 0 0 4px;cursor:pointer;}details.dir-entry div.folders,details.dir-entry div.files{padding-left:23px;}details.dir-entry a{display:block;}details.toggle{contain:layout;position:relative;}details.toggle>summary.hideme{cursor:pointer;font-size:1rem;}details.toggle>summary{list-style:none;outline:none;}details.toggle>summary::-webkit-details-marker,details.toggle>summary::marker{display:none;}details.toggle>summary.hideme>span{margin-left:9px;}details.toggle>summary::before{background:url('data:image/svg+xml,') no-repeat top left;content:"";cursor:pointer;width:16px;height:16px;display:inline-block;vertical-align:middle;opacity:.5;filter:var(--toggle-filter);}details.toggle>summary.hideme>span,.more-examples-toggle summary,.more-examples-toggle .hide-more{color:var(--toggles-color);}details.toggle>summary::after{content:"Expand";overflow:hidden;width:0;height:0;position:absolute;}details.toggle>summary.hideme::after{content:"";}details.toggle>summary:focus::before,details.toggle>summary:hover::before{opacity:1;}details.toggle>summary:focus-visible::before{outline:1px dotted #000;outline-offset:1px;}details.non-exhaustive{margin-bottom:8px;}details.toggle>summary.hideme::before{position:relative;}details.toggle>summary:not(.hideme)::before{position:absolute;left:-24px;top:4px;}.impl-items>details.toggle>summary:not(.hideme)::before{position:absolute;left:-24px;}details.toggle[open] >summary.hideme{position:absolute;}details.toggle[open] >summary.hideme>span{display:none;}details.toggle[open] >summary::before{background:url('data:image/svg+xml,') no-repeat top left;}details.toggle[open] >summary::after{content:"Collapse";}.docblock summary>*{display:inline-block;}.docblock>.example-wrap:first-child .tooltip{margin-top:16px;}@media (max-width:700px){*[id]{scroll-margin-top:45px;}.rustdoc{display:block;}main{padding-left:15px;padding-top:0px;}.main-heading{flex-direction:column;}.out-of-band{text-align:left;margin-left:initial;padding:initial;}.out-of-band .since::before{content:"Since ";}.sidebar .logo-container,.sidebar .location{display:none;}.sidebar{position:fixed;top:45px;left:-1000px;z-index:11;height:calc(100vh - 45px);width:200px;}.source main,.rustdoc.source .sidebar{top:0;padding:0;height:100vh;border:0;}.sidebar.shown,.source-sidebar-expanded .source .sidebar,.rustdoc:not(.source) .sidebar:focus-within{left:0;}.mobile-topbar h2{padding-bottom:0;margin:auto 0.5em auto auto;overflow:hidden;font-size:24px;}.mobile-topbar h2 a{display:block;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;}.mobile-topbar .logo-container>img{max-width:35px;max-height:35px;margin:5px 0 5px 20px;}.mobile-topbar{display:flex;flex-direction:row;position:sticky;z-index:10;font-size:2rem;height:45px;width:100%;left:0;top:0;}.sidebar-menu-toggle{width:45px;font-size:32px;border:none;color:var(--main-color);}.sidebar-elems{margin-top:1em;}.anchor{display:none !important;}#search-tabs .count{display:block;}#main-content>details.toggle>summary::before,#main-content>div>details.toggle>summary::before{left:-11px;}#src-sidebar-toggle{position:fixed;left:1px;top:100px;width:30px;font-size:1.5rem;padding:0;z-index:10;border-top-right-radius:3px;border-bottom-right-radius:3px;border:1px solid;border-left:0;}.source-sidebar-expanded #src-sidebar-toggle{left:unset;top:unset;width:unset;border-top-right-radius:unset;border-bottom-right-radius:unset;position:sticky;border:0;border-bottom:1px solid;}#copy-path,#help-button{display:none;}.item-table,.item-row,.item-table>li,.item-table>li>div,.search-results>a,.search-results>a>div{display:block;}.search-results>a{padding:5px 0px;}.search-results>a>div.desc,.item-table>li>div.desc{padding-left:2em;}.source-sidebar-expanded .source .sidebar{max-width:100vw;width:100vw;}details.toggle:not(.top-doc)>summary{margin-left:10px;}.impl-items>details.toggle>summary:not(.hideme)::before,#main-content>details.toggle:not(.top-doc)>summary::before,#main-content>div>details.toggle>summary::before{left:-11px;}.impl-items>.item-info{margin-left:34px;}.source nav.sub{margin:0;padding:var(--nav-sub-mobile-padding);}}@media (min-width:701px){.scraped-example-title{position:absolute;z-index:10;background:var(--main-background-color);bottom:8px;right:5px;padding:2px 4px;box-shadow:0 0 4px var(--main-background-color);}}@media print{nav.sidebar,nav.sub,.out-of-band,a.srclink,#copy-path,details.toggle[open] >summary::before,details.toggle>summary::before,details.toggle.top-doc>summary{display:none;}.docblock{margin-left:0;}main{padding:10px;}}@media (max-width:464px){.docblock{margin-left:12px;}.docblock code{overflow-wrap:break-word;overflow-wrap:anywhere;}nav.sub{flex-direction:column;}.search-form{align-self:stretch;}.sub-logo-container>img{height:35px;width:35px;margin-bottom:var(--nav-sub-mobile-padding);}}.variant,.implementors-toggle>summary,.impl,#implementors-list>.docblock,.impl-items>section,.impl-items>.toggle>summary,.methods>section,.methods>.toggle>summary{margin-bottom:0.75em;}.variants>.docblock,.implementors-toggle>.docblock,.impl-items>.toggle[open]:not(:last-child),.methods>.toggle[open]:not(:last-child),.implementors-toggle[open]:not(:last-child){margin-bottom:2em;}#trait-implementations-list .impl-items>.toggle:not(:last-child),#synthetic-implementations-list .impl-items>.toggle:not(:last-child),#blanket-implementations-list .impl-items>.toggle:not(:last-child){margin-bottom:1em;}.scraped-example-list .scrape-help{margin-left:10px;padding:0 4px;font-weight:normal;font-size:12px;position:relative;bottom:1px;border:1px solid var(--scrape-example-help-border-color);border-radius:50px;color:var(--scrape-example-help-color);}.scraped-example-list .scrape-help:hover{border-color:var(--scrape-example-help-hover-border-color);color:var(--scrape-example-help-hover-color);}.scraped-example{position:relative;}.scraped-example .code-wrapper{position:relative;display:flex;flex-direction:row;flex-wrap:wrap;width:100%;}.scraped-example:not(.expanded) .code-wrapper{max-height:calc(1.5em * 5 + 10px);}.scraped-example:not(.expanded) .code-wrapper pre{overflow-y:hidden;padding-bottom:0;max-height:calc(1.5em * 5 + 10px);}.more-scraped-examples .scraped-example:not(.expanded) .code-wrapper,.more-scraped-examples .scraped-example:not(.expanded) .code-wrapper pre{max-height:calc(1.5em * 10 + 10px);}.scraped-example .code-wrapper .next,.scraped-example .code-wrapper .prev,.scraped-example .code-wrapper .expand{color:var(--main-color);position:absolute;top:0.25em;z-index:1;padding:0;background:none;border:none;-webkit-appearance:none;opacity:1;}.scraped-example .code-wrapper .prev{right:2.25em;}.scraped-example .code-wrapper .next{right:1.25em;}.scraped-example .code-wrapper .expand{right:0.25em;}.scraped-example:not(.expanded) .code-wrapper::before,.scraped-example:not(.expanded) .code-wrapper::after{content:" ";width:100%;height:5px;position:absolute;z-index:1;}.scraped-example:not(.expanded) .code-wrapper::before{top:0;background:linear-gradient(to bottom,var(--scrape-example-code-wrapper-background-start),var(--scrape-example-code-wrapper-background-end));}.scraped-example:not(.expanded) .code-wrapper::after{bottom:0;background:linear-gradient(to top,var(--scrape-example-code-wrapper-background-start),var(--scrape-example-code-wrapper-background-end));}.scraped-example .code-wrapper .example-wrap{width:100%;overflow-y:hidden;margin-bottom:0;}.scraped-example:not(.expanded) .code-wrapper .example-wrap{overflow-x:hidden;}.scraped-example .example-wrap .rust span.highlight{background:var(--scrape-example-code-line-highlight);}.scraped-example .example-wrap .rust span.highlight.focus{background:var(--scrape-example-code-line-highlight-focus);}.more-examples-toggle{max-width:calc(100% + 25px);margin-top:10px;margin-left:-25px;}.more-examples-toggle .hide-more{margin-left:25px;cursor:pointer;}.more-scraped-examples{margin-left:25px;position:relative;}.toggle-line{position:absolute;top:5px;bottom:0;right:calc(100% + 10px);padding:0 4px;cursor:pointer;}.toggle-line-inner{min-width:2px;height:100%;background:var(--scrape-example-toggle-line-background);}.toggle-line:hover .toggle-line-inner{background:var(--scrape-example-toggle-line-hover-background);}.more-scraped-examples .scraped-example,.example-links{margin-top:20px;}.more-scraped-examples .scraped-example:first-child{margin-top:5px;}.example-links ul{margin-bottom:0;} \ No newline at end of file diff --git a/docs/apidocs/static.files/scrape-examples-ef1e698c1d417c0c.js b/docs/apidocs/static.files/scrape-examples-ef1e698c1d417c0c.js new file mode 100644 index 00000000..ba830e37 --- /dev/null +++ b/docs/apidocs/static.files/scrape-examples-ef1e698c1d417c0c.js @@ -0,0 +1 @@ +"use strict";(function(){const DEFAULT_MAX_LINES=5;const HIDDEN_MAX_LINES=10;function scrollToLoc(elt,loc,isHidden){const lines=elt.querySelector(".src-line-numbers");let scrollOffset;const maxLines=isHidden?HIDDEN_MAX_LINES:DEFAULT_MAX_LINES;if(loc[1]-loc[0]>maxLines){const line=Math.max(0,loc[0]-1);scrollOffset=lines.children[line].offsetTop}else{const wrapper=elt.querySelector(".code-wrapper");const halfHeight=wrapper.offsetHeight/2;const offsetTop=lines.children[loc[0]].offsetTop;const lastLine=lines.children[loc[1]];const offsetBot=lastLine.offsetTop+lastLine.offsetHeight;const offsetMid=(offsetTop+offsetBot)/2;scrollOffset=offsetMid-halfHeight}lines.scrollTo(0,scrollOffset);elt.querySelector(".rust").scrollTo(0,scrollOffset)}function updateScrapedExample(example,isHidden){const locs=JSON.parse(example.attributes.getNamedItem("data-locs").textContent);let locIndex=0;const highlights=Array.prototype.slice.call(example.querySelectorAll(".highlight"));const link=example.querySelector(".scraped-example-title a");if(locs.length>1){const onChangeLoc=changeIndex=>{removeClass(highlights[locIndex],"focus");changeIndex();scrollToLoc(example,locs[locIndex][0],isHidden);addClass(highlights[locIndex],"focus");const url=locs[locIndex][1];const title=locs[locIndex][2];link.href=url;link.innerHTML=title};example.querySelector(".prev").addEventListener("click",()=>{onChangeLoc(()=>{locIndex=(locIndex-1+locs.length)%locs.length})});example.querySelector(".next").addEventListener("click",()=>{onChangeLoc(()=>{locIndex=(locIndex+1)%locs.length})})}const expandButton=example.querySelector(".expand");if(expandButton){expandButton.addEventListener("click",()=>{if(hasClass(example,"expanded")){removeClass(example,"expanded");scrollToLoc(example,locs[0][0],isHidden)}else{addClass(example,"expanded")}})}scrollToLoc(example,locs[0][0],isHidden)}const firstExamples=document.querySelectorAll(".scraped-example-list > .scraped-example");onEachLazy(firstExamples,el=>updateScrapedExample(el,false));onEachLazy(document.querySelectorAll(".more-examples-toggle"),toggle=>{onEachLazy(toggle.querySelectorAll(".toggle-line, .hide-more"),button=>{button.addEventListener("click",()=>{toggle.open=false})});const moreExamples=toggle.querySelectorAll(".scraped-example");toggle.querySelector("summary").addEventListener("click",()=>{setTimeout(()=>{onEachLazy(moreExamples,el=>updateScrapedExample(el,true))})},{once:true})})})() \ No newline at end of file diff --git a/docs/apidocs/static.files/search-618e954b235f6acc.js b/docs/apidocs/static.files/search-618e954b235f6acc.js new file mode 100644 index 00000000..f157c8b5 --- /dev/null +++ b/docs/apidocs/static.files/search-618e954b235f6acc.js @@ -0,0 +1 @@ +"use strict";(function(){const itemTypes=["mod","externcrate","import","struct","enum","fn","type","static","trait","impl","tymethod","method","structfield","variant","macro","primitive","associatedtype","constant","associatedconstant","union","foreigntype","keyword","existential","attr","derive","traitalias",];const TY_PRIMITIVE=itemTypes.indexOf("primitive");const TY_KEYWORD=itemTypes.indexOf("keyword");const ROOT_PATH=typeof window!=="undefined"?window.rootPath:"../";function hasOwnPropertyRustdoc(obj,property){return Object.prototype.hasOwnProperty.call(obj,property)}function printTab(nb){let iter=0;let foundCurrentTab=false;let foundCurrentResultSet=false;onEachLazy(document.getElementById("search-tabs").childNodes,elem=>{if(nb===iter){addClass(elem,"selected");foundCurrentTab=true}else{removeClass(elem,"selected")}iter+=1});iter=0;onEachLazy(document.getElementById("results").childNodes,elem=>{if(nb===iter){addClass(elem,"active");foundCurrentResultSet=true}else{removeClass(elem,"active")}iter+=1});if(foundCurrentTab&&foundCurrentResultSet){searchState.currentTab=nb}else if(nb!==0){printTab(0)}}const editDistanceState={current:[],prev:[],prevPrev:[],calculate:function calculate(a,b,limit){if(a.lengthlimit){return limit+1}while(b.length>0&&b[0]===a[0]){a=a.substring(1);b=b.substring(1)}while(b.length>0&&b[b.length-1]===a[a.length-1]){a=a.substring(0,a.length-1);b=b.substring(0,b.length-1)}if(b.length===0){return minDist}const aLength=a.length;const bLength=b.length;for(let i=0;i<=bLength;++i){this.current[i]=0;this.prev[i]=i;this.prevPrev[i]=Number.MAX_VALUE}for(let i=1;i<=aLength;++i){this.current[0]=i;const aIdx=i-1;for(let j=1;j<=bLength;++j){const bIdx=j-1;const substitutionCost=a[aIdx]===b[bIdx]?0:1;this.current[j]=Math.min(this.prev[j]+1,this.current[j-1]+1,this.prev[j-1]+substitutionCost);if((i>1)&&(j>1)&&(a[aIdx]===b[bIdx-1])&&(a[aIdx-1]===b[bIdx])){this.current[j]=Math.min(this.current[j],this.prevPrev[j-2]+1)}}const prevPrevTmp=this.prevPrev;this.prevPrev=this.prev;this.prev=this.current;this.current=prevPrevTmp}const distance=this.prev[bLength];return distance<=limit?distance:(limit+1)},};function editDistance(a,b,limit){return editDistanceState.calculate(a,b,limit)}function initSearch(rawSearchIndex){const MAX_RESULTS=200;const NO_TYPE_FILTER=-1;let searchIndex;let currentResults;const ALIASES=new Map();function isWhitespace(c){return" \t\n\r".indexOf(c)!==-1}function isSpecialStartCharacter(c){return"<\"".indexOf(c)!==-1}function isEndCharacter(c){return",>-".indexOf(c)!==-1}function isStopCharacter(c){return isWhitespace(c)||isEndCharacter(c)}function isErrorCharacter(c){return"()".indexOf(c)!==-1}function itemTypeFromName(typename){const index=itemTypes.findIndex(i=>i===typename);if(index<0){throw["Unknown type filter ",typename]}return index}function getStringElem(query,parserState,isInGenerics){if(isInGenerics){throw["Unexpected ","\""," in generics"]}else if(query.literalSearch){throw["Cannot have more than one literal search element"]}else if(parserState.totalElems-parserState.genericsElems>0){throw["Cannot use literal search when there is more than one element"]}parserState.pos+=1;const start=parserState.pos;const end=getIdentEndPosition(parserState);if(parserState.pos>=parserState.length){throw["Unclosed ","\""]}else if(parserState.userQuery[end]!=="\""){throw["Unexpected ",parserState.userQuery[end]," in a string element"]}else if(start===end){throw["Cannot have empty string element"]}parserState.pos+=1;query.literalSearch=true}function isPathStart(parserState){return parserState.userQuery.slice(parserState.pos,parserState.pos+2)==="::"}function isReturnArrow(parserState){return parserState.userQuery.slice(parserState.pos,parserState.pos+2)==="->"}function isIdentCharacter(c){return(c==="_"||(c>="0"&&c<="9")||(c>="a"&&c<="z")||(c>="A"&&c<="Z"))}function isSeparatorCharacter(c){return c===","||isWhitespaceCharacter(c)}function isWhitespaceCharacter(c){return c===" "||c==="\t"}function createQueryElement(query,parserState,name,generics,isInGenerics){if(name==="*"||(name.length===0&&generics.length===0)){return}if(query.literalSearch&&parserState.totalElems-parserState.genericsElems>0){throw["You cannot have more than one element if you use quotes"]}const pathSegments=name.split("::");if(pathSegments.length>1){for(let i=0,len=pathSegments.length;i=end){throw["Found generics without a path"]}parserState.pos+=1;getItemsBefore(query,parserState,generics,">")}if(start>=end&&generics.length===0){return}elems.push(createQueryElement(query,parserState,parserState.userQuery.slice(start,end),generics,isInGenerics))}function getItemsBefore(query,parserState,elems,endChar){let foundStopChar=true;let start=parserState.pos;const oldTypeFilter=parserState.typeFilter;parserState.typeFilter=null;while(parserState.pos"){extra="<"}else if(endChar===""){extra="->"}else{extra=endChar}throw["Unexpected ",c," after ",extra]}if(!foundStopChar){if(endChar!==""){throw["Expected ",",",", "," "," or ",endChar,", found ",c,]}throw["Expected ",","," or "," ",", found ",c,]}const posBefore=parserState.pos;start=parserState.pos;getNextElem(query,parserState,elems,endChar===">");if(endChar!==""&&parserState.pos>=parserState.length){throw["Unclosed ","<"]}if(posBefore===parserState.pos){parserState.pos+=1}foundStopChar=false}if(parserState.pos>=parserState.length&&endChar!==""){throw["Unclosed ","<"]}parserState.pos+=1;parserState.typeFilter=oldTypeFilter}function checkExtraTypeFilterCharacters(start,parserState){const query=parserState.userQuery;for(let pos=start;pos"){if(isReturnArrow(parserState)){break}throw["Unexpected ",c," (did you mean ","->","?)"]}throw["Unexpected ",c]}else if(c===":"&&!isPathStart(parserState)){if(parserState.typeFilter!==null){throw["Unexpected ",":"]}if(query.elems.length===0){throw["Expected type filter before ",":"]}else if(query.literalSearch){throw["You cannot use quotes on type filter"]}const typeFilterElem=query.elems.pop();checkExtraTypeFilterCharacters(start,parserState);parserState.typeFilter=typeFilterElem.name;parserState.pos+=1;parserState.totalElems-=1;query.literalSearch=false;foundStopChar=true;continue}if(!foundStopChar){if(parserState.typeFilter!==null){throw["Expected ",",",", "," "," or ","->",", found ",c,]}throw["Expected ",",",", "," ",", ",":"," or ","->",", found ",c,]}const before=query.elems.length;start=parserState.pos;getNextElem(query,parserState,query.elems,false);if(query.elems.length===before){parserState.pos+=1}foundStopChar=false}if(parserState.typeFilter!==null){throw["Unexpected ",":"," (expected path after type filter)"]}while(parserState.pos"]}break}else{parserState.pos+=1}}}function newParsedQuery(userQuery){return{original:userQuery,userQuery:userQuery.toLowerCase(),elems:[],returned:[],foundElems:0,literalSearch:false,error:null,}}function buildUrl(search,filterCrates){let extra="?search="+encodeURIComponent(search);if(filterCrates!==null){extra+="&filter-crate="+encodeURIComponent(filterCrates)}return getNakedUrl()+extra+window.location.hash}function getFilterCrates(){const elem=document.getElementById("crate-search");if(elem&&elem.value!=="all crates"&&hasOwnPropertyRustdoc(rawSearchIndex,elem.value)){return elem.value}return null}function parseQuery(userQuery){function convertTypeFilterOnElem(elem){if(elem.typeFilter!==null){let typeFilter=elem.typeFilter;if(typeFilter==="const"){typeFilter="constant"}elem.typeFilter=itemTypeFromName(typeFilter)}else{elem.typeFilter=NO_TYPE_FILTER}for(const elem2 of elem.generics){convertTypeFilterOnElem(elem2)}}userQuery=userQuery.trim();const parserState={length:userQuery.length,pos:0,totalElems:0,genericsElems:0,typeFilter:null,userQuery:userQuery.toLowerCase(),};let query=newParsedQuery(userQuery);try{parseInput(query,parserState);for(const elem of query.elems){convertTypeFilterOnElem(elem)}for(const elem of query.returned){convertTypeFilterOnElem(elem)}}catch(err){query=newParsedQuery(userQuery);query.error=err;return query}if(!query.literalSearch){query.literalSearch=parserState.totalElems>1}query.foundElems=query.elems.length+query.returned.length;return query}function createQueryResults(results_in_args,results_returned,results_others,parsedQuery){return{"in_args":results_in_args,"returned":results_returned,"others":results_others,"query":parsedQuery,}}function execQuery(parsedQuery,searchWords,filterCrates,currentCrate){const results_others=new Map(),results_in_args=new Map(),results_returned=new Map();function transformResults(results){const duplicates=new Set();const out=[];for(const result of results){if(result.id>-1){const obj=searchIndex[result.id];obj.dist=result.dist;const res=buildHrefAndPath(obj);obj.displayPath=pathSplitter(res[0]);obj.fullPath=obj.displayPath+obj.name;obj.fullPath+="|"+obj.ty;if(duplicates.has(obj.fullPath)){continue}duplicates.add(obj.fullPath);obj.href=res[1];out.push(obj);if(out.length>=MAX_RESULTS){break}}}return out}function sortResults(results,isType,preferredCrate){if(results.size===0){return[]}const userQuery=parsedQuery.userQuery;const result_list=[];for(const result of results.values()){result.word=searchWords[result.id];result.item=searchIndex[result.id]||{};result_list.push(result)}result_list.sort((aaa,bbb)=>{let a,b;a=(aaa.word!==userQuery);b=(bbb.word!==userQuery);if(a!==b){return a-b}a=(aaa.index<0);b=(bbb.index<0);if(a!==b){return a-b}a=aaa.path_dist;b=bbb.path_dist;if(a!==b){return a-b}a=aaa.index;b=bbb.index;if(a!==b){return a-b}a=(aaa.dist);b=(bbb.dist);if(a!==b){return a-b}a=aaa.item.deprecated;b=bbb.item.deprecated;if(a!==b){return a-b}a=(aaa.item.crate!==preferredCrate);b=(bbb.item.crate!==preferredCrate);if(a!==b){return a-b}a=aaa.word.length;b=bbb.word.length;if(a!==b){return a-b}a=aaa.word;b=bbb.word;if(a!==b){return(a>b?+1:-1)}if((aaa.item.ty===TY_PRIMITIVE&&bbb.item.ty!==TY_KEYWORD)||(aaa.item.ty===TY_KEYWORD&&bbb.item.ty!==TY_PRIMITIVE)){return-1}if((bbb.item.ty===TY_PRIMITIVE&&aaa.item.ty!==TY_PRIMITIVE)||(bbb.item.ty===TY_KEYWORD&&aaa.item.ty!==TY_KEYWORD)){return 1}a=(aaa.item.desc==="");b=(bbb.item.desc==="");if(a!==b){return a-b}a=aaa.item.ty;b=bbb.item.ty;if(a!==b){return a-b}a=aaa.item.path;b=bbb.item.path;if(a!==b){return(a>b?+1:-1)}return 0});let nameSplit=null;if(parsedQuery.elems.length===1){const hasPath=typeof parsedQuery.elems[0].path==="undefined";nameSplit=hasPath?null:parsedQuery.elems[0].path}for(const result of result_list){if(result.dontValidate){continue}const name=result.item.name.toLowerCase(),path=result.item.path.toLowerCase(),parent=result.item.parent;if(!isType&&!validateResult(name,path,nameSplit,parent)){result.id=-1}}return transformResults(result_list)}function checkGenerics(row,elem,defaultDistance,maxEditDistance){if(row.generics.length===0){return elem.generics.length===0?defaultDistance:maxEditDistance+1}else if(row.generics.length>0&&row.generics[0].name===null){return checkGenerics(row.generics[0],elem,defaultDistance,maxEditDistance)}if(elem.generics.length>0&&row.generics.length>=elem.generics.length){const elems=new Map();for(const entry of row.generics){if(entry.name===""){if(checkGenerics(entry,elem,maxEditDistance+1,maxEditDistance)!==0){return maxEditDistance+1}continue}let currentEntryElems;if(elems.has(entry.name)){currentEntryElems=elems.get(entry.name)}else{currentEntryElems=[];elems.set(entry.name,currentEntryElems)}currentEntryElems.push(entry)}const handleGeneric=generic=>{if(!elems.has(generic.name)){return false}const matchElems=elems.get(generic.name);const matchIdx=matchElems.findIndex(tmp_elem=>{if(checkGenerics(tmp_elem,generic,0,maxEditDistance)!==0){return false}return typePassesFilter(generic.typeFilter,tmp_elem.ty)});if(matchIdx===-1){return false}matchElems.splice(matchIdx,1);if(matchElems.length===0){elems.delete(generic.name)}return true};for(const generic of elem.generics){if(generic.typeFilter!==-1&&!handleGeneric(generic)){return maxEditDistance+1}}for(const generic of elem.generics){if(generic.typeFilter===-1&&!handleGeneric(generic)){return maxEditDistance+1}}return 0}return maxEditDistance+1}function checkIfInGenerics(row,elem,maxEditDistance){let dist=maxEditDistance+1;for(const entry of row.generics){dist=Math.min(checkType(entry,elem,true,maxEditDistance),dist);if(dist===0){break}}return dist}function checkType(row,elem,literalSearch,maxEditDistance){if(row.name===null){if(row.generics.length>0){return checkIfInGenerics(row,elem,maxEditDistance)}return maxEditDistance+1}let dist;if(typePassesFilter(elem.typeFilter,row.ty)){dist=editDistance(row.name,elem.name,maxEditDistance)}else{dist=maxEditDistance+1}if(literalSearch){if(dist!==0){if(elem.generics.length===0){const checkGeneric=row.generics.length>0;if(checkGeneric&&row.generics.findIndex(tmp_elem=>tmp_elem.name===elem.name&&typePassesFilter(elem.typeFilter,tmp_elem.ty))!==-1){return 0}}return maxEditDistance+1}else if(elem.generics.length>0){return checkGenerics(row,elem,maxEditDistance+1,maxEditDistance)}return 0}else if(row.generics.length>0){if(elem.generics.length===0){if(dist===0){return 0}dist=Math.min(dist,checkIfInGenerics(row,elem,maxEditDistance));return dist}else if(dist>maxEditDistance){return checkIfInGenerics(row,elem,maxEditDistance)}else{const tmp_dist=checkGenerics(row,elem,dist,maxEditDistance);if(tmp_dist>maxEditDistance){return maxEditDistance+1}return(tmp_dist+dist)/2}}else if(elem.generics.length>0){return maxEditDistance+1}return dist}function findArg(row,elem,maxEditDistance,skipPositions){let dist=maxEditDistance+1;let position=-1;if(row&&row.type&&row.type.inputs&&row.type.inputs.length>0){let i=0;for(const input of row.type.inputs){if(skipPositions.indexOf(i)!==-1){i+=1;continue}const typeDist=checkType(input,elem,parsedQuery.literalSearch,maxEditDistance);if(typeDist===0){return{dist:0,position:i}}if(typeDist0){const ret=row.type.output;let i=0;for(const ret_ty of ret){if(skipPositions.indexOf(i)!==-1){i+=1;continue}const typeDist=checkType(ret_ty,elem,parsedQuery.literalSearch,maxEditDistance);if(typeDist===0){return{dist:0,position:i}}if(typeDistlength){return maxEditDistance+1}for(let i=0;ilength){break}let dist_total=0;let aborted=false;for(let x=0;xmaxEditDistance){aborted=true;break}dist_total+=dist}if(!aborted){ret_dist=Math.min(ret_dist,Math.round(dist_total/clength))}}return ret_dist}function typePassesFilter(filter,type){if(filter<=NO_TYPE_FILTER||filter===type)return true;const name=itemTypes[type];switch(itemTypes[filter]){case"constant":return name==="associatedconstant";case"fn":return name==="method"||name==="tymethod";case"type":return name==="primitive"||name==="associatedtype";case"trait":return name==="traitalias"}return false}function createAliasFromItem(item){return{crate:item.crate,name:item.name,path:item.path,desc:item.desc,ty:item.ty,parent:item.parent,type:item.type,is_alias:true,deprecated:item.deprecated,}}function handleAliases(ret,query,filterCrates,currentCrate){const lowerQuery=query.toLowerCase();const aliases=[];const crateAliases=[];if(filterCrates!==null){if(ALIASES.has(filterCrates)&&ALIASES.get(filterCrates).has(lowerQuery)){const query_aliases=ALIASES.get(filterCrates).get(lowerQuery);for(const alias of query_aliases){aliases.push(createAliasFromItem(searchIndex[alias]))}}}else{for(const[crate,crateAliasesIndex]of ALIASES){if(crateAliasesIndex.has(lowerQuery)){const pushTo=crate===currentCrate?crateAliases:aliases;const query_aliases=crateAliasesIndex.get(lowerQuery);for(const alias of query_aliases){pushTo.push(createAliasFromItem(searchIndex[alias]))}}}}const sortFunc=(aaa,bbb)=>{if(aaa.path{alias.alias=query;const res=buildHrefAndPath(alias);alias.displayPath=pathSplitter(res[0]);alias.fullPath=alias.displayPath+alias.name;alias.href=res[1];ret.others.unshift(alias);if(ret.others.length>MAX_RESULTS){ret.others.pop()}};aliases.forEach(pushFunc);crateAliases.forEach(pushFunc)}function addIntoResults(results,fullId,id,index,dist,path_dist,maxEditDistance){const inBounds=dist<=maxEditDistance||index!==-1;if(dist===0||(!parsedQuery.literalSearch&&inBounds)){if(results.has(fullId)){const result=results.get(fullId);if(result.dontValidate||result.dist<=dist){return}}results.set(fullId,{id:id,index:index,dontValidate:parsedQuery.literalSearch,dist:dist,path_dist:path_dist,})}}function handleSingleArg(row,pos,elem,results_others,results_in_args,results_returned,maxEditDistance){if(!row||(filterCrates!==null&&row.crate!==filterCrates)){return}let dist,index=-1,path_dist=0;const fullId=row.id;const searchWord=searchWords[pos];const in_args=findArg(row,elem,maxEditDistance,[]);const returned=checkReturned(row,elem,maxEditDistance,[]);addIntoResults(results_in_args,fullId,pos,-1,in_args.dist,0,maxEditDistance);addIntoResults(results_returned,fullId,pos,-1,returned.dist,0,maxEditDistance);if(!typePassesFilter(elem.typeFilter,row.ty)){return}const row_index=row.normalizedName.indexOf(elem.pathLast);const word_index=searchWord.indexOf(elem.pathLast);if(row_index===-1){index=word_index}else if(word_index===-1){index=row_index}else if(word_index1){path_dist=checkPath(elem.pathWithoutLast,row,maxEditDistance);if(path_dist>maxEditDistance){return}}if(parsedQuery.literalSearch){if(searchWord===elem.name){addIntoResults(results_others,fullId,pos,index,0,path_dist)}return}dist=editDistance(searchWord,elem.pathLast,maxEditDistance);if(index===-1&&dist+path_dist>maxEditDistance){return}addIntoResults(results_others,fullId,pos,index,dist,path_dist,maxEditDistance)}function handleArgs(row,pos,results,maxEditDistance){if(!row||(filterCrates!==null&&row.crate!==filterCrates)){return}let totalDist=0;let nbDist=0;function checkArgs(elems,callback){const skipPositions=[];for(const elem of elems){const{dist,position}=callback(row,elem,maxEditDistance,skipPositions);if(dist<=1){nbDist+=1;totalDist+=dist;skipPositions.push(position)}else{return false}}return true}if(!checkArgs(parsedQuery.elems,findArg)){return}if(!checkArgs(parsedQuery.returned,checkReturned)){return}if(nbDist===0){return}const dist=Math.round(totalDist/nbDist);addIntoResults(results,row.id,pos,0,dist,0,maxEditDistance)}function innerRunQuery(){let elem,i,nSearchWords,in_returned,row;let queryLen=0;for(const elem of parsedQuery.elems){queryLen+=elem.name.length}for(const elem of parsedQuery.returned){queryLen+=elem.name.length}const maxEditDistance=Math.floor(queryLen/3);if(parsedQuery.foundElems===1){if(parsedQuery.elems.length===1){elem=parsedQuery.elems[0];for(i=0,nSearchWords=searchWords.length;i0){for(i=0,nSearchWords=searchWords.length;i-1||path.indexOf(key)>-1||(parent!==undefined&&parent.name!==undefined&&parent.name.toLowerCase().indexOf(key)>-1)||editDistance(name,key,maxEditDistance)<=maxEditDistance)){return false}}return true}function nextTab(direction){const next=(searchState.currentTab+direction+3)%searchState.focusedByTab.length;searchState.focusedByTab[searchState.currentTab]=document.activeElement;printTab(next);focusSearchResult()}function focusSearchResult(){const target=searchState.focusedByTab[searchState.currentTab]||document.querySelectorAll(".search-results.active a").item(0)||document.querySelectorAll("#search-tabs button").item(searchState.currentTab);searchState.focusedByTab[searchState.currentTab]=null;if(target){target.focus()}}function buildHrefAndPath(item){let displayPath;let href;const type=itemTypes[item.ty];const name=item.name;let path=item.path;if(type==="mod"){displayPath=path+"::";href=ROOT_PATH+path.replace(/::/g,"/")+"/"+name+"/index.html"}else if(type==="import"){displayPath=item.path+"::";href=ROOT_PATH+item.path.replace(/::/g,"/")+"/index.html#reexport."+name}else if(type==="primitive"||type==="keyword"){displayPath="";href=ROOT_PATH+path.replace(/::/g,"/")+"/"+type+"."+name+".html"}else if(type==="externcrate"){displayPath="";href=ROOT_PATH+name+"/index.html"}else if(item.parent!==undefined){const myparent=item.parent;let anchor="#"+type+"."+name;const parentType=itemTypes[myparent.ty];let pageType=parentType;let pageName=myparent.name;if(parentType==="primitive"){displayPath=myparent.name+"::"}else if(type==="structfield"&&parentType==="variant"){const enumNameIdx=item.path.lastIndexOf("::");const enumName=item.path.substr(enumNameIdx+2);path=item.path.substr(0,enumNameIdx);displayPath=path+"::"+enumName+"::"+myparent.name+"::";anchor="#variant."+myparent.name+".field."+name;pageType="enum";pageName=enumName}else{displayPath=path+"::"+myparent.name+"::"}href=ROOT_PATH+path.replace(/::/g,"/")+"/"+pageType+"."+pageName+".html"+anchor}else{displayPath=item.path+"::";href=ROOT_PATH+item.path.replace(/::/g,"/")+"/"+type+"."+name+".html"}return[displayPath,href]}function pathSplitter(path){const tmp=""+path.replace(/::/g,"::");if(tmp.endsWith("")){return tmp.slice(0,tmp.length-6)}return tmp}function addTab(array,query,display){let extraClass="";if(display===true){extraClass=" active"}const output=document.createElement("div");let length=0;if(array.length>0){output.className="search-results "+extraClass;array.forEach(item=>{const name=item.name;const type=itemTypes[item.ty];length+=1;let extra="";if(type==="primitive"){extra=" (primitive type)"}else if(type==="keyword"){extra=" (keyword)"}const link=document.createElement("a");link.className="result-"+type;link.href=item.href;const resultName=document.createElement("div");resultName.className="result-name";if(item.is_alias){const alias=document.createElement("span");alias.className="alias";const bold=document.createElement("b");bold.innerText=item.alias;alias.appendChild(bold);alias.insertAdjacentHTML("beforeend"," - see ");resultName.appendChild(alias)}resultName.insertAdjacentHTML("beforeend",item.displayPath+""+name+extra+"");link.appendChild(resultName);const description=document.createElement("div");description.className="desc";description.insertAdjacentHTML("beforeend",item.desc);link.appendChild(description);output.appendChild(link)})}else if(query.error===null){output.className="search-failed"+extraClass;output.innerHTML="No results :(
"+"Try on DuckDuckGo?

"+"Or try looking in one of these:"}return[output,length]}function makeTabHeader(tabNb,text,nbElems){if(searchState.currentTab===tabNb){return""}return""}function showResults(results,go_to_first,filterCrates){const search=searchState.outputElement();if(go_to_first||(results.others.length===1&&getSettingValue("go-to-only-result")==="true")){const elem=document.createElement("a");elem.href=results.others[0].href;removeClass(elem,"active");document.body.appendChild(elem);elem.click();return}if(results.query===undefined){results.query=parseQuery(searchState.input.value)}currentResults=results.query.userQuery;const ret_others=addTab(results.others,results.query,true);const ret_in_args=addTab(results.in_args,results.query,false);const ret_returned=addTab(results.returned,results.query,false);let currentTab=searchState.currentTab;if((currentTab===0&&ret_others[1]===0)||(currentTab===1&&ret_in_args[1]===0)||(currentTab===2&&ret_returned[1]===0)){if(ret_others[1]!==0){currentTab=0}else if(ret_in_args[1]!==0){currentTab=1}else if(ret_returned[1]!==0){currentTab=2}}let crates="";const crates_list=Object.keys(rawSearchIndex);if(crates_list.length>1){crates=" in 
"}let output=`

Results${crates}

`;if(results.query.error!==null){const error=results.query.error;error.forEach((value,index)=>{value=value.split("<").join("<").split(">").join(">");if(index%2!==0){error[index]=`${value}`}else{error[index]=value}});output+=`

Query parser error: "${error.join("")}".

`;output+="
"+makeTabHeader(0,"In Names",ret_others[1])+"
";currentTab=0}else if(results.query.foundElems<=1&&results.query.returned.length===0){output+="
"+makeTabHeader(0,"In Names",ret_others[1])+makeTabHeader(1,"In Parameters",ret_in_args[1])+makeTabHeader(2,"In Return Types",ret_returned[1])+"
"}else{const signatureTabTitle=results.query.elems.length===0?"In Function Return Types":results.query.returned.length===0?"In Function Parameters":"In Function Signatures";output+="
"+makeTabHeader(0,signatureTabTitle,ret_others[1])+"
";currentTab=0}const resultsElem=document.createElement("div");resultsElem.id="results";resultsElem.appendChild(ret_others[0]);resultsElem.appendChild(ret_in_args[0]);resultsElem.appendChild(ret_returned[0]);search.innerHTML=output;const crateSearch=document.getElementById("crate-search");if(crateSearch){crateSearch.addEventListener("input",updateCrate)}search.appendChild(resultsElem);searchState.showResults(search);const elems=document.getElementById("search-tabs").childNodes;searchState.focusedByTab=[];let i=0;for(const elem of elems){const j=i;elem.onclick=()=>printTab(j);searchState.focusedByTab.push(null);i+=1}printTab(currentTab)}function search(e,forced){if(e){e.preventDefault()}const query=parseQuery(searchState.input.value.trim());let filterCrates=getFilterCrates();if(!forced&&query.userQuery===currentResults){if(query.userQuery.length>0){putBackSearch()}return}searchState.setLoadingSearch();const params=searchState.getQueryStringParams();if(filterCrates===null&¶ms["filter-crate"]!==undefined){filterCrates=params["filter-crate"]}searchState.title="Results for "+query.original+" - Rust";if(browserSupportsHistoryApi()){const newURL=buildUrl(query.original,filterCrates);if(!history.state&&!params.search){history.pushState(null,"",newURL)}else{history.replaceState(null,"",newURL)}}showResults(execQuery(query,searchWords,filterCrates,window.currentCrate),params.go_to_first,filterCrates)}function buildItemSearchTypeAll(types,lowercasePaths){const PATH_INDEX_DATA=0;const GENERICS_DATA=1;return types.map(type=>{let pathIndex,generics;if(typeof type==="number"){pathIndex=type;generics=[]}else{pathIndex=type[PATH_INDEX_DATA];generics=buildItemSearchTypeAll(type[GENERICS_DATA],lowercasePaths)}return{name:pathIndex===0?null:lowercasePaths[pathIndex-1].name,ty:pathIndex===0?null:lowercasePaths[pathIndex-1].ty,generics:generics,}})}function buildFunctionSearchType(functionSearchType,lowercasePaths){const INPUTS_DATA=0;const OUTPUT_DATA=1;if(functionSearchType===0){return null}let inputs,output;if(typeof functionSearchType[INPUTS_DATA]==="number"){const pathIndex=functionSearchType[INPUTS_DATA];inputs=[{name:pathIndex===0?null:lowercasePaths[pathIndex-1].name,ty:pathIndex===0?null:lowercasePaths[pathIndex-1].ty,generics:[],}]}else{inputs=buildItemSearchTypeAll(functionSearchType[INPUTS_DATA],lowercasePaths)}if(functionSearchType.length>1){if(typeof functionSearchType[OUTPUT_DATA]==="number"){const pathIndex=functionSearchType[OUTPUT_DATA];output=[{name:pathIndex===0?null:lowercasePaths[pathIndex-1].name,ty:pathIndex===0?null:lowercasePaths[pathIndex-1].ty,generics:[],}]}else{output=buildItemSearchTypeAll(functionSearchType[OUTPUT_DATA],lowercasePaths)}}else{output=[]}return{inputs,output,}}function buildIndex(rawSearchIndex){searchIndex=[];const searchWords=[];const charA="A".charCodeAt(0);let currentIndex=0;let id=0;for(const crate in rawSearchIndex){if(!hasOwnPropertyRustdoc(rawSearchIndex,crate)){continue}let crateSize=0;const crateCorpus=rawSearchIndex[crate];searchWords.push(crate);const crateRow={crate:crate,ty:1,name:crate,path:"",desc:crateCorpus.doc,parent:undefined,type:null,id:id,normalizedName:crate.indexOf("_")===-1?crate:crate.replace(/_/g,""),deprecated:null,};id+=1;searchIndex.push(crateRow);currentIndex+=1;const itemTypes=crateCorpus.t;const itemNames=crateCorpus.n;const itemPaths=new Map(crateCorpus.q);const itemDescs=crateCorpus.d;const itemParentIdxs=crateCorpus.i;const itemFunctionSearchTypes=crateCorpus.f;const deprecatedItems=new Set(crateCorpus.c);const paths=crateCorpus.p;const aliases=crateCorpus.a;const lowercasePaths=[];let len=paths.length;for(let i=0;i0?paths[itemParentIdxs[i]-1]:undefined,type:buildFunctionSearchType(itemFunctionSearchTypes[i],lowercasePaths),id:id,normalizedName:word.indexOf("_")===-1?word:word.replace(/_/g,""),deprecated:deprecatedItems.has(i),};id+=1;searchIndex.push(row);lastPath=row.path;crateSize+=1}if(aliases){const currentCrateAliases=new Map();ALIASES.set(crate,currentCrateAliases);for(const alias_name in aliases){if(!hasOwnPropertyRustdoc(aliases,alias_name)){continue}let currentNameAliases;if(currentCrateAliases.has(alias_name)){currentNameAliases=currentCrateAliases.get(alias_name)}else{currentNameAliases=[];currentCrateAliases.set(alias_name,currentNameAliases)}for(const local_alias of aliases[alias_name]){currentNameAliases.push(local_alias+currentIndex)}}}currentIndex+=crateSize}return searchWords}function onSearchSubmit(e){e.preventDefault();searchState.clearInputTimeout();search()}function putBackSearch(){const search_input=searchState.input;if(!searchState.input){return}if(search_input.value!==""&&!searchState.isDisplayed()){searchState.showResults();if(browserSupportsHistoryApi()){history.replaceState(null,"",buildUrl(search_input.value,getFilterCrates()))}document.title=searchState.title}}function registerSearchEvents(){const params=searchState.getQueryStringParams();if(searchState.input.value===""){searchState.input.value=params.search||""}const searchAfter500ms=()=>{searchState.clearInputTimeout();if(searchState.input.value.length===0){searchState.hideResults()}else{searchState.timeout=setTimeout(search,500)}};searchState.input.onkeyup=searchAfter500ms;searchState.input.oninput=searchAfter500ms;document.getElementsByClassName("search-form")[0].onsubmit=onSearchSubmit;searchState.input.onchange=e=>{if(e.target!==document.activeElement){return}searchState.clearInputTimeout();setTimeout(search,0)};searchState.input.onpaste=searchState.input.onchange;searchState.outputElement().addEventListener("keydown",e=>{if(e.altKey||e.ctrlKey||e.shiftKey||e.metaKey){return}if(e.which===38){const previous=document.activeElement.previousElementSibling;if(previous){previous.focus()}else{searchState.focus()}e.preventDefault()}else if(e.which===40){const next=document.activeElement.nextElementSibling;if(next){next.focus()}const rect=document.activeElement.getBoundingClientRect();if(window.innerHeight-rect.bottom{if(e.which===40){focusSearchResult();e.preventDefault()}});searchState.input.addEventListener("focus",()=>{putBackSearch()});searchState.input.addEventListener("blur",()=>{searchState.input.placeholder=searchState.input.origPlaceholder});if(browserSupportsHistoryApi()){const previousTitle=document.title;window.addEventListener("popstate",e=>{const params=searchState.getQueryStringParams();document.title=previousTitle;currentResults=null;if(params.search&¶ms.search.length>0){searchState.input.value=params.search;search(e)}else{searchState.input.value="";searchState.hideResults()}})}window.onpageshow=()=>{const qSearch=searchState.getQueryStringParams().search;if(searchState.input.value===""&&qSearch){searchState.input.value=qSearch}search()}}function updateCrate(ev){if(ev.target.value==="all crates"){const params=searchState.getQueryStringParams();const query=searchState.input.value.trim();if(!history.state&&!params.search){history.pushState(null,"",buildUrl(query,null))}else{history.replaceState(null,"",buildUrl(query,null))}}currentResults=null;search(undefined,true)}const searchWords=buildIndex(rawSearchIndex);if(typeof window!=="undefined"){registerSearchEvents();if(window.searchState.getQueryStringParams().search){search()}}if(typeof exports!=="undefined"){exports.initSearch=initSearch;exports.execQuery=execQuery;exports.parseQuery=parseQuery}return searchWords}if(typeof window!=="undefined"){window.initSearch=initSearch;if(window.searchIndex!==undefined){initSearch(window.searchIndex)}}else{initSearch({})}})() \ No newline at end of file diff --git a/docs/apidocs/static.files/settings-298e1ea74db45b39.js b/docs/apidocs/static.files/settings-298e1ea74db45b39.js new file mode 100644 index 00000000..a426aef3 --- /dev/null +++ b/docs/apidocs/static.files/settings-298e1ea74db45b39.js @@ -0,0 +1,17 @@ +"use strict";(function(){const isSettingsPage=window.location.pathname.endsWith("/settings.html");function changeSetting(settingName,value){if(settingName==="theme"){const useSystem=value==="system preference"?"true":"false";updateLocalStorage("use-system-theme",useSystem)}updateLocalStorage(settingName,value);switch(settingName){case"theme":case"preferred-dark-theme":case"preferred-light-theme":updateTheme();updateLightAndDark();break;case"line-numbers":if(value===true){window.rustdoc_add_line_numbers_to_examples()}else{window.rustdoc_remove_line_numbers_from_examples()}break}}function handleKey(ev){if(ev.ctrlKey||ev.altKey||ev.metaKey){return}switch(getVirtualKey(ev)){case"Enter":case"Return":case"Space":ev.target.checked=!ev.target.checked;ev.preventDefault();break}}function showLightAndDark(){removeClass(document.getElementById("preferred-light-theme"),"hidden");removeClass(document.getElementById("preferred-dark-theme"),"hidden")}function hideLightAndDark(){addClass(document.getElementById("preferred-light-theme"),"hidden");addClass(document.getElementById("preferred-dark-theme"),"hidden")}function updateLightAndDark(){const useSystem=getSettingValue("use-system-theme");if(useSystem==="true"||(useSystem===null&&getSettingValue("theme")===null)){showLightAndDark()}else{hideLightAndDark()}}function setEvents(settingsElement){updateLightAndDark();onEachLazy(settingsElement.querySelectorAll("input[type=\"checkbox\"]"),toggle=>{const settingId=toggle.id;const settingValue=getSettingValue(settingId);if(settingValue!==null){toggle.checked=settingValue==="true"}toggle.onchange=function(){changeSetting(this.id,this.checked)};toggle.onkeyup=handleKey;toggle.onkeyrelease=handleKey});onEachLazy(settingsElement.querySelectorAll("input[type=\"radio\"]"),elem=>{const settingId=elem.name;let settingValue=getSettingValue(settingId);if(settingId==="theme"){const useSystem=getSettingValue("use-system-theme");if(useSystem==="true"||settingValue===null){settingValue=useSystem==="false"?"light":"system preference"}}if(settingValue!==null&&settingValue!=="null"){elem.checked=settingValue===elem.value}elem.addEventListener("change",ev=>{changeSetting(ev.target.name,ev.target.value)})})}function buildSettingsPageSections(settings){let output="";for(const setting of settings){const js_data_name=setting["js_name"];const setting_name=setting["name"];if(setting["options"]!==undefined){output+=`\ +
+
${setting_name}
+
`;onEach(setting["options"],option=>{const checked=option===setting["default"]?" checked":"";const full=`${js_data_name}-${option.replace(/ /g,"-")}`;output+=`\ + `});output+=`\ +
+
`}else{const checked=setting["default"]===true?" checked":"";output+=`\ +
\ + \ +
`}}return output}function buildSettingsPage(){const theme_names=getVar("themes").split(",").filter(t=>t);theme_names.push("light","dark","ayu");const settings=[{"name":"Theme","js_name":"theme","default":"system preference","options":theme_names.concat("system preference"),},{"name":"Preferred light theme","js_name":"preferred-light-theme","default":"light","options":theme_names,},{"name":"Preferred dark theme","js_name":"preferred-dark-theme","default":"dark","options":theme_names,},{"name":"Auto-hide item contents for large items","js_name":"auto-hide-large-items","default":true,},{"name":"Auto-hide item methods' documentation","js_name":"auto-hide-method-docs","default":false,},{"name":"Auto-hide trait implementation documentation","js_name":"auto-hide-trait-implementations","default":false,},{"name":"Directly go to item in search if there is only one result","js_name":"go-to-only-result","default":false,},{"name":"Show line numbers on code examples","js_name":"line-numbers","default":false,},{"name":"Disable keyboard shortcuts","js_name":"disable-shortcuts","default":false,},];const elementKind=isSettingsPage?"section":"div";const innerHTML=`
${buildSettingsPageSections(settings)}
`;const el=document.createElement(elementKind);el.id="settings";if(!isSettingsPage){el.className="popover"}el.innerHTML=innerHTML;if(isSettingsPage){document.getElementById(MAIN_ID).appendChild(el)}else{el.setAttribute("tabindex","-1");getSettingsButton().appendChild(el)}return el}const settingsMenu=buildSettingsPage();function displaySettings(){settingsMenu.style.display=""}function settingsBlurHandler(event){blurHandler(event,getSettingsButton(),window.hidePopoverMenus)}if(isSettingsPage){getSettingsButton().onclick=function(event){event.preventDefault()}}else{const settingsButton=getSettingsButton();const settingsMenu=document.getElementById("settings");settingsButton.onclick=function(event){if(elemIsInParent(event.target,settingsMenu)){return}event.preventDefault();const shouldDisplaySettings=settingsMenu.style.display==="none";window.hideAllModals();if(shouldDisplaySettings){displaySettings()}};settingsButton.onblur=settingsBlurHandler;settingsButton.querySelector("a").onblur=settingsBlurHandler;onEachLazy(settingsMenu.querySelectorAll("input"),el=>{el.onblur=settingsBlurHandler});settingsMenu.onblur=settingsBlurHandler}setTimeout(()=>{setEvents(settingsMenu);if(!isSettingsPage){displaySettings()}removeClass(getSettingsButton(),"rotate")},0)})() \ No newline at end of file diff --git a/docs/apidocs/static.files/settings-7bfb4c59cc6bc502.css b/docs/apidocs/static.files/settings-7bfb4c59cc6bc502.css new file mode 100644 index 00000000..79ad2158 --- /dev/null +++ b/docs/apidocs/static.files/settings-7bfb4c59cc6bc502.css @@ -0,0 +1,3 @@ +.setting-line{margin:1.2em 0.6em;position:relative;}.setting-radio input,.setting-check input{margin-right:0.3em;height:1.2rem;width:1.2rem;color:inherit;border:2px solid var(--settings-input-border-color);outline:none;-webkit-appearance:none;cursor:pointer;}.setting-radio input{border-radius:50%;}.setting-check input:checked{content:url('data:image/svg+xml,\ + \ + ');}.setting-radio span,.setting-check span{padding-bottom:1px;}.setting-radio{margin-top:0.1em;margin-bottom:0.1em;min-width:3.8em;padding:0.3em;display:inline-flex;align-items:center;cursor:pointer;}.setting-radio+.setting-radio{margin-left:0.5em;}.setting-check{margin-right:20px;display:flex;align-items:center;cursor:pointer;}.setting-radio input:checked{box-shadow:inset 0 0 0 3px var(--main-background-color);background-color:var(--settings-input-color);}.setting-check input:checked{background-color:var(--settings-input-color);border-width:1px;}.setting-radio input:focus,.setting-check input:focus{box-shadow:0 0 1px 1px var(--settings-input-color);}.setting-radio input:checked:focus{box-shadow:inset 0 0 0 3px var(--main-background-color),0 0 2px 2px var(--settings-input-color);}.setting-radio input:hover,.setting-check input:hover{border-color:var(--settings-input-color) !important;} \ No newline at end of file diff --git a/docs/apidocs/static.files/source-script-11255107d0a65077.js b/docs/apidocs/static.files/source-script-11255107d0a65077.js new file mode 100644 index 00000000..6afbb5a2 --- /dev/null +++ b/docs/apidocs/static.files/source-script-11255107d0a65077.js @@ -0,0 +1 @@ +"use strict";(function(){const rootPath=document.getElementById("rustdoc-vars").attributes["data-root-path"].value;const NAME_OFFSET=0;const DIRS_OFFSET=1;const FILES_OFFSET=2;const RUSTDOC_MOBILE_BREAKPOINT=700;function closeSidebarIfMobile(){if(window.innerWidth"){addClass(document.documentElement,"source-sidebar-expanded");child.innerText="<";updateLocalStorage("source-sidebar-show","true")}else{removeClass(document.documentElement,"source-sidebar-expanded");child.innerText=">";updateLocalStorage("source-sidebar-show","false")}}function createSidebarToggle(){const sidebarToggle=document.createElement("div");sidebarToggle.id="src-sidebar-toggle";const inner=document.createElement("button");if(getCurrentValue("source-sidebar-show")==="true"){inner.innerText="<"}else{inner.innerText=">"}inner.onclick=toggleSidebar;sidebarToggle.appendChild(inner);return sidebarToggle}function createSourceSidebar(){const container=document.querySelector("nav.sidebar");const sidebarToggle=createSidebarToggle();container.insertBefore(sidebarToggle,container.firstChild);const sidebar=document.createElement("div");sidebar.id="source-sidebar";let hasFoundFile=false;const title=document.createElement("div");title.className="title";title.innerText="Files";sidebar.appendChild(title);Object.keys(sourcesIndex).forEach(key=>{sourcesIndex[key][NAME_OFFSET]=key;hasFoundFile=createDirEntry(sourcesIndex[key],sidebar,"",hasFoundFile)});container.appendChild(sidebar);const selected_elem=sidebar.getElementsByClassName("selected")[0];if(typeof selected_elem!=="undefined"){selected_elem.focus()}}const lineNumbersRegex=/^#?(\d+)(?:-(\d+))?$/;function highlightSourceLines(match){if(typeof match==="undefined"){match=window.location.hash.match(lineNumbersRegex)}if(!match){return}let from=parseInt(match[1],10);let to=from;if(typeof match[2]!=="undefined"){to=parseInt(match[2],10)}if(to{onEachLazy(e.getElementsByTagName("a"),i_e=>{removeClass(i_e,"line-highlighted")})});for(let i=from;i<=to;++i){elem=document.getElementById(i);if(!elem){break}addClass(elem,"line-highlighted")}}const handleSourceHighlight=(function(){let prev_line_id=0;const set_fragment=name=>{const x=window.scrollX,y=window.scrollY;if(browserSupportsHistoryApi()){history.replaceState(null,null,"#"+name);highlightSourceLines()}else{location.replace("#"+name)}window.scrollTo(x,y)};return ev=>{let cur_line_id=parseInt(ev.target.id,10);if(isNaN(cur_line_id)||ev.ctrlKey||ev.altKey||ev.metaKey){return}ev.preventDefault();if(ev.shiftKey&&prev_line_id){if(prev_line_id>cur_line_id){const tmp=prev_line_id;prev_line_id=cur_line_id;cur_line_id=tmp}set_fragment(prev_line_id+"-"+cur_line_id)}else{prev_line_id=cur_line_id;set_fragment(cur_line_id)}}}());window.addEventListener("hashchange",()=>{const match=window.location.hash.match(lineNumbersRegex);if(match){return highlightSourceLines(match)}});onEachLazy(document.getElementsByClassName("src-line-numbers"),el=>{el.addEventListener("click",handleSourceHighlight)});highlightSourceLines();window.createSourceSidebar=createSourceSidebar})() \ No newline at end of file diff --git a/docs/apidocs/static.files/storage-62ce34ea385b278a.js b/docs/apidocs/static.files/storage-62ce34ea385b278a.js new file mode 100644 index 00000000..6f4ec2e5 --- /dev/null +++ b/docs/apidocs/static.files/storage-62ce34ea385b278a.js @@ -0,0 +1 @@ +"use strict";const darkThemes=["dark","ayu"];window.currentTheme=document.getElementById("themeStyle");const settingsDataset=(function(){const settingsElement=document.getElementById("default-settings");return settingsElement&&settingsElement.dataset?settingsElement.dataset:null})();function getSettingValue(settingName){const current=getCurrentValue(settingName);if(current===null&&settingsDataset!==null){const def=settingsDataset[settingName.replace(/-/g,"_")];if(def!==undefined){return def}}return current}const localStoredTheme=getSettingValue("theme");function hasClass(elem,className){return elem&&elem.classList&&elem.classList.contains(className)}function addClass(elem,className){if(elem&&elem.classList){elem.classList.add(className)}}function removeClass(elem,className){if(elem&&elem.classList){elem.classList.remove(className)}}function onEach(arr,func,reversed){if(arr&&arr.length>0){if(reversed){for(let i=arr.length-1;i>=0;--i){if(func(arr[i])){return true}}}else{for(const elem of arr){if(func(elem)){return true}}}}return false}function onEachLazy(lazyArray,func,reversed){return onEach(Array.prototype.slice.call(lazyArray),func,reversed)}function updateLocalStorage(name,value){try{window.localStorage.setItem("rustdoc-"+name,value)}catch(e){}}function getCurrentValue(name){try{return window.localStorage.getItem("rustdoc-"+name)}catch(e){return null}}const getVar=(function getVar(name){const el=document.getElementById("rustdoc-vars");return el?el.attributes["data-"+name].value:null});function switchTheme(newThemeName,saveTheme){if(saveTheme){updateLocalStorage("theme",newThemeName)}let newHref;if(newThemeName==="light"||newThemeName==="dark"||newThemeName==="ayu"){newHref=getVar("static-root-path")+getVar("theme-"+newThemeName+"-css")}else{newHref=getVar("root-path")+newThemeName+getVar("resource-suffix")+".css"}if(!window.currentTheme){document.write(``);window.currentTheme=document.getElementById("themeStyle")}else if(newHref!==window.currentTheme.href){window.currentTheme.href=newHref}}const updateTheme=(function(){const mql=window.matchMedia("(prefers-color-scheme: dark)");function updateTheme(){if(getSettingValue("use-system-theme")!=="false"){const lightTheme=getSettingValue("preferred-light-theme")||"light";const darkTheme=getSettingValue("preferred-dark-theme")||"dark";updateLocalStorage("use-system-theme","true");switchTheme(mql.matches?darkTheme:lightTheme,true)}else{switchTheme(getSettingValue("theme"),false)}}mql.addEventListener("change",updateTheme);return updateTheme})();if(getSettingValue("use-system-theme")!=="false"&&window.matchMedia){if(getSettingValue("use-system-theme")===null&&getSettingValue("preferred-dark-theme")===null&&darkThemes.indexOf(localStoredTheme)>=0){updateLocalStorage("preferred-dark-theme",localStoredTheme)}}updateTheme();if(getSettingValue("source-sidebar-show")==="true"){addClass(document.documentElement,"source-sidebar-expanded")}window.addEventListener("pageshow",ev=>{if(ev.persisted){setTimeout(updateTheme,0)}}) \ No newline at end of file diff --git a/docs/apidocs/static.files/wheel-7b819b6101059cd0.svg b/docs/apidocs/static.files/wheel-7b819b6101059cd0.svg new file mode 100644 index 00000000..83c07f63 --- /dev/null +++ b/docs/apidocs/static.files/wheel-7b819b6101059cd0.svg @@ -0,0 +1 @@ + \ No newline at end of file