Carl Lerche
b46d3fd32e
Tweak growth algorithm in BytesMut::reserve
2017-02-20 21:07:25 -08:00
Carl Lerche
8c11456185
Combine reserve and try_reclaim
...
Instead of providing a separate `try_reclaim` function, `reserve` will
attempt to reclaim the existing buffer before allocating.
2017-02-20 19:31:02 -08:00
Carl Lerche
128c56ddc4
Fix link to documentation
2017-02-20 14:33:35 -08:00
Carl Lerche
5c6eadfcb0
More docs and polish
2017-02-20 14:31:26 -08:00
Carl Lerche
c6fe5a1e4f
Add some missing Bytes impls and fns
2017-02-20 14:03:37 -08:00
Carl Lerche
99aafb0a22
Fix uploading master docs
2017-02-20 12:43:15 -08:00
Carl Lerche
cf5a1bc4f1
Rewrite Bytes / BytesMut core implementation
...
The previous implementation didn't factor in a single `Bytes` handle
being stored in an `Arc`. This new implementation correctly impelments
both `Bytes` and `BytesMut` such that both are `Sync`.
The rewrite also increases the number of bytes that can be stored
inline.
2017-02-20 10:41:20 -08:00
Carl Lerche
0360f191f8
Finish up docs
2017-02-17 12:23:09 -08:00
Carl Lerche
aa06b6dd6a
More docs
2017-02-17 11:37:19 -08:00
Carl Lerche
5048eec143
Docs & polish for Buf
2017-02-16 22:15:17 -08:00
Carl Lerche
268226051d
Implement Hash and Borrow for Bytes / BytesMut
2017-02-16 16:52:56 -08:00
Carl Lerche
646624c130
Polish API surface
2017-02-16 16:44:38 -08:00
Carl Lerche
bababa8797
Remove Take/TakeMut
2017-02-16 10:36:00 -08:00
Carl Lerche
0e0066e8a0
Write docs and remove unecessary fns and types
2017-02-16 10:26:48 -08:00
Carl Lerche
53d1c788e0
Start writing docs for bytes
2017-02-15 14:43:11 -08:00
Carl Lerche
4c6ebeba87
Provide two versions of drain_to and split_off
...
* `drain_to` and `split_off` take &self and return Bytes.
* `drain_to_mut` and `split_off_mut` take &mut self and return BytesMut
2017-02-15 12:46:27 -08:00
Carl Lerche
8da9e81469
Tweak CI settings
2017-02-15 09:45:30 -08:00
Carl Lerche
36c9a8c287
Support static refs and inline short byte slices
2017-02-15 09:38:55 -08:00
Carl Lerche
44d40d34d7
Cleanup Bytes
2017-02-10 12:04:32 -08:00
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
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
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
2015-12-03 20:40:52 -08:00
Carl Lerche
6b624b849a
Make MutBuf::advance unsafe
...
Closes #38
2015-12-03 19:57:08 -08:00
Carl Lerche
4ce8b1c2c8
Make sub mods public to help docgen
2015-09-25 09:43:58 -07:00
Carl Lerche
3d0a4adc30
Fix tests
2015-09-25 09:36:32 -07:00
Carl Lerche
ef82792adf
Specify Rust versions in travis.yml
2015-09-25 09:12:47 -07:00
Carl Lerche
3fae2b0bbf
Remove Windows build status
2015-09-25 09:06:07 -07:00
Carl Lerche
846aec9d2b
Remove Appveyor builds
2015-09-25 09:05:03 -07:00
Carl Lerche
531c77654c
Merge branch 'v0.2.x'
2015-08-10 10:14:32 -07:00
Carl Lerche
ed087be853
Provide Take decorator that limits Buf size
2015-07-28 12:51:24 -07:00
Carl Lerche
b4abd1431a
Mark MutBuf::mut_buf as unsafe
...
`MutBuf::mut_buf` allows access to uninitialized memory.
2015-07-26 11:02:46 -07:00
Carl Lerche
296cac263c
Implement buffer traits on Vec<u8>, &[u8], Cursor
2015-07-24 16:52:19 -07:00
Carl Lerche
d20661676f
Bump version to v0.2.10
2015-07-08 13:07:14 -07:00
Carl Lerche
2d3b4b9002
More badges!
2015-05-19 17:13:21 -07:00
Carl Lerche
0d7d120733
Run Windows CI on multiple platforms
2015-05-19 16:39:49 -07:00
Carl Lerche
5584fa84dc
Use Appveyor for Windows CI
2015-05-13 10:41:34 -07:00
Carl Lerche
64f8a0c6f6
Bump version to v0.2.9
2015-05-12 22:26:53 -07:00
Carl Lerche
a91ee81bda
Bump version to v0.2.8
2015-04-22 09:27:57 -07:00
Carl Lerche
e39f2ba917
Remove unstable attribute
2015-04-22 08:25:53 -07:00
Carl Lerche
e62bd07b77
Bump version to v0.2.7
2015-04-12 15:29:37 -07:00
Carl Lerche
c9d3427fd5
Move various ByteStr impls into separate files
2015-04-08 10:51:52 -07:00
Carl Lerche
ac42766535
Group files as buf or byte str related
2015-04-07 23:40:00 -07:00
Carl Lerche
c4f2e20eb1
Move heap allocator into a module
2015-04-07 21:06:38 -07:00
Carl Lerche
dfe4cec871
Remove unnecessary #[allow(..)]
2015-04-07 19:11:38 -07:00
Carl Lerche
1ead637f69
Bump version to v0.2.6
2015-04-07 16:15:55 -07:00
Carl Lerche
c8f0bbd513
Fix TraitObject
2015-04-07 16:15:11 -07:00
Carl Lerche
8af74ae40e
Bump version to v0.2.5
2015-04-07 14:53:12 -07:00
Carl Lerche
29e5dc72bb
Get compiling on Rust 1.0 beta
2015-04-03 23:45:34 -07:00
Carl Lerche
fb67281e72
Bump version to v0.2.4
2015-04-01 20:09:45 -07:00
Carl Lerche
f0ce42d9c3
Track Rust nightlies
2015-04-01 20:09:20 -07:00
Carl Lerche
7a12abb6e6
Bump version to v0.2.3
2015-03-30 15:15:03 -07:00
Carl Lerche
74a59c66b4
Bump version to v0.2.2
2015-03-28 17:00:59 -07:00
Carl Lerche
805b15e517
Track Rust nightlies
2015-03-28 16:56:53 -07:00
Carl Lerche
54f98821f3
Bump version to 0.2.1
2015-03-25 12:55:36 -07:00
Carl Lerche
8f526231d8
Track Rust nightlies
2015-03-25 12:44:38 -07:00
Carl Lerche
53624038ad
Bump version to 0.2.0
2015-03-24 22:28:09 -07:00