#[repr(C)]pub struct YOptions {
pub id: u64,
pub guid: *const c_char,
pub collection_id: *const c_char,
pub flags: u8,
}Expand description
Configuration object used by YDoc.
Fields§
§id: u64Globally unique 53-bit integer assigned to corresponding document replica as its identifier.
If two clients share the same id and will perform any updates, it will result in
unrecoverable document state corruption. The same thing may happen if the client restored
document state from snapshot, that didn’t contain all of that clients updates that were sent
to other peers.
guid: *const c_charA NULL-able globally unique Uuid v4 compatible null-terminated string identifier of this document. If passed as NULL, a random Uuid will be generated instead.
collection_id: *const c_charA NULL-able, UTF-8 encoded, null-terminated string of a collection that this document belongs to. It’s used only by providers.
flags: u8Boolean flags used to configure document options:
Y_OFFSET_BYTES: use UTF-8 byte length for text indexes and offsets.Y_OFFSET_UTF16: use UTF-16 code points for text indexes and offsets.Y_SKIP_GC: skip automatic garbage collection at transaction commit (useful for snapshots and keeping historical traces).Y_AUTO_LOAD: all subdocuments should be loaded automatically.Y_SHOULD_LOAD: should current document be synced with its provider immediatelly?Y_CLEANUP_TEXT_FMT: automatically remove dangling formatting attributes.
Trait Implementations§
Auto Trait Implementations§
impl !Send for YOptions
impl !Sync for YOptions
impl Freeze for YOptions
impl RefUnwindSafe for YOptions
impl Unpin for YOptions
impl UnsafeUnpin for YOptions
impl UnwindSafe for YOptions
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
Mutably borrows from an owned value. Read more