Function yrs::ytransaction_state_vector_v1[][src]

#[no_mangle]
pub unsafe extern "C" fn ytransaction_state_vector_v1(
    txn: *const Transaction,
    len: *mut c_int
) -> *mut c_uchar
Expand description

Returns a state vector of a current transaction’s document, serialized using lib0 version 1 encoding. Payload created by this function can then be send over the network to a remote peer, where it can be used as a parameter of ytransaction_state_diff_v1 in order to produce a delta update payload, that can be send back and applied locally in order to efficiently propagate updates from one peer to another.

The length of a generated binary will be passed within a len out parameter.

Once no longer needed, a returned binary can be disposed using ybinary_destroy function.