Type Definition yrs::XmlText [−][src]
pub type XmlText = XmlText;Expand description
A shared data type used for collaborative text editing, that can be used in a context of
YXmlElement nodee. 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.
Just like YXmlElement, YXmlText can be marked with extra metadata in form of attributes.
YXmlText 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, YXmlText 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.
