pub struct Diff<F: PrimeField> {
pub region: u64,
pub addresses: Vec<u64>,
pub new_values: Vec<F>,
}
Expand description
Diff request pointing to a single commitment.
Fields§
§region: u64
Which commitment within a group of commitments representing the data is the diff for.
addresses: Vec<u64>
A list of unique addresses, each ∈ [0, SRS_SIZE]
new_values: Vec<F>
A list of new values, each corresponding to address in addresses
Implementations§
Source§impl<F: PrimeField> Diff<F>
impl<F: PrimeField> Diff<F>
pub fn create_from_field_elements( old: &Vec<Vec<F>>, new: &Vec<Vec<F>>, ) -> Result<Vec<Diff<F>>, DiffError>
pub fn create_from_bytes<D: EvaluationDomain<F>>( domain: &D, old: &[u8], new: &[u8], ) -> Result<Vec<Diff<F>>, DiffError>
Sourcepub fn apply_inplace(data: &mut [Vec<F>], diff: &Diff<F>)
pub fn apply_inplace(data: &mut [Vec<F>], diff: &Diff<F>)
Updates the data with the provided diff, replacing old values at specified addresses by corresponding new ones
Trait Implementations§
impl<F: PrimeField> StructuralPartialEq for Diff<F>
Auto Trait Implementations§
impl<F> Freeze for Diff<F>
impl<F> RefUnwindSafe for Diff<F>where
F: RefUnwindSafe,
impl<F> Send for Diff<F>
impl<F> Sync for Diff<F>
impl<F> Unpin for Diff<F>where
F: Unpin,
impl<F> UnwindSafe for Diff<F>where
F: UnwindSafe,
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
Mutably borrows from an owned value. Read more