pub struct TableTestAccessor<'a, CP: CommitmentEvaluationProof> { /* private fields */ }
Expand description
A test accessor that uses Table
as the underlying table type.
Note: this is intended for testing and examples. It is not optimized for performance, so should not be used for benchmarks or production use-cases.
Implementations§
Source§impl<'a, CP: CommitmentEvaluationProof> TableTestAccessor<'a, CP>
impl<'a, CP: CommitmentEvaluationProof> TableTestAccessor<'a, CP>
Sourcepub fn new_empty_with_setup(setup: CP::ProverPublicSetup<'a>) -> Self
pub fn new_empty_with_setup(setup: CP::ProverPublicSetup<'a>) -> Self
Create a new empty test accessor with the given setup.
Sourcepub fn new_from_table(
table_ref: TableRef,
table: Table<'a, CP::Scalar>,
offset: usize,
setup: CP::ProverPublicSetup<'a>,
) -> Self
pub fn new_from_table( table_ref: TableRef, table: Table<'a, CP::Scalar>, offset: usize, setup: CP::ProverPublicSetup<'a>, ) -> Self
Create a new test accessor containing the provided table.
Trait Implementations§
Source§impl<CP: CommitmentEvaluationProof> Clone for TableTestAccessor<'_, CP>
impl<CP: CommitmentEvaluationProof> Clone for TableTestAccessor<'_, CP>
Source§impl<CP: CommitmentEvaluationProof> CommitmentAccessor<<CP as CommitmentEvaluationProof>::Commitment> for TableTestAccessor<'_, CP>
§Panics
Will panic if the column.table_ref()
is not found in self.tables
, or if the column.column_id()
is not found in the inner table for that reference,indicating that an invalid column reference was provided.
impl<CP: CommitmentEvaluationProof> CommitmentAccessor<<CP as CommitmentEvaluationProof>::Commitment> for TableTestAccessor<'_, CP>
§Panics
Will panic if the column.table_ref()
is not found in self.tables
, or if the column.column_id()
is not found in the inner table for that reference,indicating that an invalid column reference was provided.
Source§fn get_commitment(&self, column: ColumnRef) -> CP::Commitment
fn get_commitment(&self, column: ColumnRef) -> CP::Commitment
Source§impl<'a, CP: CommitmentEvaluationProof> DataAccessor<<CP as CommitmentEvaluationProof>::Scalar> for TableTestAccessor<'a, CP>
§Panics
Will panic if the column.table_ref()
is not found in self.tables
, or if
the column.column_id()
is not found in the inner table for that reference,
indicating that an invalid column reference was provided.
impl<'a, CP: CommitmentEvaluationProof> DataAccessor<<CP as CommitmentEvaluationProof>::Scalar> for TableTestAccessor<'a, CP>
§Panics
Will panic if the column.table_ref()
is not found in self.tables
, or if
the column.column_id()
is not found in the inner table for that reference,
indicating that an invalid column reference was provided.
Source§impl<CP: CommitmentEvaluationProof> Default for TableTestAccessor<'_, CP>
impl<CP: CommitmentEvaluationProof> Default for TableTestAccessor<'_, CP>
Source§impl<CP: CommitmentEvaluationProof> MetadataAccessor for TableTestAccessor<'_, CP>
impl<CP: CommitmentEvaluationProof> MetadataAccessor for TableTestAccessor<'_, CP>
Source§impl<CP: CommitmentEvaluationProof> SchemaAccessor for TableTestAccessor<'_, CP>
impl<CP: CommitmentEvaluationProof> SchemaAccessor for TableTestAccessor<'_, CP>
Source§fn lookup_schema(&self, table_ref: TableRef) -> Vec<(Ident, ColumnType)>
fn lookup_schema(&self, table_ref: TableRef) -> Vec<(Ident, ColumnType)>
§Panics
Will panic if the table_ref
is not found in self.tables
, indicating that an invalid reference was provided.
Source§fn lookup_column(
&self,
table_ref: TableRef,
column_id: Ident,
) -> Option<ColumnType>
fn lookup_column( &self, table_ref: TableRef, column_id: Ident, ) -> Option<ColumnType>
Source§impl<'a, CP: CommitmentEvaluationProof> TestAccessor<<CP as CommitmentEvaluationProof>::Commitment> for TableTestAccessor<'a, CP>
impl<'a, CP: CommitmentEvaluationProof> TestAccessor<<CP as CommitmentEvaluationProof>::Commitment> for TableTestAccessor<'a, CP>
Source§fn get_column_names(&self, table_ref: TableRef) -> Vec<&str>
fn get_column_names(&self, table_ref: TableRef) -> Vec<&str>
§Panics
Will panic if the table_ref
is not found in self.tables
, indicating
that an invalid reference was provided.
Source§fn update_offset(&mut self, table_ref: TableRef, new_offset: usize)
fn update_offset(&mut self, table_ref: TableRef, new_offset: usize)
§Panics
Will panic if the table_ref
is not found in self.tables
, indicating that an invalid reference was provided.
Auto Trait Implementations§
impl<'a, CP> Freeze for TableTestAccessor<'a, CP>
impl<'a, CP> RefUnwindSafe for TableTestAccessor<'a, CP>where
<CP as CommitmentEvaluationProof>::ProverPublicSetup<'a>: RefUnwindSafe,
<CP as CommitmentEvaluationProof>::Scalar: RefUnwindSafe,
impl<'a, CP> Send for TableTestAccessor<'a, CP>
impl<'a, CP> Sync for TableTestAccessor<'a, CP>
impl<'a, CP> Unpin for TableTestAccessor<'a, CP>
impl<'a, CP> UnwindSafe for TableTestAccessor<'a, CP>where
<CP as CommitmentEvaluationProof>::ProverPublicSetup<'a>: UnwindSafe,
<CP as CommitmentEvaluationProof>::Scalar: RefUnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more