var searchIndex = {}; searchIndex["xi_rope"] = {"doc":"A rope data structure suitable for text editing","items":[[3,"Rope","xi_rope","A rope data structure.",null,null],[3,"ChunkIter","","",null,null],[3,"LinesRaw","","",null,null],[3,"Lines","","",null,null],[0,"tree","","A general b-tree structure suitable for ropes and the like.",null,null],[3,"Node","xi_rope::tree","A b-tree node storing leaves at the bottom, and with info\nretained at each node. It is implemented with atomic reference counting\nand copy-on-write semantics, so an immutable clone is a very cheap\noperation, and nodes can be shared across threads. Even so, it is\ndesigned to be updated in place, with efficiency similar to a mutable\ndata structure, using uniqueness of reference count to detect when\nthis operation is safe.",null,null],[3,"TreeBuilder","","",null,null],[3,"Cursor","","",null,null],[8,"NodeInfo","","",null,null],[16,"L","","The type of the leaf.",0,null],[10,"accumulate","","An operator that combines info from two subtrees. It is intended\n(but not strictly enforced) that this operator be associative and\nobey an identity property. In mathematical terms, the accumulate\nmethod is the sum operator of a monoid.",0,null],[10,"compute_info","","A mapping from a leaf into the info type. It is intended (but\nnot strictly enforced) that applying the accumulate method to\nthe info derived from two leaves gives the same result as\nderiving the info from the concatenation of the two leaves. In\nmathematical terms, the compute_info method is a monoid\nhomomorphism.",0,{"inputs":[{"name":"l"}],"output":{"name":"self"}}],[11,"identity","","The identity of the monoid. Need not be implemented because it\ncan be computed from the leaf default.",0,{"inputs":[],"output":{"name":"self"}}],[11,"interval","","The interval covered by this node. Will generally be implemented\nin interval trees; the default impl is sufficient for other types.",0,null],[8,"Leaf","","",null,null],[10,"len","","",1,null],[10,"is_ok_child","","",1,null],[10,"push_maybe_split","","",1,null],[11,"subseq","","",1,null],[8,"Metric","","",null,null],[10,"measure","","",2,{"inputs":[{"name":"n"},{"name":"usize"}],"output":{"name":"usize"}}],[10,"to_base_units","","",2,{"inputs":[{"name":"l"},{"name":"usize"}],"output":{"name":"usize"}}],[10,"from_base_units","","",2,{"inputs":[{"name":"l"},{"name":"usize"}],"output":{"name":"usize"}}],[10,"is_boundary","","",2,{"inputs":[{"name":"l"},{"name":"usize"}],"output":{"name":"bool"}}],[10,"prev","","",2,{"inputs":[{"name":"l"},{"name":"usize"}],"output":{"name":"option"}}],[10,"next","","",2,{"inputs":[{"name":"l"},{"name":"usize"}],"output":{"name":"option"}}],[10,"can_fragment","","",2,{"inputs":[],"output":{"name":"bool"}}],[11,"clone","","",3,null],[11,"from_leaf","","",3,{"inputs":[{"name":"l"}],"output":{"name":"node"}}],[11,"len","","",3,null],[11,"concat","","",3,{"inputs":[{"name":"node"},{"name":"node"}],"output":{"name":"node"}}],[11,"measure","","",3,null],[11,"push_subseq","","",3,null],[11,"subseq","","",3,null],[11,"edit","","",3,null],[11,"convert_metrics","","",3,null],[11,"default","","",3,{"inputs":[],"output":{"name":"node"}}],[11,"new","","",4,{"inputs":[],"output":{"name":"treebuilder"}}],[11,"push","","",4,null],[11,"push_leaf","","",4,null],[11,"push_leaf_slice","","",4,null],[11,"build","","",4,null],[11,"new","","",5,{"inputs":[{"name":"node"},{"name":"usize"}],"output":{"name":"cursor"}}],[11,"get_leaf","","",5,null],[11,"set","","",5,null],[11,"pos","","",5,null],[11,"is_boundary","","",5,null],[11,"prev","","",5,null],[11,"next","","",5,null],[11,"next_leaf","","",5,null],[11,"prev_leaf","","",5,null],[0,"breaks","xi_rope","A module for representing a set of breaks, typically used for\nstoring the result of line breaking.",null,null],[3,"BreaksLeaf","xi_rope::breaks","",null,null],[3,"BreaksInfo","","",null,null],[3,"BreaksMetric","","",null,null],[3,"BreaksBaseMetric","","",null,null],[3,"BreakBuilder","","",null,null],[6,"Breaks","","",null,null],[11,"eq","","",6,null],[11,"ne","","",6,null],[11,"default","","",6,{"inputs":[],"output":{"name":"breaksleaf"}}],[11,"fmt","","",6,null],[11,"clone","","",6,null],[11,"clone","","",7,null],[11,"len","","",6,null],[11,"is_ok_child","","",6,null],[11,"push_maybe_split","","",6,null],[11,"accumulate","","",7,null],[11,"compute_info","","",7,{"inputs":[{"name":"breaksleaf"}],"output":{"name":"breaksinfo"}}],[11,"clone","","",8,null],[11,"measure","","",8,{"inputs":[{"name":"breaksinfo"},{"name":"usize"}],"output":{"name":"usize"}}],[11,"to_base_units","","",8,{"inputs":[{"name":"breaksleaf"},{"name":"usize"}],"output":{"name":"usize"}}],[11,"from_base_units","","",8,{"inputs":[{"name":"breaksleaf"},{"name":"usize"}],"output":{"name":"usize"}}],[11,"is_boundary","","",8,{"inputs":[{"name":"breaksleaf"},{"name":"usize"}],"output":{"name":"bool"}}],[11,"prev","","",8,{"inputs":[{"name":"breaksleaf"},{"name":"usize"}],"output":{"name":"option"}}],[11,"next","","",8,{"inputs":[{"name":"breaksleaf"},{"name":"usize"}],"output":{"name":"option"}}],[11,"can_fragment","","",8,{"inputs":[],"output":{"name":"bool"}}],[11,"clone","","",9,null],[11,"measure","","",9,{"inputs":[{"name":"breaksinfo"},{"name":"usize"}],"output":{"name":"usize"}}],[11,"to_base_units","","",9,{"inputs":[{"name":"breaksleaf"},{"name":"usize"}],"output":{"name":"usize"}}],[11,"from_base_units","","",9,{"inputs":[{"name":"breaksleaf"},{"name":"usize"}],"output":{"name":"usize"}}],[11,"is_boundary","","",9,{"inputs":[{"name":"breaksleaf"},{"name":"usize"}],"output":{"name":"bool"}}],[11,"prev","","",9,{"inputs":[{"name":"breaksleaf"},{"name":"usize"}],"output":{"name":"option"}}],[11,"next","","",9,{"inputs":[{"name":"breaksleaf"},{"name":"usize"}],"output":{"name":"option"}}],[11,"can_fragment","","",9,{"inputs":[],"output":{"name":"bool"}}],[11,"new_no_break","","",10,{"inputs":[{"name":"usize"}],"output":{"name":"breaks"}}],[11,"default","","",11,{"inputs":[],"output":{"name":"breakbuilder"}}],[11,"new","","",11,{"inputs":[],"output":{"name":"breakbuilder"}}],[11,"add_break","","",11,null],[11,"add_no_break","","",11,null],[11,"build","","",11,null],[0,"interval","xi_rope","Intervals that can be open or closed at the ends.",null,null],[3,"Interval","xi_rope::interval","",null,null],[11,"eq","","",12,null],[11,"ne","","",12,null],[11,"clone","","",12,null],[11,"fmt","","",12,null],[11,"fmt","","",12,null],[11,"new","","",12,{"inputs":[{"name":"usize"},{"name":"bool"},{"name":"usize"},{"name":"bool"}],"output":{"name":"interval"}}],[11,"new_open_open","","",12,{"inputs":[{"name":"usize"},{"name":"usize"}],"output":{"name":"interval"}}],[11,"new_open_closed","","",12,{"inputs":[{"name":"usize"},{"name":"usize"}],"output":{"name":"interval"}}],[11,"new_closed_open","","",12,{"inputs":[{"name":"usize"},{"name":"usize"}],"output":{"name":"interval"}}],[11,"new_closed_closed","","",12,{"inputs":[{"name":"usize"},{"name":"usize"}],"output":{"name":"interval"}}],[11,"start","","",12,null],[11,"end","","",12,null],[11,"start_end","","",12,null],[11,"is_start_closed","","",12,null],[11,"is_end_closed","","",12,null],[11,"is_before","","",12,null],[11,"contains","","",12,null],[11,"is_after","","",12,null],[11,"is_empty","","",12,null],[11,"intersect","","",12,null],[11,"union","","",12,null],[11,"prefix","","",12,null],[11,"suffix","","",12,null],[11,"translate","","",12,null],[11,"translate_neg","","",12,null],[11,"size","","",12,null],[0,"delta","xi_rope","A data structure for representing editing operations on ropes.\nIt's useful to explicitly represent these operations so they can be\nshared across multiple subsystems.",null,null],[3,"Delta","xi_rope::delta","",null,null],[4,"DeltaElement","","",null,null],[13,"Copy","","",13,null],[13,"Insert","","",13,null],[11,"simple_edit","","",14,{"inputs":[{"name":"interval"},{"name":"node"},{"name":"usize"}],"output":{"name":"delta"}}],[11,"apply","","Apply the delta to the given rope. May not work well if the length of the rope\nis not compatible with the construction of the delta.",14,null],[11,"factor","","Factor the delta into an insert-only delta and a subset representing deletions.\nApplying the insert then the delete yields the same result as the original delta:",14,null],[11,"synthesize","","Synthesize a delta from a "union string" and two subsets, one representing\ninsertions and the other representing deletions. This is basically the inverse\nof `factor`.",14,{"inputs":[{"name":"node"},{"name":"subset"},{"name":"subset"}],"output":{"name":"delta"}}],[11,"transform_expand","","Do a coordinate transformation on an insert-only delta. The `after` parameter\ncontrols whether the insertions in `self` come after those specific in the\ncoordinate transform.",14,null],[11,"invert_insert","","Return a subset that inverts the insert-only delta:",14,null],[11,"summary","","Produce a summary of the delta. Everything outside the returned interval\nis unchanged, and the old contents of the interval are replaced by new\ncontents of the returned length. Equations:",14,null],[0,"rope","xi_rope","A rope data structure with a line count metric and (soon) other useful\ninfo.",null,null],[3,"RopeInfo","xi_rope::rope","",null,null],[3,"BaseMetric","","",null,null],[3,"LinesMetric","","",null,null],[3,"ChunkIter","","",null,null],[3,"LinesRaw","","",null,null],[3,"Lines","","",null,null],[6,"Rope","","The main rope data structure. It is implemented as a b-tree with simply\n`String` as the leaf type. The base metric counts UTF-8 code units\n(bytes) and has boundaries at code points.",null,null],[11,"clone","","",15,null],[11,"accumulate","","",15,null],[11,"compute_info","","",15,{"inputs":[{"name":"string"}],"output":{"name":"self"}}],[11,"identity","","",15,{"inputs":[],"output":{"name":"self"}}],[11,"clone","","",16,null],[11,"measure","","",16,{"inputs":[{"name":"ropeinfo"},{"name":"usize"}],"output":{"name":"usize"}}],[11,"to_base_units","","",16,{"inputs":[{"name":"string"},{"name":"usize"}],"output":{"name":"usize"}}],[11,"from_base_units","","",16,{"inputs":[{"name":"string"},{"name":"usize"}],"output":{"name":"usize"}}],[11,"is_boundary","","",16,{"inputs":[{"name":"string"},{"name":"usize"}],"output":{"name":"bool"}}],[11,"prev","","",16,{"inputs":[{"name":"string"},{"name":"usize"}],"output":{"name":"option"}}],[11,"next","","",16,{"inputs":[{"name":"string"},{"name":"usize"}],"output":{"name":"option"}}],[11,"can_fragment","","",16,{"inputs":[],"output":{"name":"bool"}}],[11,"clone","","",17,null],[11,"measure","","",17,{"inputs":[{"name":"ropeinfo"},{"name":"usize"}],"output":{"name":"usize"}}],[11,"is_boundary","","",17,{"inputs":[{"name":"string"},{"name":"usize"}],"output":{"name":"bool"}}],[11,"to_base_units","","",17,{"inputs":[{"name":"string"},{"name":"usize"}],"output":{"name":"usize"}}],[11,"from_base_units","","",17,{"inputs":[{"name":"string"},{"name":"usize"}],"output":{"name":"usize"}}],[11,"prev","","",17,{"inputs":[{"name":"string"},{"name":"usize"}],"output":{"name":"option"}}],[11,"next","","",17,{"inputs":[{"name":"string"},{"name":"usize"}],"output":{"name":"option"}}],[11,"can_fragment","","",17,{"inputs":[],"output":{"name":"bool"}}],[11,"from_str","","",18,{"inputs":[{"name":"str"}],"output":{"name":"result"}}],[11,"edit_str","","",18,null],[11,"prev_codepoint_offset","","Return the offset of the codepoint before `offset`.",18,null],[11,"next_codepoint_offset","","Return the offset of the codepoint after `offset`.",18,null],[11,"prev_grapheme_offset","","",18,null],[11,"next_grapheme_offset","","",18,null],[11,"line_of_offset","","Return the line number corresponding to the byte index `offset`.",18,null],[11,"offset_of_line","","Return the byte offset corresponding to the line number `line`.",18,null],[11,"iter_chunks","","Returns an iterator over chunks of the rope.",18,null],[11,"lines_raw","","An iterator over the raw lines. The lines, except the last, include the\nterminating newline.",18,null],[11,"lines","","An iterator over the lines of a rope.",18,null],[11,"byte_at","","",18,null],[11,"slice_to_string","","",18,null],[11,"next","","",19,null],[11,"push_str","xi_rope::tree","",4,null],[11,"from","xi_rope::rope","",18,{"inputs":[{"name":"t"}],"output":{"name":"rope"}}],[11,"next_codepoint","xi_rope::tree","",5,null],[11,"next","xi_rope::rope","",20,null],[11,"next","","",21,null],[0,"spans","xi_rope","A module for representing spans (in an interval tree), useful for rich text\nannotations. It is parameterized over a data type, so can be used for\nstoring different annotations.",null,null],[3,"Span","xi_rope::spans","",null,null],[3,"SpansLeaf","","",null,null],[3,"SpansInfo","","",null,null],[3,"SpansBuilder","","",null,null],[3,"SpanIter","","",null,null],[6,"Spans","","",null,null],[11,"clone","","",22,null],[11,"default","","",23,{"inputs":[],"output":{"name":"spansleaf"}}],[11,"clone","","",23,null],[11,"clone","","",24,null],[11,"len","","",23,null],[11,"is_ok_child","","",23,null],[11,"push_maybe_split","","",23,null],[11,"accumulate","","",24,null],[11,"compute_info","","",24,{"inputs":[{"name":"spansleaf"}],"output":{"name":"self"}}],[11,"new","","",25,{"inputs":[{"name":"usize"}],"output":{"name":"self"}}],[11,"add_span","","",25,null],[11,"build","","",25,null],[11,"iter","","",26,null],[11,"next","","",27,null],[0,"subset","xi_rope","A data structure for representing subsets of sequences (typically strings).",null,null],[3,"Subset","xi_rope::subset","",null,null],[3,"SubsetBuilder","","",null,null],[3,"RangeIter","","",null,null],[11,"default","","",28,{"inputs":[],"output":{"name":"subset"}}],[11,"clone","","",28,null],[11,"default","","",29,{"inputs":[],"output":{"name":"subsetbuilder"}}],[11,"new","","",29,{"inputs":[],"output":{"name":"subsetbuilder"}}],[11,"add_deletion","","",29,null],[11,"build","","",29,null],[11,"apply_to_string","","",28,null],[11,"apply","","",28,null],[11,"len","","The length of the resulting sequence.",28,null],[11,"is_trivial","","Determine whether the subset is trivial, ie applying it does not\nchange the sequence. In purely set theoretic terms, this is the\nsame as testing equality with the universal set.",28,null],[11,"intersect","","Compute the intersection of two subsets. In other words, an element exists in the\nresulting subset iff it exists in both inputs.",28,null],[11,"transform_expand","","Transform through coordinate transform represented by other.\nThe equation satisfied is as follows:",28,null],[11,"transform_intersect","","The same as taking transform_expand and then intersecting with `other`.",28,null],[11,"transform_shrink","","Transform subset through other coordinate transform, shrinking.\nThe following equation is satisfied:",28,null],[11,"range_iter","","Return an iterator over ranges retained from the source sequence. These will\noften be easier to work with than the raw deletions in the representation.",28,null],[11,"next","","",30,null],[0,"engine","xi_rope","An engine for handling edits (possibly from async sources) and undo. This\nmodule actually implements a mini Conflict-free Replicated Data Type, but\nis considerably simpler than the usual CRDT implementation techniques,\nbecause all operations are serialized in this central engine.",null,null],[3,"Engine","xi_rope::engine","",null,null],[11,"new","","",31,{"inputs":[{"name":"rope"}],"output":{"name":"engine"}}],[11,"get_head_rev_id","","Get revision id of head revision.",31,null],[11,"get_head","","Get text of head revision.",31,null],[11,"delta_head","","A delta that, when applied to previous head, results in the current head. Panics\nif there is not at least one edit.",31,null],[11,"edit_rev","","",31,null],[11,"undo","","",31,null],[11,"gc","","",31,null],[11,"clone","xi_rope","",32,null],[11,"len","","Returns the length of `self`.",32,null],[11,"push_to_string","","Appends `self` to the destination string.",32,null],[11,"slice","","Returns a slice of the string from the byte range [`start`..`end`).",32,null],[11,"push_str","","Append `s` to the string.",32,null],[11,"edit","","Edit the string, replacing the byte range [`start`..`end`] with `new`.",32,null],[11,"edit_str","","Edit the string, replacing the byte range [`start`..`end`] with `new`.",32,null],[11,"iter_chunks","","Returns an iterator over chunks of the rope.",32,null],[11,"line_of_offset","","Return the line number corresponding to the byte index `offset`.",32,null],[11,"offset_of_line","","Return the byte offset corresponding to the line number `line`.",32,null],[11,"lines_raw","","An iterator over the raw lines. The lines, except the last, include the\nterminating newline.",32,null],[11,"lines","","An iterator over the lines of a rope.",32,null],[11,"prev_codepoint_offset","","Return the offset of the codepoint before `offset`.",32,null],[11,"next_codepoint_offset","","Return the offset of the codepoint after `offset`.",32,null],[11,"prev_grapheme_offset","","",32,null],[11,"next_grapheme_offset","","",32,null],[11,"byte_at","","",32,null],[11,"from","","",32,{"inputs":[{"name":"t"}],"output":{"name":"rope"}}],[11,"add","","",32,null],[11,"add","","",32,null],[11,"next","","",33,null],[11,"next","","",34,null],[11,"next","","",35,null],[11,"eq","","",32,null],[11,"eq","","",32,null],[11,"eq","","",32,null],[11,"eq","","",32,null],[11,"eq","","",32,null]],"paths":[[8,"NodeInfo"],[8,"Leaf"],[8,"Metric"],[3,"Node"],[3,"TreeBuilder"],[3,"Cursor"],[3,"BreaksLeaf"],[3,"BreaksInfo"],[3,"BreaksMetric"],[3,"BreaksBaseMetric"],[6,"Breaks"],[3,"BreakBuilder"],[3,"Interval"],[4,"DeltaElement"],[3,"Delta"],[3,"RopeInfo"],[3,"BaseMetric"],[3,"LinesMetric"],[6,"Rope"],[3,"ChunkIter"],[3,"LinesRaw"],[3,"Lines"],[3,"Span"],[3,"SpansLeaf"],[3,"SpansInfo"],[3,"SpansBuilder"],[6,"Spans"],[3,"SpanIter"],[3,"Subset"],[3,"SubsetBuilder"],[3,"RangeIter"],[3,"Engine"],[3,"Rope"],[3,"ChunkIter"],[3,"LinesRaw"],[3,"Lines"]]}; initSearch(searchIndex);