Function yrs::ydoc_read_transaction
source · #[no_mangle]
pub unsafe extern "C" fn ydoc_read_transaction(
doc: *mut Doc
) -> *mut Transaction
Expand description
Starts a new read-only transaction on a given document. All other operations happen in context
of a transaction. Yrs transactions do not follow ACID rules. Once a set of operations is
complete, a transaction can be finished using ytransaction_commit
function.
Returns NULL
if read-only transaction couldn’t be created, i.e. when another read-write
transaction is already opened.