pub struct Options {
pub client_id: ClientID,
pub guid: Uuid,
pub collection_id: Option<String>,
pub offset_kind: OffsetKind,
pub skip_gc: bool,
pub auto_load: bool,
pub should_load: bool,
}
Expand description
Configuration options of Doc instance.
Fields§
§client_id: ClientID
Globally unique client identifier. This value must be unique across all active collaborating peers, otherwise a update collisions will happen, causing document store state to be corrupted.
Default value: randomly generated.
guid: Uuid
A globally unique identifier for this document.
Default value: randomly generated UUID v4.
collection_id: Option<String>
Associate this document with a collection. This only plays a role if your provider has a concept of collection.
Default value: None
.
offset_kind: OffsetKind
How to we count offsets and lengths used in text operations.
Default value: OffsetKind::Bytes.
skip_gc: bool
Determines if transactions commits should try to perform GC-ing of deleted items.
Default value: false
.
auto_load: bool
If a subdocument, automatically load document. If this is a subdocument, remote peers will load the document as well automatically.
Default value: false
.
should_load: bool
Whether the document should be synced by the provider now. This is toggled to true when you call ydoc.load().
Default value: true
.