Trait VCPreparedData

Source
pub trait VCPreparedData {
    type Item: Clone + Zero;
    type Error: Debug;

    // Required methods
    fn from_vec(data: Vec<Self::Item>) -> Self;
    fn set_evaluation(
        &mut self,
        index: usize,
        value: Self::Item,
    ) -> Result<(), Self::Error>;
    fn get(&self, index: usize) -> Option<&Self::Item>;
    fn get_all(&self) -> Vec<(usize, Self::Item)>;
    fn max_size(&self) -> usize;
}
Expand description

The dataset that a VC scheme will work over. This should include any preprocessing that is required

Required Associated Types§

Required Methods§

Source

fn from_vec(data: Vec<Self::Item>) -> Self

Source

fn set_evaluation( &mut self, index: usize, value: Self::Item, ) -> Result<(), Self::Error>

Source

fn get(&self, index: usize) -> Option<&Self::Item>

Source

fn get_all(&self) -> Vec<(usize, Self::Item)>

Source

fn max_size(&self) -> usize

Return the max amount of data that can be stored in this data

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.

Implementors§