Function yrs::diff_updates_v1

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

Givens an input update (encoded using lib0 v1 encoding) of document A and an encoded state_vector of document B, returns a lib0 v1 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.