yarray_observe

Function yarray_observe 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn yarray_observe( array: *const Branch, state: *mut c_void, cb: extern "C" fn(*mut c_void, *const YArrayEvent), ) -> *mut Subscription
Expand description

Subscribes a given callback function cb to changes made by this YArray instance. Callbacks are triggered whenever a ytransaction_commit is called. Returns a subscription ID which can be then used to unsubscribe this callback by using yunobserve function.