pub struct Options {
pub client_id: u64,
pub guid: Arc<str>,
pub collection_id: Option<Arc<str>>,
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: u64Globally 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: Arc<str>A globally unique identifier for this document.
Default value: randomly generated UUID v4.
collection_id: Option<Arc<str>>Associate this document with a collection. This only plays a role if your provider has a concept of collection.
Default value: None.
offset_kind: OffsetKindHow to we count offsets and lengths used in text operations.
Default value: OffsetKind::Bytes.
skip_gc: boolDetermines if transactions commits should try to perform GC-ing of deleted items.
Default value: false.
auto_load: boolIf a subdocument, automatically load document. If this is a subdocument, remote peers will load the document as well automatically.
Default value: false.
should_load: boolWhether the document should be synced by the provider now. This is toggled to true when you call ydoc.load().
Default value: true.
Implementations§
Trait Implementations§
Source§impl Decode for Options
impl Decode for Options
impl Eq for Options
impl StructuralPartialEq for Options
Auto Trait Implementations§
impl Freeze for Options
impl RefUnwindSafe for Options
impl Send for Options
impl Sync for Options
impl Unpin for Options
impl UnwindSafe for Options
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request