Development Documentation (main branch) - For stable release docs, see docs.rs/eidetica

diff_updates_v2

Function diff_updates_v2 

pub fn diff_updates_v2(
    update: &[u8],
    state_vector: &[u8],
) -> Result<Vec<u8>, Error>
Expand description

Givens an input update (encoded using lib0 v2 encoding) of document A and an encoded state_vector of document B, returns a lib0 v2 encoded update, that contains all changes from A which have not been observed by B (based on its state vector).

Returns an error whenever any of the input arguments couldn’t be decoded.