SubEnv

Struct SubEnv 

Source
struct SubEnv<'a, F: PrimeField, CIx1: ColumnIndexer<usize>, Env1: ColAccessCap<F, CIx1>, L> {
    env: &'a mut Env1,
    lens: L,
    phantom: PhantomData<(F, CIx1)>,
}
Expand description

Generic sub-environment struct: don’t use directly. It’s an internal object to avoid copy-paste.

We can’t use SubEnv directly because rust is not idris: it is impossible to instantiate SubEnv with two /completely/ different lenses and then write proper trait implementations. Rust complains about conflicting trait implementations.

Fields§

§env: &'a mut Env1§lens: L§phantom: PhantomData<(F, CIx1)>

Implementations§

Source§

impl<'a, F: PrimeField, CIx1: ColumnIndexer<usize>, Env1: ColAccessCap<F, CIx1>, L> SubEnv<'a, F, CIx1, Env1, L>

Source

pub fn new(env: &'a mut Env1, lens: L) -> Self

Trait Implementations§

Source§

impl<'a, F: PrimeField, CIx1: ColumnIndexer<usize>, CIx2: ColumnIndexer<usize>, Env1: ColAccessCap<F, CIx1>, L: MPrism<Source = CIx1, Target = CIx2>> ColAccessCap<F, CIx2> for SubEnv<'a, F, CIx1, Env1, L>

Source§

type Variable = <Env1 as ColAccessCap<F, CIx1>>::Variable

Source§

fn assert_zero(&mut self, cst: Self::Variable)

Asserts that the value is zero.
Source§

fn set_assert_mapper( &mut self, mapper: Box<dyn Fn(Self::Variable) -> Self::Variable>, )

Sets an assert predicate f(X) such that when assert_zero is called on x, it will actually perform assert_zero(f(x)).
Source§

fn constant(value: F) -> Self::Variable

Turns a constant value into a variable.
Source§

fn read_column(&self, ix: CIx2) -> Self::Variable

Reads value from a column position.
Source§

impl<'a, F: PrimeField, CIx1: ColumnIndexer<usize>, CIx2: ColumnIndexer<usize>, Env1: ColWriteCap<F, CIx1>, L: MPrism<Source = CIx1, Target = CIx2>> ColWriteCap<F, CIx2> for SubEnv<'a, F, CIx1, Env1, L>

Source§

fn write_column(&mut self, ix: CIx2, value: &Self::Variable)

Source§

impl<'a, F: PrimeField, CIx1: ColumnIndexer<usize>, CIx2: ColumnIndexer<usize>, Env1: HybridCopyCap<F, CIx1>, L: MPrism<Source = CIx1, Target = CIx2>> HybridCopyCap<F, CIx2> for SubEnv<'a, F, CIx1, Env1, L>

Source§

fn hcopy(&mut self, x: &Self::Variable, ix: CIx2) -> Self::Variable

Given variable x and position ix, it (hybrid) writes x into ix, and returns the value.

Auto Trait Implementations§

§

impl<'a, F, CIx1, Env1, L> Freeze for SubEnv<'a, F, CIx1, Env1, L>
where L: Freeze,

§

impl<'a, F, CIx1, Env1, L> RefUnwindSafe for SubEnv<'a, F, CIx1, Env1, L>

§

impl<'a, F, CIx1, Env1, L> Send for SubEnv<'a, F, CIx1, Env1, L>
where L: Send, Env1: Send, CIx1: Send,

§

impl<'a, F, CIx1, Env1, L> Sync for SubEnv<'a, F, CIx1, Env1, L>
where L: Sync, Env1: Sync, CIx1: Sync,

§

impl<'a, F, CIx1, Env1, L> Unpin for SubEnv<'a, F, CIx1, Env1, L>
where L: Unpin, F: Unpin, CIx1: Unpin,

§

impl<'a, F, CIx1, Env1, L> !UnwindSafe for SubEnv<'a, F, CIx1, Env1, L>

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where 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> Pointable for T

§

const ALIGN: usize

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 for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

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 T
where U: TryFrom<T>,

Source§

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 T
where V: MultiLane<T>,

§

fn vzip(self) -> V