pub trait LcEncoding:
Clone
+ Debug
+ Sync {
type F: Field + FieldHash + Debug + Clone;
type Err: Debug + Error + Send;
const LABEL_DT: &'static [u8];
const LABEL_PR: &'static [u8];
const LABEL_PE: &'static [u8];
const LABEL_CO: &'static [u8];
// Required methods
fn encode<T: AsMut<[Self::F]>>(&self, inp: T) -> Result<(), Self::Err>;
fn get_dims(&self, len: usize) -> (usize, usize, usize);
fn dims_ok(&self, n_per_row: usize, n_cols: usize) -> bool;
fn get_n_col_opens(&self) -> usize;
fn get_n_degree_tests(&self) -> usize;
}
Expand description
Trait for a linear encoding used by the polycommit
Required Associated Constants§
Required Associated Types§
Required Methods§
Sourcefn get_dims(&self, len: usize) -> (usize, usize, usize)
fn get_dims(&self, len: usize) -> (usize, usize, usize)
Get dimensions for this encoding instance on an input vector of length len
Sourcefn dims_ok(&self, n_per_row: usize, n_cols: usize) -> bool
fn dims_ok(&self, n_per_row: usize, n_cols: usize) -> bool
Check that supplied dimensions are compatible with this encoding
Sourcefn get_n_col_opens(&self) -> usize
fn get_n_col_opens(&self) -> usize
Get the number of column openings required for this encoding
Sourcefn get_n_degree_tests(&self) -> usize
fn get_n_degree_tests(&self) -> usize
Get the number of degree tests required for this encoding
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.