Skip to content

v0.20.0

@Horusiath Horusiath tagged this 25 Aug 17:26
- Async transactions #481: introduced yrs::AsyncTransact trait which works in similar way to yrs::Transact except transaction factory methods now return futures that can be awaited on.
- make Awareness thread-safe by default #482: Awareness operations now can be executed without &mut Awareness reference and are thread-safe.
- implement async y-sync protocol #483: y-sync AsyncProtocol introduced works just like Protocol except it uses new AsyncTransact API to handle transactions required for y-sync protocol message handling in asynchronous way.
- alow direct construction of XmlDeltaPrelim #480: XmlDeltaPrelim fields are now exposed.
- yffi:
  - yffi: tests for input and output #484: fixed issue when reading JSON map outputs caused segfaults.
  - yffi: add operators to interact with JSON strings #485: introduced new API functions that allow to use JSON string as input types (yinput_json), and reading any shared ref contents back as JSON (ybranch_json). Additionally ymap_get_json and yarray_get_json can be used to read individual contents of YArray and YMap as JSON strings.
  - yffi: ytext_insert_delta function #486: exposes ability to perform many sequential operations defined as deltas through ytext_insert_delta function - especially usefull when copy/pasting long sequences of rich-formatted text.

Breaking changes

- yffi: renamed YDelta → YDeltaOut.
- yrs::Doc::options is no longer available. Instead options fields like auto_load/should_load etc. are now dedicated methods on Doc object.
- Doc::collection_id type changed: String → Arc<str>.
- yrs::Transact: transact/transact_mut/transact_mut_with methods will no longer panic when transaction cannot be acquired. Instead we'll force waiting at the current thread (which can potentially cause a deadlock). If previous behavior is desired, it can be achieved via doc.try_transact().unwrap() call.
- y-sync Protocol methods no longer use &mut Awareness parameter: due to make Awareness thread-safe by default #482 all Awareness method can be called on &Awareness alone.
- Awareness no longer exposes clients and meta hashmaps. If you need to access all clients or metas, you can use Awareness::iter instead.
- Awareness::local_state/Awareness::state generic constraint changed: Deserialize<'de> → DeserializeOwned.
Assets 2
Loading