MCPcopy Create free account

hub / github.com/alex-shapiro/ditto / functions

Functions513 in github.com/alex-shapiro/ditto

↓ 217 callersFunctionnew
(idx: usize, len: usize, text: &str)
src/text/text_edit.rs:521
↓ 111 callersMethodinsert
(&mut self, dot: Dot)
src/dot.rs:53
↓ 72 callersMethodclone_state
Clones and returns the `Counter` state.
src/counter.rs:91
↓ 47 callersMethodexecute_op
(&mut self, op: Op<K, V>)
src/map.rs:215
↓ 46 callersMethodremove
Removes a key from the map and returns a remote op that can be sent to remote sites for replication. If the map does not have a site allocated, it cac
src/map.rs:140
↓ 42 callersMethodpush
Pushes a value onto the end of the list. If the list does not have a site id, it caches the resulting op and returns an `AwaitingSiteId` error.
src/list.rs:118
↓ 39 callersMethodclone
(&self)
src/text/mod.rs:413
↓ 38 callersMethodstate
Returns a reference to the `Counter` state.
src/counter.rs:86
↓ 33 callersFunctiontest_serde
(value: T)
tests/common/mod.rs:5
↓ 30 callersMethodreplace
Replaces the text in the range [idx..<idx+len] with new text. Panics if the start or stop idx is larger than the `Text`'s length, or if it does not li
src/text/mod.rs:107
↓ 25 callersFunctionbig
(num: usize)
src/sequence/uid.rs:161
↓ 23 callersMethodincrement
(&mut self, site_id: SiteId)
src/dot.rs:33
↓ 23 callersMethodnext
(&mut self)
src/tree.rs:469
↓ 21 callersMethodelement_len
(&self)
src/tree.rs:564
↓ 20 callersMethodinsert
Inserts a value into the Json CRDT at the given json pointer. The enclosing value may be an object or an array and the inserted value must satisfy the
src/json.rs:136
↓ 20 callersMethodmerge
(&mut self, other: &Summary)
src/dot.rs:63
↓ 18 callersMethodis_empty
Returns true if the tree has length 0. Returns false otherwise.
src/tree.rs:55
↓ 18 callersMethodlen
Returns the number of unicode characters in the text.
src/text/mod.rs:92
↓ 17 callersFunctioninsert
(tree: &mut Tree<TextElement>, id: u64, text: &str)
src/tree.rs:793
↓ 17 callersMethoditer
(&self)
src/map.rs:178
↓ 17 callersMethodpop
Removes the value at the end of the list, if the list is nonempty. If the list is empty, it returns None. If the pop succeeds but the list does not ha
src/list.rs:128
↓ 16 callersMethodinto_iter
(self)
src/tree.rs:119
↓ 14 callersMethodcontains
(&self, dot: &Dot)
src/dot.rs:39
↓ 14 callersMethodinserted_element
Returns a reference to the `Op`'s inserted element.
src/map.rs:378
↓ 14 callersMethodremove
Deletes an element from the tree. Returns None if the element is not in the tree. This allows the CRDT to handle duplicate operations without losing c
src/tree.rs:77
↓ 14 callersFunctionvia_json
(value: &T)
tests/integration.rs:169
↓ 14 callersFunctionvia_msgpack
(value: &T)
tests/integration.rs:176
↓ 13 callersMethodshift_or_destroy
Shifts the TextEdit's index if the new edit is discontiguous, otherwise it returns None.
src/text/text_edit.rs:61
↓ 12 callersMethodupdate
Updates the `Register`'s value and returns an op that can be replciated to other sites. If the register does not have a site id allocated, it caches t
src/register.rs:79
↓ 11 callersMethodcmp
(&self, other: &Element<V>)
src/map.rs:99
↓ 11 callersMethodid
(&self)
src/tree.rs:560
↓ 11 callersMethodremove
Removes a value at the given JSON pointer from the Json CRDT. If the enclosing value is an object, it deletes the key-value pair. If the enclosing val
src/json.rs:161
↓ 10 callersMethodget_elt
Returns the element that contains the character at location `index`, as well as the offset of `index` within the element. Returns an error if the inde
src/tree.rs:97
↓ 9 callersFunctiondecode_biguint
(bytes: &[u8])
src/vlq.rs:64
↓ 9 callersFunctiondecode_u32
(bytes: &[u8])
src/vlq.rs:49
↓ 9 callersMethoditer
Returns an iterator that visits the tree elements in ascending order.
src/tree.rs:115
↓ 8 callersMethodis_leaf
(&self)
src/tree.rs:423
↓ 8 callersMethodlen
Returns the length of the tree.
src/tree.rs:49
↓ 8 callersMethodlen
(&self)
src/map.rs:174
↓ 7 callersMethodadd_site_id
(&mut self, site_id: SiteId)
src/dot.rs:72
↓ 7 callersMethodcmp
(&self, other: &Element<T>)
src/list.rs:83
↓ 7 callersMethodget
(&self, site_id: SiteId)
src/dot.rs:24
↓ 7 callersMethodget_dot
(&mut self, site_id: SiteId)
src/dot.rs:28
↓ 7 callersMethodis_internal
(&self)
src/tree.rs:428
↓ 7 callersMethodreplace_text
Replaces a text range in a text value in the Json CRDT. If the CRDT does not have a site id allocated, it caches the op and returns an `AwaitingSite`
src/json.rs:169
↓ 6 callersMethodcontains
Returns true iff the set contains the value.
src/set.rs:85
↓ 6 callersMethodcontains_pair
(&self, site_id: u32, counter: u32)
src/dot.rs:46
↓ 6 callersMethodinsert
Inserts an element into the tree or returns an error if the contains an element with the same id. Each element must conform to the Element trait, whic
src/tree.rs:64
↓ 6 callersMethodinsert
Inserts a key-value pair into the map and returns a remote op that can be sent to remote sites for replication. If the map does not have a site alloca
src/map.rs:130
↓ 5 callersFunctionbig
(value: u8)
src/vlq.rs:79
↓ 5 callersMethodchild_has_spare_element
(&self, child_idx: usize)
src/tree.rs:410
↓ 5 callersMethodget_idx
Returns the start index of a tree element, or None if the element does not exist.
src/tree.rs:109
↓ 5 callersMethodget_mut
(&mut self, key: &Q)
src/map.rs:182
↓ 5 callersMethodinsert_pair
(&mut self, site_id: u32, counter: u32)
src/dot.rs:58
↓ 5 callersFunctionmap_op
(inner_op: OpInner)
src/json.rs:1010
↓ 5 callersMethodpush
Tries to merge a new text edit into the last element of a sequence. If the new edit can't be merged, it is pushed to the end of the sequence.
src/text/text_edit.rs:76
↓ 5 callersMethodtry_merge
Tries to merge a new text edit into Self. Unlike `try_overwrite`, this is a straightforward merge of the effects of the new edit into the effects of t
src/text/text_edit.rs:40
↓ 4 callersMethodadd_site_id
(&mut self, site_id: SiteId)
src/json.rs:280
↓ 4 callersMethodinsert
Inserts a value into the set and returns a remote op that can be sent to remote sites for replication. If the set does not have a site allocated, it c
src/set.rs:93
↓ 4 callersMethodis_empty
Returns true if the Text CRDT has a length of 0. Returns false otherwise.
src/text/mod.rs:98
↓ 4 callersMethoditer
(&self)
src/list.rs:185
↓ 4 callersMethodlen
Returns the number of elements in a container at the given pointer in the `Json` CRDT. If there is no container at the given pointer, returns `None`.
src/json.rs:120
↓ 4 callersMethodmut_nested_local
(&mut self, pointer: &[&str])
src/json.rs:338
↓ 4 callersFunctiontext_op
(op: Op)
src/json.rs:1031
↓ 3 callersMethodas_text
(&mut self)
src/json.rs:402
↓ 3 callersMethodcontains_key
Returns true iff the map has the key.
src/map.rs:116
↓ 3 callersMethoddot
(&self)
src/sequence/uid.rs:54
↓ 3 callersFunctionencode_biguint
(value: &BigUint)
src/vlq.rs:26
↓ 3 callersFunctionencode_u32
(mut value: u32)
src/vlq.rs:5
↓ 3 callersMethodexecute_op
(&mut self, op: Op)
src/json.rs:237
↓ 3 callersFunctiongen_words
(count: usize)
benches/text.rs:57
↓ 3 callersFunctioninsert_words
(words: &[String], mut rng: &mut ThreadRng)
benches/text.rs:33
↓ 3 callersMethodinto_json
(self, _: Dot)
src/json.rs:518
↓ 3 callersFunctionlist_remove_op_uid
(op: Op)
src/json.rs:1024
↓ 3 callersMethodlocal_value
(&self)
src/json.rs:288
↓ 3 callersFunctionnested_value
(crdt: &'a mut Json, pointer: &str)
src/json.rs:1000
↓ 3 callersMethodremoved_uid
(&self)
src/list.rs:397
↓ 2 callersMethodas_list
(&mut self)
src/json.rs:395
↓ 2 callersMethodas_map
(&mut self)
src/json.rs:388
↓ 2 callersMethodcan_merge
Checks whether the TextEdit and new edit can merge. Edits can be merged if they overlap.
src/text/text_edit.rs:110
↓ 2 callersFunctionchoose_index
Probablistically chooses a new insert index. 96% of the time it uses the old index 2% of the time it chooses the end of the string 2% of the time it c
benches/text.rs:75
↓ 2 callersFunctiondeserialize
(deserializer: D)
src/map_tuple_vec.rs:26
↓ 2 callersMethodget_element
(&self, idx: usize)
src/text/mod.rs:301
↓ 2 callersMethodget_prev_element
(&self, idx: usize)
src/text/mod.rs:306
↓ 2 callersMethodinsert_str
Inserts a value into the Json CRDT at the given json pointer. The enclosing value may be an object or an array and the value being inserted is stringi
src/json.rs:149
↓ 2 callersMethodinto_state
Consumes the `Counter` and returns its state.
src/counter.rs:96
↓ 2 callersMethodis_full
(&self)
src/tree.rs:418
↓ 2 callersMethodlen
Returns the number of elements in the list.
src/list.rs:99
↓ 2 callersFunctionlist_insert_op_element
(op: Op)
src/json.rs:1017
↓ 2 callersMethodmerge_children
Merge the node's ith and (i+1)th children, then remove the median separating them as well as the (i+1)th node. The new node MUST contain 2B-1 elements
src/tree.rs:365
↓ 2 callersMethodnested_add_site_id
(&mut self, site_id: SiteId)
src/json.rs:411
↓ 2 callersMethodremove
Removes a value from the set and returns a remote op that can be sent to remote sites for replication. If the set does not have a site allocated, it c
src/set.rs:103
↓ 2 callersMethodremove_at
(&mut self, idx: usize)
src/text/mod.rs:292
↓ 2 callersFunctionsplice
TODO: Remove when String::splice is stable
src/text/text_edit.rs:116
↓ 2 callersMethodsplit_child
Split the node's ith child in half. The original child MUST be full (ie, it contains 2B-1 elements and 2B children). Each new child has B-1 elements a
src/tree.rs:339
↓ 2 callersMethodto_string
(&self)
src/sequence/uid.rs:217
↓ 2 callersMethodto_vlq
(&self)
src/sequence/uid.rs:145
↓ 2 callersMethodtry_overwrite
Tries to overwrite a TextEdit. The effect on Self is to remove the previous edit and insert a new edit that incorporates the effects of the old edit.
src/text/text_edit.rs:18
↓ 1 callersFunctionas_list
(json_value: &Inner)
src/json.rs:1045
↓ 1 callersFunctionas_map
(json_value: &Inner)
src/json.rs:1038
next →1–100 of 513, ranked by callers