Module yrs::types::text

source ·

Structs§

  • A representation of an uniformly-formatted chunk of rich context stored by TextRef or XmlTextRef. It contains a value (which could be a string, embedded object or another shared type) with optional formatting attributes wrapping around this chunk. It can also contain some custom data generated by caller as part of TextRef::diff callback.
  • Event generated by [Text::observe] method. Emitted during transaction commit phase.
  • A preliminary text. It’s can be used to initialize a TextRef, when it’s about to be nested into another Yrs data collection, such as Map or Array.
  • 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 [Transaction::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.

Enums§

Traits§