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
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
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
6b624b849a
Make MutBuf::advance unsafe
...
Closes #38
2015-12-03 19:57:08 -08:00
Florian Hartwig and Carl Lerche
01c1e05a91
Implement Debug for the various ByteBuf types
2015-09-25 09:47:46 -07:00
Nandor Kracser and Carl Lerche
a76dd8ed0e
Add clear method to RingBuf
2015-09-25 09:45:55 -07:00
Carl Lerche
4ce8b1c2c8
Make sub mods public to help docgen
2015-09-25 09:43:58 -07:00
Dawid Ciężarkiewicz
7edb577d0a
Fix for latest rustc.
2015-08-10 21:53:14 -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
Paul Cavallaro
23ad12f842
Add bytes() method to MutByteBuf to allow reading of data already written
...
without necessitating flipping to ByteBuf.
2015-07-17 22:22:58 -04:00
Felix Kronlage
c17f16fdf2
no need to be marked mutable
...
allows code to compile with nightly again.
2015-07-07 17:38:12 +02:00
Jamie Turner
7b63fa034f
Add resume() method to ByteBuf that restores prior write position.
2015-07-02 17:19:43 -07:00
James Bielman
d2b4cc3870
RingBuf: Fix edge cases with mark/reset.
...
- This fixes #25 and fixes #26 .
- Move the mark state into a 'Mark' enum.
- Store both 'pos' and 'len' inside the mark because both
are needed to distinguish between full/empty states. This
fixes 'reset' setting 'len' to zero when the buffer was
full when marked.
- Clear the mark when the length of the marked input range
exceeds the capacity. Fixes bugs with the mark not being
cleared correctly on writes.
- Add test cases.
2015-06-02 23:51:57 -07:00
Florian Hartwig
c5452b8cce
Don't transmute & to &mut
2015-05-09 17:34:00 +02:00
Carl Lerche
e39f2ba917
Remove unstable attribute
2015-04-22 08:25:53 -07:00
Dan Burkert
4d645c7f53
add mark/reset feature to ByteBuf and RingBuf
2015-04-11 15:18:32 -07:00
Florian Hartwig and Carl Lerche
c4546493ea
Fix bugs in RingBuf's io::Read and io::Write instance
2015-04-08 13:44:53 -07:00
Florian Hartwig and Carl Lerche
e22415b416
Fix Buf and MutBuf documentation
2015-04-08 13:43:02 -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
c8f0bbd513
Fix TraitObject
2015-04-07 16:15:11 -07:00
Carl Lerche
29e5dc72bb
Get compiling on Rust 1.0 beta
2015-04-03 23:45:34 -07:00
Victor Berger
635274752b
Update for new blanket impl rules.
2015-04-03 22:46:10 +02:00
Carl Lerche
f0ce42d9c3
Track Rust nightlies
2015-04-01 20:09:20 -07:00
Andrew Hobden
e4fd392458
Add Read and Write to RingBuf
2015-03-30 14:42:59 -07:00
Carl Lerche
805b15e517
Track Rust nightlies
2015-03-28 16:56:53 -07:00
Carl Lerche
8f526231d8
Track Rust nightlies
2015-03-25 12:44:38 -07:00
Carl Lerche
83680dda27
Implement Source for std::io::Read
2015-03-24 22:10:29 -07:00
Florian Hartwig
bb1227116b
Fix panics on operations on 0-capacity RingBuf
2015-03-25 01:11:25 +01:00
Carl Lerche
68a0abf687
Implement slice for small ByteStr
2015-03-23 23:38:53 -07:00
Carl Lerche
bd2c643e17
Flesh out ToBytes, ByteStr::concat, and ByteStr eq
2015-03-23 23:22:21 -07:00
Carl Lerche
a87dea0bd4
Track Rust master
2015-03-23 17:12:39 -07:00
Florian Hartwig
3f9b7f6d46
Fix errors and warnings with current rust nightly
2015-03-19 16:23:29 +01:00
Carl Lerche
e806a59b4a
Fix deprecation warnings
2015-03-09 22:30:41 -07:00
Florian Hartwig and Carl Lerche
6f00c6117b
Remove RingBufReader and RingBufWriter types
2015-03-09 22:24:42 -07:00
Carl Lerche
113bff22c6
Fix a couple of bugs
2015-03-09 22:21:10 -07:00
Florian Hartwig and Carl Lerche
7e02c29e85
Remove unnecessary Send impl
2015-02-17 14:10:07 -08:00
Carl Lerche
7444721d98
Implement Debug for Bytes
2015-02-17 12:40:15 -08:00
Carl Lerche
e39ba25a95
Implement Read / Write for Buf types
2015-02-16 20:30:04 -08:00