Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/alex-shapiro/ditto
/ functions
Functions
513 in github.com/alex-shapiro/ditto
⨍
Functions
513
◇
Types & classes
58
↓ 217 callers
Function
new
(idx: usize, len: usize, text: &str)
src/text/text_edit.rs:521
↓ 111 callers
Method
insert
(&mut self, dot: Dot)
src/dot.rs:53
↓ 72 callers
Method
clone_state
Clones and returns the `Counter` state.
src/counter.rs:91
↓ 47 callers
Method
execute_op
(&mut self, op: Op<K, V>)
src/map.rs:215
↓ 46 callers
Method
remove
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 callers
Method
push
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 callers
Method
clone
(&self)
src/text/mod.rs:413
↓ 38 callers
Method
state
Returns a reference to the `Counter` state.
src/counter.rs:86
↓ 33 callers
Function
test_serde
(value: T)
tests/common/mod.rs:5
↓ 30 callers
Method
replace
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 callers
Function
big
(num: usize)
src/sequence/uid.rs:161
↓ 23 callers
Method
increment
(&mut self, site_id: SiteId)
src/dot.rs:33
↓ 23 callers
Method
next
(&mut self)
src/tree.rs:469
↓ 21 callers
Method
element_len
(&self)
src/tree.rs:564
↓ 20 callers
Method
insert
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 callers
Method
merge
(&mut self, other: &Summary)
src/dot.rs:63
↓ 18 callers
Method
is_empty
Returns true if the tree has length 0. Returns false otherwise.
src/tree.rs:55
↓ 18 callers
Method
len
Returns the number of unicode characters in the text.
src/text/mod.rs:92
↓ 17 callers
Function
insert
(tree: &mut Tree<TextElement>, id: u64, text: &str)
src/tree.rs:793
↓ 17 callers
Method
iter
(&self)
src/map.rs:178
↓ 17 callers
Method
pop
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 callers
Method
into_iter
(self)
src/tree.rs:119
↓ 14 callers
Method
contains
(&self, dot: &Dot)
src/dot.rs:39
↓ 14 callers
Method
inserted_element
Returns a reference to the `Op`'s inserted element.
src/map.rs:378
↓ 14 callers
Method
remove
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 callers
Function
via_json
(value: &T)
tests/integration.rs:169
↓ 14 callers
Function
via_msgpack
(value: &T)
tests/integration.rs:176
↓ 13 callers
Method
shift_or_destroy
Shifts the TextEdit's index if the new edit is discontiguous, otherwise it returns None.
src/text/text_edit.rs:61
↓ 12 callers
Method
update
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 callers
Method
cmp
(&self, other: &Element<V>)
src/map.rs:99
↓ 11 callers
Method
id
(&self)
src/tree.rs:560
↓ 11 callers
Method
remove
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 callers
Method
get_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 callers
Function
decode_biguint
(bytes: &[u8])
src/vlq.rs:64
↓ 9 callers
Function
decode_u32
(bytes: &[u8])
src/vlq.rs:49
↓ 9 callers
Method
iter
Returns an iterator that visits the tree elements in ascending order.
src/tree.rs:115
↓ 8 callers
Method
is_leaf
(&self)
src/tree.rs:423
↓ 8 callers
Method
len
Returns the length of the tree.
src/tree.rs:49
↓ 8 callers
Method
len
(&self)
src/map.rs:174
↓ 7 callers
Method
add_site_id
(&mut self, site_id: SiteId)
src/dot.rs:72
↓ 7 callers
Method
cmp
(&self, other: &Element<T>)
src/list.rs:83
↓ 7 callers
Method
get
(&self, site_id: SiteId)
src/dot.rs:24
↓ 7 callers
Method
get_dot
(&mut self, site_id: SiteId)
src/dot.rs:28
↓ 7 callers
Method
is_internal
(&self)
src/tree.rs:428
↓ 7 callers
Method
replace_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 callers
Method
contains
Returns true iff the set contains the value.
src/set.rs:85
↓ 6 callers
Method
contains_pair
(&self, site_id: u32, counter: u32)
src/dot.rs:46
↓ 6 callers
Method
insert
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 callers
Method
insert
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 callers
Function
big
(value: u8)
src/vlq.rs:79
↓ 5 callers
Method
child_has_spare_element
(&self, child_idx: usize)
src/tree.rs:410
↓ 5 callers
Method
get_idx
Returns the start index of a tree element, or None if the element does not exist.
src/tree.rs:109
↓ 5 callers
Method
get_mut
(&mut self, key: &Q)
src/map.rs:182
↓ 5 callers
Method
insert_pair
(&mut self, site_id: u32, counter: u32)
src/dot.rs:58
↓ 5 callers
Function
map_op
(inner_op: OpInner)
src/json.rs:1010
↓ 5 callers
Method
push
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 callers
Method
try_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 callers
Method
add_site_id
(&mut self, site_id: SiteId)
src/json.rs:280
↓ 4 callers
Method
insert
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 callers
Method
is_empty
Returns true if the Text CRDT has a length of 0. Returns false otherwise.
src/text/mod.rs:98
↓ 4 callers
Method
iter
(&self)
src/list.rs:185
↓ 4 callers
Method
len
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 callers
Method
mut_nested_local
(&mut self, pointer: &[&str])
src/json.rs:338
↓ 4 callers
Function
text_op
(op: Op)
src/json.rs:1031
↓ 3 callers
Method
as_text
(&mut self)
src/json.rs:402
↓ 3 callers
Method
contains_key
Returns true iff the map has the key.
src/map.rs:116
↓ 3 callers
Method
dot
(&self)
src/sequence/uid.rs:54
↓ 3 callers
Function
encode_biguint
(value: &BigUint)
src/vlq.rs:26
↓ 3 callers
Function
encode_u32
(mut value: u32)
src/vlq.rs:5
↓ 3 callers
Method
execute_op
(&mut self, op: Op)
src/json.rs:237
↓ 3 callers
Function
gen_words
(count: usize)
benches/text.rs:57
↓ 3 callers
Function
insert_words
(words: &[String], mut rng: &mut ThreadRng)
benches/text.rs:33
↓ 3 callers
Method
into_json
(self, _: Dot)
src/json.rs:518
↓ 3 callers
Function
list_remove_op_uid
(op: Op)
src/json.rs:1024
↓ 3 callers
Method
local_value
(&self)
src/json.rs:288
↓ 3 callers
Function
nested_value
(crdt: &'a mut Json, pointer: &str)
src/json.rs:1000
↓ 3 callers
Method
removed_uid
(&self)
src/list.rs:397
↓ 2 callers
Method
as_list
(&mut self)
src/json.rs:395
↓ 2 callers
Method
as_map
(&mut self)
src/json.rs:388
↓ 2 callers
Method
can_merge
Checks whether the TextEdit and new edit can merge. Edits can be merged if they overlap.
src/text/text_edit.rs:110
↓ 2 callers
Function
choose_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 callers
Function
deserialize
(deserializer: D)
src/map_tuple_vec.rs:26
↓ 2 callers
Method
get_element
(&self, idx: usize)
src/text/mod.rs:301
↓ 2 callers
Method
get_prev_element
(&self, idx: usize)
src/text/mod.rs:306
↓ 2 callers
Method
insert_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 callers
Method
into_state
Consumes the `Counter` and returns its state.
src/counter.rs:96
↓ 2 callers
Method
is_full
(&self)
src/tree.rs:418
↓ 2 callers
Method
len
Returns the number of elements in the list.
src/list.rs:99
↓ 2 callers
Function
list_insert_op_element
(op: Op)
src/json.rs:1017
↓ 2 callers
Method
merge_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 callers
Method
nested_add_site_id
(&mut self, site_id: SiteId)
src/json.rs:411
↓ 2 callers
Method
remove
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 callers
Method
remove_at
(&mut self, idx: usize)
src/text/mod.rs:292
↓ 2 callers
Function
splice
TODO: Remove when String::splice is stable
src/text/text_edit.rs:116
↓ 2 callers
Method
split_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 callers
Method
to_string
(&self)
src/sequence/uid.rs:217
↓ 2 callers
Method
to_vlq
(&self)
src/sequence/uid.rs:145
↓ 2 callers
Method
try_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 callers
Function
as_list
(json_value: &Inner)
src/json.rs:1045
↓ 1 callers
Function
as_map
(json_value: &Inner)
src/json.rs:1038
next →
1–100 of 513, ranked by callers