var searchIndex = {}; searchIndex["scribe"] = {"doc":"","items":[[0,"buffer","scribe","Types related to in-memory buffers.",null,null],[3,"Token","scribe::buffer","A lexeme and category pairing. Tokens are the final product of a lexer;\ntheir lexemes should join to produce the original data passed to the lexer.",null,null],[12,"lexeme","","",0,null],[12,"category","","",0,null],[4,"Category","","The primary means of classifying a format or language's lexemes.",null,null],[13,"Whitespace","","",1,null],[13,"Identifier","","",1,null],[13,"Keyword","","",1,null],[13,"Brace","","",1,null],[13,"Bracket","","",1,null],[13,"Parenthesis","","",1,null],[13,"Operator","","",1,null],[13,"Integer","","",1,null],[13,"Float","","",1,null],[13,"String","","",1,null],[13,"Boolean","","",1,null],[13,"Text","","",1,null],[13,"Comment","","",1,null],[13,"Function","","",1,null],[13,"Method","","",1,null],[13,"Call","","",1,null],[13,"Literal","","",1,null],[13,"Key","","",1,null],[3,"Position","","A two (zero-based) coordinate value representing a location in a buffer.\nThe `offset` field is so named to emphasize that positions point to\nlocations before/after characters, not characters themselves, in an effort\nto avoid fencepost errors.",null,null],[12,"line","","",2,null],[12,"offset","","",2,null],[3,"Range","","A two-position type, representing a span of characters.",null,null],[12,"start","","",3,null],[12,"end","","",3,null],[3,"LineRange","","A more concise expression for ranges spanning complete lines.",null,null],[12,"start","","",4,null],[12,"end","","",4,null],[3,"Buffer","","A feature-rich wrapper around an underlying gap buffer.",null,null],[12,"path","","",5,null],[12,"cursor","","",5,null],[5,"new","","Creates a new empty buffer. The buffer's cursor is set to the beginning of the buffer.",null,{"inputs":[],"output":{"name":"buffer"}}],[5,"from_file","","Creates a new buffer by reading the UTF-8 interpreted file contents of the specified path.\nThe buffer's cursor is set to the beginning of the buffer. The buffer data's type will be\ninferred based on its extension, and an appropriate lexer will be used, if available (see\ntokens method for further information on why this happens).",null,{"inputs":[{"name":"pathbuf"}],"output":{"name":"result"}}],[0,"gap_buffer","","Buffer type's underlying data structure.",null,null],[3,"GapBuffer","scribe::buffer::gap_buffer","A UTF-8 string buffer designed to minimize reallocations,\nmaintaining performance amid frequent modifications.",null,null],[5,"new","","Initializes a gap buffer with the specified data as its contents.",null,{"inputs":[{"name":"string"}],"output":{"name":"gapbuffer"}}],[11,"insert","","Inserts the specified data into the buffer at the specified position.\nThe buffer will reallocate if there is insufficient space. If the\nposition is out of bounds, the buffer contents will remain unchanged.",6,null],[11,"read","","Returns the specified range of data from the buffer.",6,null],[11,"to_string","","Returns a string representation of the buffer data (without gap).",6,null],[11,"delete","","Removes the specified range of data from the buffer.",6,null],[11,"in_bounds","","Checks whether or not the specified position is in bounds of the buffer data.",6,null],[11,"eq","scribe::buffer","",2,null],[11,"ne","","",2,null],[11,"fmt","","",2,null],[11,"clone","","",2,null],[11,"partial_cmp","","",2,null],[11,"eq","","",3,null],[11,"ne","","",3,null],[11,"fmt","","",3,null],[11,"clone","","",3,null],[11,"is_valid","","Checks if the range is non-reversed and non-empty.",3,null],[11,"to_range","","Converts the line range to a regular, zero-offset range.",4,null],[0,"cursor","","Bounds-checked buffer cursor type.",null,null],[3,"Cursor","scribe::buffer::cursor","Read-only wrapper for a `Position`, to allow field level access to a\nbuffer's cursor while simultaneously enforcing bounds-checking when\nupdating its value.",null,null],[12,"data","","",7,null],[12,"position","","",7,null],[5,"new","","Initializes a cursor bound to the specified gap buffer, at the specified position.",null,{"inputs":[{"name":"rc"},{"name":"position"}],"output":{"name":"cursor"}}],[11,"clone","","",7,null],[11,"deref","","",7,null],[11,"move_to","","Moves the cursor to the specified location. The location is\nbounds-checked against the data and the cursor will not be\nupdated if it is out-of-bounds.",7,null],[11,"move_up","","Decrements the cursor line. The location is bounds-checked against\nthe data and the cursor will not be updated if it is out-of-bounds.",7,null],[11,"move_down","","Increments the cursor line. The location is bounds-checked against\nthe data and the cursor will not be updated if it is out-of-bounds.",7,null],[11,"move_left","","Decrements the cursor offset. The location is bounds-checked against\nthe data and the cursor will not be updated if it is out-of-bounds.",7,null],[11,"move_right","","Increments the cursor offset. The location is bounds-checked against\nthe data and the cursor will not be updated if it is out-of-bounds.",7,null],[11,"move_to_start_of_line","","Sets the cursor offset to 0: the start of the current line.",7,null],[11,"move_to_end_of_line","","Moves the cursor offset to after the last character on the current line.",7,null],[11,"start_operation_group","scribe::buffer","Tells the buffer to start tracking operations as a single unit, until\nend_operation_group is called. Any calls to insert or delete occurring within\nthese will be undone/applied together when calling undo/redo, respectively.",5,null],[11,"end_operation_group","","Tells the buffer to stop tracking operations as a single unit, since\nstart_operation_group was called. Any calls to insert or delete occurring within\nthese will be undone/applied together when calling undo/redo, respectively.",5,null],[11,"insert","","Inserts `data` into the buffer at the cursor position.",5,null],[11,"delete","","Deletes a character at the cursor position. If at the end\nof the current line, it'll try to delete a newline character\n(joining the lines), succeeding if there's a line below.",5,null],[11,"delete_range","","Removes a range of characters from the buffer.",5,null],[11,"data","","Returns the contents of the buffer as a string. Caches\nthis string representation to make subsequent requests\nto an unchanged buffer as fast as possible.",5,null],[11,"save","","Writes the contents of the buffer to its path.",5,null],[11,"tokens","","Produces a set of tokens based on the buffer data\nsuitable for colorized display, using a lexer for the\nbuffer data's language and/or format. Caches this\nlexed representation to make subsequent requests\nto an unchanged buffer as fast as possible.",5,null],[11,"file_name","","Returns the file name portion of the buffer's path, if\nthe path is set and its file name is a valid UTF-8 sequence.",5,null],[11,"undo","","Reverses the last modification to the buffer.",5,null],[11,"redo","","Re-applies the last undone modification to the buffer.",5,null],[0,"workspace","scribe","Buffer and working directory management.",null,null],[3,"Workspace","scribe::workspace","An owned collection of buffers and associated path,\nrepresenting a running editor environment.",null,null],[12,"path","","",8,null],[5,"new","","Creates a new workspace.",null,{"inputs":[{"name":"pathbuf"}],"output":{"name":"workspace"}}],[11,"add_buffer","","Adds a buffer to the workspace and selects it.",8,null],[11,"current_buffer","","Returns a mutable reference to the currently\nselected buffer, unless the workspace is empty.",8,null],[11,"close_current_buffer","","Removes the currently selected buffer from the collection.\nIf the workspace is empty, this method does nothing.",8,null],[11,"previous_buffer","","Selects the previous buffer in the workspace (buffers are ordered as\nthey are added to the workspace). If the currently selected buffer is\nthe first in the collection, this will wrap and select the last buffer.",8,null],[11,"next_buffer","","Selects the next buffer in the workspace (buffers are ordered as\nthey are added to the workspace). If the currently selected buffer is\nthe last in the collection, this will wrap and select the first buffer.",8,null],[11,"clone","scribe::buffer","",1,null],[11,"fmt","","",1,null],[11,"eq","","",1,null],[11,"clone","","",0,null],[11,"fmt","","",0,null],[11,"eq","","",0,null],[11,"ne","","",0,null]],"paths":[[3,"Token"],[4,"Category"],[3,"Position"],[3,"Range"],[3,"LineRange"],[3,"Buffer"],[3,"GapBuffer"],[3,"Cursor"],[3,"Workspace"]]}; initSearch(searchIndex);