Module types
Modules§
Structs§
- Events
- Events
Iter - MapRef
- Collection used to store key-value entries in an unordered manner. Keys are always represented as UTF-8 strings. Values can be any value type supported by Yrs: JSON-like primitives as well as shared data types.
- TextRef
- 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§
- Change
- A single change done over an array-component of shared data type.
- Delta
- A single change done over a text-like types: Text or [XmlText].
- Entry
Change - A single change done over a map-component of shared data type.
- Event
- Generalized wrapper around events fired by specialized shared data types.
- Path
Segment - A single segment of a Path.
- TypeRef
Constants§
- TYPE_
REFS_ ARRAY - Type ref identifier for an ArrayRef type.
- TYPE_
REFS_ DOC - Type ref identifier for a [DocRef] type.
- TYPE_
REFS_ MAP - Type ref identifier for a MapRef type.
- TYPE_
REFS_ TEXT - Type ref identifier for a TextRef type.
- TYPE_
REFS_ UNDEFINED - Placeholder type ref identifier for non-specialized AbstractType. Used only for root-level types which have been integrated from remote peers before they were defined locally.
- TYPE_
REFS_ WEAK - Type ref identifier for a [WeakRef] type.
- TYPE_
REFS_ XML_ ELEMENT - Type ref identifier for a XmlElementRef type.
- TYPE_
REFS_ XML_ FRAGMENT - Type ref identifier for a XmlFragmentRef type. Used for compatibility.
- TYPE_
REFS_ XML_ HOOK - Type ref identifier for a [XmlHookRef] type. Used for compatibility.
- TYPE_
REFS_ XML_ TEXT - Type ref identifier for a XmlTextRef type.
Traits§
- AsPrelim
- Trait which allows conversion back to a prelim type that can be used to create a new shared that’s a deep copy equivalent of a current type.
- Deep
Observable - Trait implemented by all Y-types, allowing for observing events which are emitted by nested types.
- Default
Prelim - Trait which allows to generate a Prelim-compatible type that - when integrated - will be converted into an instance of a current type.
- GetString
- Trait implemented by shared types to display their contents in string format.
- Map
- Observable
- RootRef
- A subset of SharedRef used to mark collaborative collections that can be used as a root level collections. This includes common types like ArrayRef, MapRef, TextRef and XmlFragmentRef.
- Shared
Ref - Common trait for shared collaborative collection types in Yrs.
- Text
- ToJson
Type Aliases§
- Attrs
- An alias for map of attributes used as formatting parameters by Text and [XmlText] types.
- Path
- A path describing nesting structure between shared collections containing each other. It’s a collection of segments which refer to either index (in case of Array or [XmlElement]) or string key (in case of Map) where successor shared collection can be found within subsequent parent types.