Skip to main content

yarray_observe

Function yarray_observe 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn yarray_observe( array: *const Branch, key_len: u32, key: *const c_char, state: *mut c_void, cb: extern "C" fn(*mut c_void, *const YArrayEvent), )
Expand description

Subscribes a given callback function cb under a key to changes made by this YArray instance. Callbacks are triggered whenever a ytransaction_commit is called. Use yunobserve with the same key to unsubscribe.