Module user_state

Module user_state 

Source
Expand description

User state synchronized via Automerge.

Modules§

arbitrary
Arbitrary instances for property-based testing.

Structs§

DocInfo
Document reference information for user state synchronization.
PermissionInfo
A single permission entry for a document in user state.
RelationInfo
A relationship between two documents.
SnapshotInfo
Lightweight snapshot metadata for user state synchronization.
UserInfo
User info for user state synchronization.
UserState
State associated with a user, synchronized via Automerge.

Enums§

DocumentType
The type/kind of a document, without any associated content.

Constants§

DEFAULT_DOC_NAME
Default name for documents without a name.

Functions§

extract_relations_from_json
Extracts document relations from a JSON content tree.
get_or_create_user_state_doc
Gets or creates the user state document for a given user.
get_user_state_doc
Gets the user state document ID for a given user from the database.
initialize_user_state_doc
Initializes a user state document.
read_user_state_from_db
Reads user state from the database.
user_state_to_automerge
Converts a UserState into an Automerge document.