Struct yrs::TransactionMut

source ·
pub struct TransactionMut<'doc> { /* private fields */ }

Implementations§

Corresponding document’s state vector at the moment when current transaction was created.

Current document state vector which includes changes made by this transaction.

Data about deletions performed in the scope of current transaction.

Encodes changes made within the scope of the current transaction using lib0 v1 encoding.

Document updates are idempotent and commutative. Caveats:

  • It doesn’t matter in which order document updates are applied.
  • As long as all clients receive the same document updates, all clients end up with the same content.
  • Even if an update contains known information, the unknown information is extracted and integrated into the document structure.

Encodes changes made within the scope of the current transaction using lib0 v2 encoding.

Document updates are idempotent and commutative. Caveats:

  • It doesn’t matter in which order document updates are applied.
  • As long as all clients receive the same document updates, all clients end up with the same content.
  • Even if an update contains known information, the unknown information is extracted and integrated into the document structure.

Encodes changes made within the scope of the current transaction.

Document updates are idempotent and commutative. Caveats:

  • It doesn’t matter in which order document updates are applied.
  • As long as all clients receive the same document updates, all clients end up with the same content.
  • Even if an update contains known information, the unknown information is extracted and integrated into the document structure.

Applies a deserialized update contents into a document owning current transaction.

Commits current transaction. This step involves cleaning up and optimizing changes performed during lifetime of a transaction. Such changes include squashing delete sets data or squashing blocks that have been appended one after another to preserve memory.

This step is performed automatically when a transaction is about to be dropped (its life scope comes to an end).

Trait Implementations§

Executes the destructor for this type. Read more
Returns state vector describing current state of the updates.
Returns a snapshot which describes a current state of updates and removals made within the corresponding document. Read more
Encodes all changes from current transaction block store up to a given snapshot. This enables to encode state of a document at some specific point in the past. Read more
Encodes the difference between remove peer state given its state_vector and the state of a current local peer Read more
Returns an iterator over top level (root) shared types available in current Doc.
Returns a collection of globally unique identifiers of sub documents linked within the structures of this document store. Read more
Returns a collection of sub documents linked within the structures of this document store.
Returns a TextRef data structure stored under a given name. Text structures are used for collaborative text editing: they expose operations to append and remove chunks of text, which are free to execute concurrently by multiple peers over remote boundaries. Read more
Returns an ArrayRef data structure stored under a given name. Array structures are used for storing a sequences of elements in ordered manner, positioning given element accordingly to its index. Read more
Returns a MapRef data structure stored under a given name. Maps are used to store key-value pairs associated together. These values can be primitive data (similar but not limited to a JavaScript Object Notation) as well as other shared types (Yrs maps, arrays, text structures etc.), enabling to construct a complex recursive tree structures. Read more
Returns a XmlFragmentRef data structure stored under a given name. XML elements represent nodes of XML document. They can contain attributes (key-value pairs, both of string type) as well as other nested XML elements or text values, which are stored in their insertion order. Read more
Returns a XmlElementRef data structure stored under a given name. XML elements represent nodes of XML document. They can contain attributes (key-value pairs, both of string type) as well as other nested XML elements or text values, which are stored in their insertion order. Read more
Returns a XmlTextRef data structure stored under a given name. Text structures are used for collaborative text editing: they expose operations to append and remove chunks of text, which are free to execute concurrently by multiple peers over remote boundaries. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.