Type Definition yrs::Text [−][src]
pub type Text = Text;Expand description
A shared data type used for collaborative text editing. It enables multiple users to add and remove chunks of text in efficient manner. This type is internally represented as a mutable double-linked list of text chunks - an optimization occurs during ytransaction_commit, which allows to squash multiple consecutively inserted characters together as a single chunk of text even between transaction boundaries in order to preserve more efficient memory model.
YText structure internally uses UTF-8 encoding and its length depends on encoding configured
on YDoc instance (using UTF-8 byte length by default).
Like all Yrs shared data types, YText is resistant to the problem of interleaving (situation
when characters inserted one after another may interleave with other peers concurrent inserts
after merging all updates together). In case of Yrs conflict resolution is solved by using
unique document id to determine correct and consistent ordering.
