Commit Graph
128 Commits
Author SHA1 Message Date
Carl Lerche accc8a460d Add explicit inlines 2017-02-03 11:22:16 -08:00
Carl Lerche 8b01298806 Support older Rust versions 2017-01-26 14:54:25 -08:00
Carl Lerche a8320da0f8 Lazily allocate the Arc 2017-01-26 12:56:38 -08:00
Carl Lerche 93c08064bb Fix BytesMut refcounting 2016-11-22 10:31:17 -08:00
Rick Richardson 2b796d40e9 added clone to ByteBuf and BytesMut along with simple clone test 2016-11-21 15:43:59 -08:00
Carl Lerche 12d0804f17 Fix building docs 2016-11-18 10:14:03 -08:00
Carl Lerche 4886b44516 Add more conversion impls 2016-11-02 22:27:00 -07:00
Carl Lerche a367a723d8 Impl IntoBuf for Bytes and BytesMut 2016-11-02 14:33:42 -07:00
Carl Lerche 11fe277c0d Remove default for SliceBuf<T> 2016-11-02 14:31:44 -07:00
Carl Lerche 57e84f267b Restructure and trim down the library
This commit is a significant overhaul of the library in an effort to head
towards a stable API. The rope implementation as well as a number of buffer
implementations have been removed from the library and will live at
https://github.com/carllerche/bytes-more while they incubate.

**Bytes / BytesMut**

`Bytes` is now an atomic ref counted byte slice. As it is contigous, it offers
a richer API than before.

`BytesMut` is a mutable variant. It is safe by ensuring that it is the only
handle to a given byte slice.

**AppendBuf -> ByteBuf**

`AppendBuf` has been replaced by `ByteBuf`. The API is not identical, but is
close enough to be considered a suitable replacement.

**Removed types**

The following types have been removed in favor of living in bytes-more

* RingBuf
* BlockBuf
* `Bytes` as a rope implementation
* ReadExt
* WriteExt
2016-11-02 14:23:45 -07:00
Carl Lerche d717fde5ca Fix remaining 2016-10-25 20:09:54 -07:00
Carl Lerche b42d94c33b Add BoundBuf 2016-10-14 20:42:32 -07:00
Carl Lerche 8d2508bfeb Tweak Bytes helpers 2016-10-14 20:42:16 -07:00
Carl Lerche ec7d7f27fe Add Bytes::from_vec 2016-10-14 20:07:57 -07:00
Carl Lerche d7306d949b Rename slice_buf.rs -> slice.rs 2016-10-14 20:07:42 -07:00
Carl Lerche a4bfc63de7 Tweak Sink / Source 2016-10-07 15:37:12 -07:00
Carl Lerche 6f97d04077 Add IntoBuf impls for non-ref types 2016-10-07 14:44:29 -07:00
Carl Lerche e00c08c6c7 Impl IntoBuf for &'static [u8] 2016-10-07 12:55:18 -07:00
Carl Lerche e1c7f183ca Impl IntoBuf for () 2016-09-30 09:58:41 -07:00
Carl Lerche 4ca7e0fabf Add IntoBuf trait 2016-09-25 22:40:39 -07:00
Carl Lerche b10992a5e8 Refactor RingBuf 2016-09-25 22:40:39 -07:00
Carl Lerche b1dc10e907 Rename & refactor ByteBuf -> SliceBuf 2016-09-25 22:40:35 -07:00
Carl Lerche c16ad2bc9d Add some docs 2016-09-23 14:53:14 -07:00
Carl Lerche a7d38e29e5 Remove extra lifetime sigils 2016-09-23 14:51:48 -07:00
Carl Lerche 98e0d954b5 Reorganize crate 2016-09-23 12:05:32 -07:00
Carl Lerche d05bfb6346 Add more Buf helpers 2016-09-23 07:53:17 -07:00
Carl Lerche 3c58b0c75c Add take fn to Buf & MutBuf 2016-09-21 20:41:21 -07:00
Carl Lerche 4105901244 Rename RingBuf::new -> with_capacity 2016-09-20 13:42:24 -07:00
Nikolay Kim 1f188b5628 fix dropping front block in BlockBuf 2016-09-13 15:30:44 -07:00
Stefan BühlerandCarl Lerche f693e038d9 Fix buffer overflow in Sink for Vec<u8>
Fixes #46
2016-09-03 13:25:40 -07:00
Carl Lerche d0d27bd540 Bump min supported Rust version 2016-09-03 13:24:52 -07:00
Carl Lerche 046c864543 Integrate with byteorder 2016-08-31 12:07:44 -07:00
Carl Lerche 38abb8074b Create ByteBuf with MutByteBuf::with_capacity 2016-08-23 14:22:39 -07:00
Carl Lerche be23af6bb7 Remove stable heap for now 2016-08-11 01:38:15 -07:00
Carl Lerche fbebb19a02 Simplify allocation strategy for now
Not having `unsafe_no_drop_flag` caused some weirdness with optimizing buffers
and bytes. For now, remeove it.
2016-08-11 01:36:16 -07:00
Carl Lerche 04e0ac75e2 Huge overhaul of bytes
* Get rid of `ByteStr` trait
* `Bytes` is not a concrete type
* Add `BlockBuf`
* Delete lots of cruft
* Performance work
2016-08-10 15:45:31 -07:00
Carl Lerche b2efe63c70 Get rid of SliceBuf 2016-08-05 22:49:41 -07:00
Carl Lerche 16b4266c3c Improve Buf/MutBuf impl for Cursor 2016-08-05 22:19:37 -07:00
Carl Lerche b6a424d892 Get rid of BufError 2016-08-05 21:54:29 -07:00
Carl Lerche 6529f6392a Remove traits mod 2016-08-05 21:42:07 -07:00
Carl Lerche 3f68c4bd27 Bump minimum supported Rust version 2016-07-23 10:03:30 -07:00
Carl Lerche eec203c118 Use latest stable-heap git 2016-07-23 10:00:15 -07:00
Carl Lerche 41b722dee8 Allow checking out AppendBufs from Pool 2016-07-23 09:54:18 -07:00
Carl Lerche d650404bb8 Add an AppendBuf 2016-07-23 09:49:59 -07:00
Carl Lerche 1c2234f7fe Initial stab at a buffer pool 2016-07-20 22:47:41 +02:00
Carl Lerche dc25c7564e Refactor heap allocation 2016-07-20 13:27:41 +02:00
Carl Lerche b10b1cd2e2 Bump version to v0.4.0-dev 2016-07-19 14:10:07 +02:00
Carl Lerche 3ca009577b Bytes reader should be Send 2016-06-19 21:32:18 +01:00
Carl Lerche 270d2e2844 Freshen up buf API 2016-06-08 14:48:49 -07:00
Carl Lerche 12dfc417ce Bump version to v0.3.0 v0.3.0 2015-12-03 20:40:52 -08:00