var searchIndex = {}; searchIndex["bytes"] = {"doc":"","items":[[3,"ByteBuf","bytes","A `Buf` backed by a contiguous region of memory.",null,null],[3,"MutByteBuf","","",null,null],[3,"RingBuf","","Buf backed by a continous chunk of memory. Maintains a read cursor and a\nwrite cursor. When reads and writes reach the end of the allocated buffer,\nwraps around to the start.",null,null],[3,"ROByteBuf","","Same as `ByteBuf` but cannot be flipped to a `MutByteBuf`.",null,null],[3,"SliceBuf","","",null,null],[3,"MutSliceBuf","","",null,null],[3,"Bytes","","A specialized `ByteStr` box.",null,null],[3,"Rope","","An immutable sequence of bytes formed by concatenation of other `ByteStr`\nvalues, without copying the data in the pieces. The concatenation is\nrepresented as a tree whose leaf nodes are each a `Bytes` value.",null,null],[3,"RopeBuf","","",null,null],[3,"SeqByteStr","","",null,null],[3,"SmallByteStr","","",null,null],[3,"SmallByteStrBuf","","",null,null],[4,"BufError","","",null,null],[13,"Underflow","","",0,null],[13,"Overflow","","",0,null],[0,"alloc","","",null,null],[3,"Heap","bytes::alloc","",null,null],[3,"MemRef","","",null,null],[3,"Mem","","Memory allocated by an Allocator must be prefixed with Mem",null,null],[5,"heap","","",null,{"inputs":[{"name":"usize"}],"output":{"name":"memref"}}],[11,"allocate","","",1,null],[11,"deallocate","","",1,null],[11,"allocate","","",1,null],[11,"deallocate","","",1,null],[8,"Allocator","","Allocates memory to be used by Bufs or Bytes. Allows allocating memory\nusing alternate stratgies than the default Rust heap allocator. Also does\nnot require that allocations are continuous in memory.",null,null],[10,"allocate","","Allocate memory. May or may not be contiguous.",2,null],[10,"deallocate","","Deallocate a chunk of memory",2,null],[11,"new","","",3,null],[11,"none","","",3,{"inputs":[],"output":{"name":"memref"}}],[11,"is_none","","",3,null],[11,"ptr","","",3,null],[11,"bytes","","",3,null],[11,"bytes_mut","","",3,null],[11,"clone","","",3,null],[11,"drop","","",3,null],[11,"new","","",4,null],[11,"from_slice","bytes","Create a new `ByteBuf` by copying the contents of the given slice.",5,null],[11,"mut_with_capacity","","",5,{"inputs":[{"name":"usize"}],"output":{"name":"mutbytebuf"}}],[11,"none","","",5,{"inputs":[],"output":{"name":"bytebuf"}}],[11,"from_mem_ref","","",5,{"inputs":[{"name":"memref"},{"name":"u32"},{"name":"u32"},{"name":"u32"}],"output":{"name":"bytebuf"}}],[11,"capacity","","",5,null],[11,"flip","","",5,null],[11,"resume","","Flips the buffer back to mutable, resetting the write position\nto the byte after the previous write.",5,null],[11,"read_slice","","",5,null],[11,"to_seq_byte_str","","",5,null],[11,"to_bytes","","",5,null],[11,"mark","","Marks the current read location.",5,null],[11,"reset","","Resets the read position to the previously marked position.",5,null],[11,"remaining","","",5,null],[11,"bytes","","",5,null],[11,"advance","","",5,null],[11,"read_slice","","",5,null],[11,"from_mem_ref","","",6,{"inputs":[{"name":"memref"},{"name":"u32"},{"name":"u32"},{"name":"u32"}],"output":{"name":"robytebuf"}}],[11,"to_seq_byte_str","","",6,null],[11,"to_bytes","","",6,null],[11,"mark","","Marks the current read location.",6,null],[11,"reset","","Resets the read position to the previously marked position.",6,null],[11,"remaining","","",6,null],[11,"bytes","","",6,null],[11,"advance","","",6,null],[11,"read_slice","","",6,null],[11,"capacity","","",7,null],[11,"flip","","",7,null],[11,"clear","","",7,null],[11,"write_slice","","",7,null],[11,"remaining","","",7,null],[11,"advance","","",7,null],[11,"mut_bytes","","",7,null],[11,"new","","",8,{"inputs":[{"name":"usize"}],"output":{"name":"ringbuf"}}],[11,"is_full","","",8,null],[11,"is_empty","","",8,null],[11,"capacity","","",8,null],[11,"mark","","Marks the current read location.",8,null],[11,"reset","","Resets the read position to the previously marked position.",8,null],[11,"clone","","",8,null],[11,"fmt","","",8,null],[11,"remaining","","",8,null],[11,"bytes","","",8,null],[11,"advance","","",8,null],[11,"remaining","","",8,null],[11,"advance","","",8,null],[11,"mut_bytes","","",8,null],[11,"read","","",8,null],[11,"write","","",8,null],[11,"flush","","",8,null],[11,"wrap","","",9,null],[11,"remaining","","",9,null],[11,"bytes","","",9,null],[11,"advance","","",9,null],[11,"wrap","","",10,null],[11,"remaining","","",10,null],[11,"advance","","",10,null],[11,"mut_bytes","","",10,null],[11,"read","","",5,null],[11,"read","","",6,null],[11,"read","","",11,null],[11,"write","","",7,null],[11,"flush","","",7,null],[11,"from_slice","","",12,null],[11,"of","","",12,{"inputs":[{"name":"b"}],"output":{"name":"bytes"}}],[11,"empty","","",12,{"inputs":[],"output":{"name":"bytes"}}],[11,"downcast_ref","","If the underlying `ByteStr` is of type `B`, returns a reference to it\notherwise None.",12,null],[11,"try_unwrap","","If the underlying `ByteStr` is of type `B`, returns the unwraped value,\notherwise, returns the original `Bytes` as `Err`.",12,null],[11,"buf","","",12,null],[11,"concat","","",12,null],[11,"len","","",12,null],[11,"slice","","",12,null],[11,"split_at","","",12,null],[11,"to_bytes","","",12,null],[11,"index","","",12,null],[11,"fmt","","",12,null],[11,"clone","","",12,null],[11,"drop","","",12,null],[11,"from_slice","","",13,null],[11,"of","","Returns a Rope consisting of the supplied Bytes as a single segment.",13,{"inputs":[{"name":"b"}],"output":{"name":"rope"}}],[11,"len","","",13,null],[11,"is_empty","","",13,null],[11,"buf","","",13,null],[11,"concat","","",13,null],[11,"len","","",13,null],[11,"slice","","",13,null],[11,"to_bytes","","",13,null],[11,"index","","",13,null],[11,"clone","","",13,null],[11,"remaining","","",11,null],[11,"bytes","","",11,null],[11,"advance","","",11,null],[11,"from_slice","","Create a new `SeqByteStr` from a byte slice.",14,null],[11,"from_mem_ref","","Creates a new `SeqByteStr` from a `MemRef`, an offset, and a length.",14,{"inputs":[{"name":"memref"},{"name":"u32"},{"name":"u32"}],"output":{"name":"seqbytestr"}}],[11,"buf","","",14,null],[11,"concat","","",14,null],[11,"len","","",14,null],[11,"slice","","",14,null],[11,"to_bytes","","",14,null],[11,"index","","",14,null],[11,"clone","","",14,null],[11,"clone","","",15,null],[11,"zero","","",15,{"inputs":[],"output":{"name":"smallbytestr"}}],[11,"from_slice","","",15,null],[11,"as_slice","","",15,null],[11,"buf","","",15,null],[11,"concat","","",15,null],[11,"len","","",15,null],[11,"slice","","",15,null],[11,"to_bytes","","",15,null],[11,"index","","",15,null],[11,"clone","","",16,null],[11,"remaining","","",16,null],[11,"bytes","","",16,null],[11,"advance","","",16,null],[11,"eq","","",14,null],[11,"ne","","",14,null],[11,"eq","","",15,null],[11,"ne","","",15,null],[11,"eq","","",12,null],[11,"ne","","",12,null],[11,"eq","","",13,null],[11,"ne","","",13,null],[0,"traits","","All traits are re-exported here to allow glob imports.",null,null],[8,"Buf","bytes::traits","A trait for values that provide sequential read access to bytes.",null,null],[10,"remaining","","Returns the number of bytes that can be accessed from the Buf",17,null],[10,"bytes","","Returns a slice starting at the current Buf position and of length\nbetween 0 and `Buf::remaining()`.",17,null],[10,"advance","","Advance the internal cursor of the Buf",17,null],[11,"has_remaining","","Returns true if there are any more bytes to consume",17,null],[11,"read_slice","","Read bytes from the `Buf` into the given slice and advance the cursor by\nthe number of bytes read.\nReturns the number of bytes read.",17,null],[11,"read_byte","","Read a single byte from the `Buf`",17,null],[8,"BufExt","","An extension trait providing extra functions applicable to all `Buf` values.",null,null],[10,"read","","Read bytes from this Buf into the given sink and advance the cursor by\nthe number of bytes read.",18,null],[8,"MutBuf","","A trait for values that provide sequential write access to bytes.",null,null],[10,"remaining","","Returns the number of bytes that can be written to the MutBuf",19,null],[10,"advance","","Advance the internal cursor of the MutBuf",19,null],[11,"has_remaining","","Returns true iff there is any more space for bytes to be written",19,null],[10,"mut_bytes","","Returns a mutable slice starting at the current MutBuf position and of\nlength between 0 and `MutBuf::remaining()`.",19,null],[11,"write_slice","","Write bytes from the given slice into the `MutBuf` and advance the\ncursor by the number of bytes written.\nReturns the number of bytes written.",19,null],[11,"write_byte","","Write a single byte to the `MuBuf`",19,null],[8,"MutBufExt","","An extension trait providing extra functions applicable to all `MutBuf` values.",null,null],[10,"write","","Write bytes from the given source into the current `MutBuf` and advance\nthe cursor by the number of bytes written.",20,null],[8,"ByteStr","","An immutable sequence of bytes. Operations will not mutate the original\nvalue. Since only immutable access is permitted, operations do not require\ncopying (though, sometimes copying will happen as an optimization).",null,null],[16,"Buf","","",21,null],[10,"buf","","Returns a read-only `Buf` for accessing the byte contents of the\n`ByteStr`.",21,null],[10,"concat","","Returns a new `Bytes` value representing the concatenation of `self`\nwith the given `Bytes`.",21,null],[10,"len","","Returns the number of bytes in the ByteStr",21,null],[11,"is_empty","","Returns true if the length of the `ByteStr` is 0",21,null],[10,"slice","","Returns a new ByteStr value containing the byte range between `begin`\n(inclusive) and `end` (exclusive)",21,null],[11,"slice_from","","Returns a new ByteStr value containing the byte range starting from\n`begin` (inclusive) to the end of the byte str.",21,null],[11,"slice_to","","Returns a new ByteStr value containing the byte range from the start up\nto `end` (exclusive).",21,null],[11,"split_at","","Divides the value into two `Bytes` at the given index.",21,null],[8,"ToBytes","","",null,null],[10,"to_bytes","","Consumes the value and returns a `Bytes` instance containing\nidentical bytes",22,null],[8,"Buf","bytes","A trait for values that provide sequential read access to bytes.",null,null],[10,"remaining","","Returns the number of bytes that can be accessed from the Buf",17,null],[10,"bytes","","Returns a slice starting at the current Buf position and of length\nbetween 0 and `Buf::remaining()`.",17,null],[10,"advance","","Advance the internal cursor of the Buf",17,null],[11,"has_remaining","bytes::traits","Returns true if there are any more bytes to consume",17,null],[11,"read_slice","","Read bytes from the `Buf` into the given slice and advance the cursor by\nthe number of bytes read.\nReturns the number of bytes read.",17,null],[11,"read_byte","","Read a single byte from the `Buf`",17,null],[8,"BufExt","bytes","An extension trait providing extra functions applicable to all `Buf` values.",null,null],[10,"read","","Read bytes from this Buf into the given sink and advance the cursor by\nthe number of bytes read.",18,null],[8,"MutBuf","","A trait for values that provide sequential write access to bytes.",null,null],[10,"remaining","","Returns the number of bytes that can be written to the MutBuf",19,null],[10,"advance","","Advance the internal cursor of the MutBuf",19,null],[11,"has_remaining","bytes::traits","Returns true iff there is any more space for bytes to be written",19,null],[10,"mut_bytes","bytes","Returns a mutable slice starting at the current MutBuf position and of\nlength between 0 and `MutBuf::remaining()`.",19,null],[11,"write_slice","bytes::traits","Write bytes from the given slice into the `MutBuf` and advance the\ncursor by the number of bytes written.\nReturns the number of bytes written.",19,null],[11,"write_byte","","Write a single byte to the `MuBuf`",19,null],[8,"MutBufExt","bytes","An extension trait providing extra functions applicable to all `MutBuf` values.",null,null],[10,"write","","Write bytes from the given source into the current `MutBuf` and advance\nthe cursor by the number of bytes written.",20,null],[8,"Source","","A value that writes bytes from itself into a `MutBuf`.",null,null],[16,"Error","","",23,null],[10,"fill","","",23,null],[8,"Sink","","A value that reads bytes from a Buf into itself",null,null],[16,"Error","","",24,null],[10,"sink","","",24,null],[8,"ByteStr","","An immutable sequence of bytes. Operations will not mutate the original\nvalue. Since only immutable access is permitted, operations do not require\ncopying (though, sometimes copying will happen as an optimization).",null,null],[16,"Buf","","",21,null],[10,"buf","","Returns a read-only `Buf` for accessing the byte contents of the\n`ByteStr`.",21,null],[10,"concat","","Returns a new `Bytes` value representing the concatenation of `self`\nwith the given `Bytes`.",21,null],[10,"len","","Returns the number of bytes in the ByteStr",21,null],[11,"is_empty","bytes::traits","Returns true if the length of the `ByteStr` is 0",21,null],[10,"slice","bytes","Returns a new ByteStr value containing the byte range between `begin`\n(inclusive) and `end` (exclusive)",21,null],[11,"slice_from","bytes::traits","Returns a new ByteStr value containing the byte range starting from\n`begin` (inclusive) to the end of the byte str.",21,null],[11,"slice_to","","Returns a new ByteStr value containing the byte range from the start up\nto `end` (exclusive).",21,null],[11,"split_at","","Divides the value into two `Bytes` at the given index.",21,null],[8,"ToBytes","bytes","",null,null],[10,"to_bytes","","Consumes the value and returns a `Bytes` instance containing\nidentical bytes",22,null],[11,"fmt","","",0,null],[11,"clone","","",0,null],[11,"has_remaining","bytes::traits","Returns true if there are any more bytes to consume",17,null],[11,"read_slice","","Read bytes from the `Buf` into the given slice and advance the cursor by\nthe number of bytes read.\nReturns the number of bytes read.",17,null],[11,"read_byte","","Read a single byte from the `Buf`",17,null],[11,"has_remaining","","Returns true iff there is any more space for bytes to be written",19,null],[11,"write_slice","","Write bytes from the given slice into the `MutBuf` and advance the\ncursor by the number of bytes written.\nReturns the number of bytes written.",19,null],[11,"write_byte","","Write a single byte to the `MuBuf`",19,null],[11,"is_empty","","Returns true if the length of the `ByteStr` is 0",21,null],[11,"slice_from","","Returns a new ByteStr value containing the byte range starting from\n`begin` (inclusive) to the end of the byte str.",21,null],[11,"slice_to","","Returns a new ByteStr value containing the byte range from the start up\nto `end` (exclusive).",21,null],[11,"split_at","","Divides the value into two `Bytes` at the given index.",21,null]],"paths":[[4,"BufError"],[3,"Heap"],[8,"Allocator"],[3,"MemRef"],[3,"Mem"],[3,"ByteBuf"],[3,"ROByteBuf"],[3,"MutByteBuf"],[3,"RingBuf"],[3,"SliceBuf"],[3,"MutSliceBuf"],[3,"RopeBuf"],[3,"Bytes"],[3,"Rope"],[3,"SeqByteStr"],[3,"SmallByteStr"],[3,"SmallByteStrBuf"],[8,"Buf"],[8,"BufExt"],[8,"MutBuf"],[8,"MutBufExt"],[8,"ByteStr"],[8,"ToBytes"],[8,"Source"],[8,"Sink"]]}; initSearch(searchIndex);