Skip to main content

TestAccessor

Trait TestAccessor 

Source
pub trait TestAccessor<C: Commitment>:
    Clone
    + Default
    + MetadataAccessor
    + SchemaAccessor
    + CommitmentAccessor<C>
    + DataAccessor<C::Scalar> {
    type Table;

    // Required methods
    fn new_empty() -> Self;
    fn add_table(
        &mut self,
        table_ref: TableRef,
        data: Self::Table,
        table_offset: usize,
    );
    fn get_column_names(&self, table_ref: &TableRef) -> Vec<&str>;
    fn update_offset(&mut self, table_ref: &TableRef, new_offset: usize);
}
Expand description

A trait that defines the interface for a combined metadata, schema, commitment, and data accessor for unit testing or example purposes.

Required Associated Types§

Source

type Table

The table type that the accessor will accept in the add_table method, and likely the inner table type.

Required Methods§

Source

fn new_empty() -> Self

Create an empty test accessor

Source

fn add_table( &mut self, table_ref: TableRef, data: Self::Table, table_offset: usize, )

Add a new table to the current test accessor

Source

fn get_column_names(&self, table_ref: &TableRef) -> Vec<&str>

Get the column names for a given table

Source

fn update_offset(&mut self, table_ref: &TableRef, new_offset: usize)

Update the table offset alongside its column commitments

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§