Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
New features
yrs::AsyncTransact
trait which works in similar way toyrs::Transact
except transaction factory methods now return futures that can be awaited on.Awareness
operations now can be executed without&mut Awareness
reference and are thread-safe.AsyncProtocol
introduced works just likeProtocol
except it uses newAsyncTransact
API to handle transactions required for y-sync protocol message handling in asynchronous way.XmlDeltaPrelim
fields are now exposed.yffi
:yinput_json
), and reading any shared ref contents back as JSON (ybranch_json
). Additionallyymap_get_json
andyarray_get_json
can be used to read individual contents of YArray and YMap as JSON strings.ytext_insert_delta
function - especially usefull when copy/pasting long sequences of rich-formatted text.Breaking changes
yffi
: renamedYDelta
→YDeltaOut
.yrs::Doc::options
is no longer available. Instead options fields likeauto_load
/should_load
etc. are now dedicated methods onDoc
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 viadoc.try_transact().unwrap()
call.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 exposesclients
andmeta
hashmaps. If you need to access all clients or metas, you can useAwareness::iter
instead.Awareness::local_state
/Awareness::state
generic constraint changed:Deserialize<'de>
→DeserializeOwned
.