var searchIndex = {}; searchIndex["scribe"] = {"doc":"","items":[[3,"Workspace","scribe","An owned collection of buffers and associated path,\nrepresenting a running editor environment.",null,null],[12,"path","","",0,null],[0,"buffer","","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","","",1,null],[12,"category","","",1,null],[4,"Category","","The primary means of classifying a format or language's lexemes.",null,null],[13,"Whitespace","","",2,null],[13,"Identifier","","",2,null],[13,"Keyword","","",2,null],[13,"Brace","","",2,null],[13,"Bracket","","",2,null],[13,"Parenthesis","","",2,null],[13,"Operator","","",2,null],[13,"Integer","","",2,null],[13,"Float","","",2,null],[13,"String","","",2,null],[13,"Boolean","","",2,null],[13,"Text","","",2,null],[13,"Comment","","",2,null],[13,"Function","","",2,null],[13,"Method","","",2,null],[13,"Call","","",2,null],[13,"Literal","","",2,null],[13,"Key","","",2,null],[3,"GapBuffer","","A UTF-8 string buffer designed to minimize reallocations,\nmaintaining performance amid frequent modifications.",null,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","","",3,null],[12,"offset","","",3,null],[3,"Range","","A two-position type, representing a span of characters.",null,null],[3,"LineRange","","A more concise expression for ranges spanning complete lines.",null,null],[3,"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","","",4,null],[12,"position","","",4,null],[3,"Buffer","","A feature-rich wrapper around an underlying gap buffer.",null,null],[12,"path","","",5,null],[12,"cursor","","",5,null],[11,"new","","Initializes a gap buffer with the specified data as its contents.",6,{"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.\nIf any part of the range does not exist, a none value will be returned.",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","","",3,null],[11,"ne","","",3,null],[11,"fmt","","",3,null],[11,"clone","","",3,null],[11,"partial_cmp","","",3,null],[11,"eq","","",7,null],[11,"ne","","",7,null],[11,"fmt","","",7,null],[11,"clone","","",7,null],[11,"new","","Creates a new buffer range. Checks and swaps arguments\nin the event that the end precedes the start.",7,{"inputs":[{"name":"position"},{"name":"position"}],"output":{"name":"range"}}],[11,"start","","",7,null],[11,"end","","",7,null],[11,"includes","","Whether or not the range includes the specified position.\nThe range is exclusive, such that its ending position is not included.",7,null],[11,"fmt","","",8,null],[11,"eq","","",8,null],[11,"ne","","",8,null],[11,"new","","Creates a new buffer line range. Checks and swaps\narguments in the event that the end precedes the start.",8,{"inputs":[{"name":"usize"},{"name":"usize"}],"output":{"name":"linerange"}}],[11,"start","","",8,null],[11,"end","","",8,null],[11,"to_range","","Converts the line range to a regular, zero-offset range.",8,null],[11,"to_inclusive_range","","Converts the line range to a regular, zero-offset range, including\nthe line on which the range ends.",8,null],[11,"includes","","Whether or not the line range includes the specified line.\nThe range is exclusive, such that its ending line is not included.",8,null],[11,"clone","","",4,null],[11,"deref","","",4,null],[11,"deref_mut","","",4,null],[11,"new","","Initializes a cursor bound to the specified gap buffer, at the specified position.",4,{"inputs":[{"name":"rc"},{"name":"position"}],"output":{"name":"cursor"}}],[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.",4,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.",4,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.",4,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.",4,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.",4,null],[11,"move_to_start_of_line","","Sets the cursor offset to 0: the start of the current line.",4,null],[11,"move_to_end_of_line","","Moves the cursor offset to after the last character on the current line.",4,null],[11,"move_to_last_line","","Moves the cursor to the last line in the buffer.",4,null],[11,"move_to_first_line","","Moves the cursor to the first line in the buffer.",4,null],[11,"start_operation_group","","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,"new","","Creates a new empty buffer. The buffer's cursor is set to the beginning of the buffer.",5,{"inputs":[],"output":{"name":"buffer"}}],[11,"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).",5,{"inputs":[{"name":"pathbuf"}],"output":{"name":"result"}}],[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],[11,"read","","Tries to read the specified range from the buffer.",5,null],[11,"search","","Searches the buffer for (and returns positions\nassociated with) occurrences of `needle`.",5,null],[11,"new","scribe","Creates a new empty workspace for the specified path.",0,{"inputs":[{"name":"pathbuf"}],"output":{"name":"workspace"}}],[11,"add_buffer","","Adds a buffer to the workspace and selects it.",0,null],[11,"open_buffer","","Opens a buffer at the specified path and selects it.\nIf a buffer with the specified path already exists,\nit is selected, rather than opening a duplicate buffer.\nAny errors encountered while opening the buffer are returned.",0,null],[11,"current_buffer","","Returns a mutable reference to the currently\nselected buffer, unless the workspace is empty.",0,null],[11,"close_current_buffer","","Removes the currently selected buffer from the collection.\nIf the workspace is empty, this method does nothing.",0,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.",0,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.",0,null],[11,"contains_buffer_with_path","","Whether or not the workspace contains a buffer with the specified path.",0,null],[11,"clone","scribe::buffer","",2,null],[11,"fmt","","",2,null],[11,"eq","","",2,null],[11,"clone","","",1,null],[11,"fmt","","",1,null],[11,"eq","","",1,null],[11,"ne","","",1,null]],"paths":[[3,"Workspace"],[3,"Token"],[4,"Category"],[3,"Position"],[3,"Cursor"],[3,"Buffer"],[3,"GapBuffer"],[3,"Range"],[3,"LineRange"]]}; initSearch(searchIndex);