var searchIndex = {}; searchIndex["buf_redux"] = {"doc":"A drop-in replacement for `std::io::BufReader` with more functionality.","items":[[3,"BufReader","buf_redux","The *pièce de résistance:* a drop-in replacement for `std::io::BufReader` with more functionality.",null,null],[3,"Buffer","","A deque-like datastructure for managing bytes.",null,null],[3,"Unbuffer","","A `Read` adapter for a consumed `BufReader` which will empty bytes from the buffer before reading from\n`inner` directly. Frees the buffer when it has been emptied. ",null,null],[5,"copy_buf","","Copy data between a `BufRead` and a `Write` without an intermediate buffer.",null,{"inputs":[{"name":"b"},{"name":"w"}],"output":{"name":"result"}}],[0,"strategy","","Types which can be used to tune the behavior of `BufReader`.",null,null],[3,"IfEmpty","buf_redux::strategy","A `ReadStrategy` which tells the buffer to read more data only when empty.",null,null],[3,"LessThan","","A `ReadStrategy` which returns `true` if there is fewer bytes in the buffer\nthan the provided value.",null,null],[12,"0","","",0,null],[3,"AtEndLessThan1k","","A `MoveStrategy` which tells the buffer to move data if there is no more room at the tail\nof the buffer, *and* if there is less than **1 KiB** of valid data in the buffer.",null,null],[3,"AtEndLessThan","","A `MoveStrategy` which triggers if there is no more room at the tail at the end of the buffer,\n*and* there are fewer valid bytes in the buffer than the provided value.",null,null],[12,"0","","",1,null],[3,"NeverMove","","A `MoveStrategy` which always returns `false`. Use this to restore original\n`std::io::BufReader` behavior.",null,null],[8,"ReadStrategy","","Trait for types which `BufReader` can consult to determine when it should read more data into the\nbuffer.",null,null],[10,"should_read","","Returns `true` if the buffer should read more data, `false` otherwise.",2,null],[8,"MoveStrategy","","Trait for types which `BufReader` can consult to determine when it should move data\nto the beginning of the buffer.",null,null],[10,"should_move","","Returns `true` if the buffer should move the data down to the beginning,\n`false` otherwise.",3,null],[11,"default","","",4,{"inputs":[],"output":{"name":"ifempty"}}],[11,"fmt","","",4,null],[11,"should_read","","",4,null],[11,"default","","",0,{"inputs":[],"output":{"name":"lessthan"}}],[11,"fmt","","",0,null],[11,"should_read","","",0,null],[11,"default","","",5,{"inputs":[],"output":{"name":"atendlessthan1k"}}],[11,"fmt","","",5,null],[11,"should_move","","",5,null],[11,"default","","",1,{"inputs":[],"output":{"name":"atendlessthan"}}],[11,"fmt","","",1,null],[11,"should_move","","",1,null],[11,"default","","",6,{"inputs":[],"output":{"name":"nevermove"}}],[11,"fmt","","",6,null],[11,"should_move","","",6,null],[6,"DefaultReadStrategy","buf_redux","The default `ReadStrategy` for this crate.",null,null],[6,"DefaultMoveStrategy","","The default `MoveStrategy` for this crate.",null,null],[8,"TrustRead","","A trait which `Buffer` can use to determine whether or not\nit is safe to elide zeroing of its buffer.",null,null],[10,"is_trusted","","Return `true` if this reader does not need a zeroed slice passed to `.read()`.",7,null],[11,"new","","Create a new `BufReader` wrapping `inner`, with a buffer of a\ndefault capacity and default strategies.",8,{"inputs":[{"name":"r"}],"output":{"name":"self"}}],[11,"with_capacity","","Create a new `BufReader` wrapping `inner` with a capacity\nof *at least* `cap` bytes and default strategies.",8,{"inputs":[{"name":"usize"},{"name":"r"}],"output":{"name":"self"}}],[11,"with_strategies","","Create a new `BufReader` wrapping `inner`, with a default buffer capacity\nand with the given `ReadStrategy` and `MoveStrategy`.",8,{"inputs":[{"name":"r"},{"name":"rs"},{"name":"ms"}],"output":{"name":"self"}}],[11,"with_cap_and_strategies","","Create a new `BufReader` wrapping `inner`, with a buffer capacity of *at least*\n`cap` bytes and the given `ReadStrategy` and `MoveStrategy`.",8,{"inputs":[{"name":"r"},{"name":"usize"},{"name":"rs"},{"name":"ms"}],"output":{"name":"self"}}],[11,"move_strategy","","Apply a new `MoveStrategy` to this `BufReader`, returning the transformed type.",8,null],[11,"read_strategy","","Apply a new `ReadStrategy` to this `BufReader`, returning the transformed type.",8,null],[11,"move_strategy_mut","","Accessor for updating the `MoveStrategy` in-place.",8,null],[11,"read_strategy_mut","","Accessor for updating the `ReadStrategy` in-place.",8,null],[11,"make_room","","Move data to the start of the buffer, making room at the end for more\nreading.",8,null],[11,"grow","","Grow the internal buffer by *at least* `additional` bytes. May not be\nquite exact due to implementation details of the buffer's allocator.",8,null],[11,"get_buf","","Get the section of the buffer containing valid data; may be empty.",8,null],[11,"available","","Get the current number of bytes available in the buffer.",8,null],[11,"capacity","","Get the total buffer capacity.",8,null],[11,"get_ref","","Get an immutable reference to the underlying reader.",8,null],[11,"get_mut","","Get a mutable reference to the underlying reader.",8,null],[11,"into_inner","","Consumes `self` and returns the inner reader only.",8,null],[11,"into_inner_with_buf","","Consumes `self` and returns both the underlying reader and the buffer,\nwith the data moved to the beginning and the length truncated to contain\nonly valid data.",8,null],[11,"unbuffer","","Consumes `self` and returns an adapter which implements `Read` and will\nempty the buffer before reading directly from the underlying reader.",8,null],[11,"read_into_buf","","Unconditionally perform a read into the buffer, calling `.make_room()`\nif appropriate or necessary, as determined by the implementation.",8,null],[11,"read","","",8,null],[11,"fill_buf","","",8,null],[11,"consume","","",8,null],[11,"fmt","","",8,null],[11,"seek","","Seek to an offset, in bytes, in the underlying reader.",8,null],[11,"new","","Create a new buffer with a default capacity.",9,{"inputs":[],"output":{"name":"self"}}],[11,"with_capacity","","Create a new buffer with the given capacity.",9,{"inputs":[{"name":"usize"}],"output":{"name":"self"}}],[11,"available","","Return the number of bytes available to be read from this buffer.",9,null],[11,"headroom","","Return the number of bytes that can be read into this buffer before it needs\nto grow or the data in the buffer needs to be moved.",9,null],[11,"capacity","","Return the total capacity of this buffer.",9,null],[11,"is_empty","","Returns `true` if there are no bytes in the buffer, false otherwise.",9,null],[11,"grow","","Grow the buffer by `additional` bytes.",9,null],[11,"make_room","","Make room in the buffer, moving data down to the beginning if necessary.",9,null],[11,"buf","","Get an immutable slice of the available bytes in this buffer.",9,null],[11,"buf_mut","","Get a mutable slice representing the available bytes in this buffer.",9,null],[11,"read_from","","Read from `rdr`, returning the number of bytes read or any errors.",9,null],[11,"copy_from_slice","","Copy from `src` to the head of this buffer. Returns the number of bytes copied.",9,null],[11,"write_to","","Write bytes from this buffer to `wrt`. Returns the number of bytes written or any errors.",9,null],[11,"copy_to_slice","","Copy bytes to `out` from this buffer, returning the number of bytes written.",9,null],[11,"push_bytes","","Push `bytes` to the end of the buffer, growing it if necessary.",9,null],[11,"consume","","Consume `amt` bytes from the tail of this buffer. No more than `self.available()` bytes\nwill be consumed.",9,null],[11,"clear","","Empty this buffer by resetting the cursors.",9,null],[11,"into_inner","","Move the bytes down the beginning of the buffer and take the inner vector, truncated\nto the number of bytes available.",9,null],[11,"read","","",9,null],[11,"write","","",9,null],[11,"write_all","","",9,null],[11,"flush","","",9,null],[11,"fmt","","",9,null],[11,"is_buf_empty","","Returns `true` if the buffer still has some bytes left, `false` otherwise.",10,null],[11,"buf_len","","Returns the number of bytes remaining in the buffer.",10,null],[11,"buf","","Get a slice over the available bytes in the buffer.",10,null],[11,"into_inner","","Return the underlying reader, releasing the buffer.",10,null],[11,"read","","",10,null],[11,"fmt","","",10,null]],"paths":[[3,"LessThan"],[3,"AtEndLessThan"],[8,"ReadStrategy"],[8,"MoveStrategy"],[3,"IfEmpty"],[3,"AtEndLessThan1k"],[3,"NeverMove"],[8,"TrustRead"],[3,"BufReader"],[3,"Buffer"],[3,"Unbuffer"]]}; initSearch(searchIndex);