var searchIndex = {}; searchIndex["netbuf"] = {"doc":"This module currently includes single `Buf` struct for holding buffers.\nComparing to `Vec` class buffer has different allocation policy and has\na marker of consumed data (i.e. already processed by protocol parser or\nalready written to socket)","items":[[3,"Buf","netbuf","",null,null],[11,"new","","Create empty buffer. It has no preallocated size. It's always have\ndeallocated underlying memory chunk when there are no useful bytes\nin the buffer.",0,{"inputs":[],"output":{"name":"buf"}}],[11,"consume","","Mark the first `bytes` of the buffer as read. Basically it's shaving\noff bytes from the buffer. But does it effeciently. When there are\nno more bytes in the buffer it's deallocated.",0,null],[11,"capacity","","Capacity of the buffer. I.e. the bytes it is allocated for. Use for\ndebugging or for calculating memory usage. Note it's not guaranteed\nthat you can write `buf.capacity() - buf.len()` bytes without resize",0,null],[11,"len","","Number of useful bytes in the buffer",0,null],[11,"empty","","Is buffer is empty. Potentially a little bit faster than\ngetting `len()`",0,null],[11,"extend","","Extend buffer. Note unlike `Write::write()` and `read_from()` this\nmethod reserves smallest possible chunk of memory. So it's inefficient\nto grow with this method. You may use Write trait to grow\nincrementally.",0,null],[11,"read_from","","Read some bytes from stream (object implementing `Read`) into buffer",0,null],[11,"read_max_from","","Reads no more than max bytes into buffer and returns boolean flag\nof whether max bytes are reached",0,null],[11,"write_to","","Write contents of buffer to the stream (object implementing\nthe Write trait). We assume that stream is non-blocking, use\n`Write::write` (instead of `Write::write_all`) and return all errors\nto the caller (including `WouldBlock` or `Interrupted`).",0,null],[11,"into","","",0,null],[11,"index","","",0,null],[11,"index","","",0,null],[11,"index","","",0,null],[11,"index","","",0,null],[11,"write","","",0,null],[11,"flush","","",0,null],[17,"MAX_BUF_SIZE","","Maximum size of buffer allowed.\nNote: we assert on this size. Most network servers should set their own\nlimits to something much smaller.",null,null]],"paths":[[3,"Buf"]]}; initSearch(searchIndex);