pub trait CellType: Clone + Copy + Debug + PartialEq + Eq + PartialOrd + Ord + Hash + Default {
    type TableType: Clone + Copy + Debug + PartialEq + Eq + PartialOrd + Ord + Hash;

    // Required methods
    fn byte_type() -> Option<Self>;
    fn storage_for_phase(phase: u8) -> Self;
    fn create_type(id: usize) -> Self;
    fn lookup_table_type(&self) -> Option<Self::TableType>;

    // Provided methods
    fn expr_phase<F: Field>(expr: &Expression<F>) -> u8 { ... }
    fn storage_for_expr<F: Field>(expr: &Expression<F>) -> Self { ... }
}

Required Associated Types§

source

type TableType: Clone + Copy + Debug + PartialEq + Eq + PartialOrd + Ord + Hash

This is the table type for lookups

Required Methods§

source

fn byte_type() -> Option<Self>

source

fn storage_for_phase(phase: u8) -> Self

Return the storage phase of phase

source

fn create_type(id: usize) -> Self

Creates a type from a unique id

source

fn lookup_table_type(&self) -> Option<Self::TableType>

Returns the table type of the lookup (if it’s a lookup)

Provided Methods§

source

fn expr_phase<F: Field>(expr: &Expression<F>) -> u8

source

fn storage_for_expr<F: Field>(expr: &Expression<F>) -> Self

Return the storage cell of the expression

Object Safety§

This trait is not object safe.

Implementors§