rust/src/librand
Kevin Ballard 972f2e5855 io: Add .read_at_least() to Reader
Reader.read_at_least() ensures that at least a given number of bytes
have been read. The most common use-case for this is ensuring at least 1
byte has been read. If the reader returns 0 enough times in a row, a new
error kind NoProgress will be returned instead of looping infinitely.

This change is necessary in order to properly support Readers that
repeatedly return 0, either because they're broken, or because they're
attempting to do a non-blocking read on some resource that never becomes
available.

Also add .push() and .push_at_least() methods. push() is like read() but
the results are appended to the passed Vec.

Remove Reader.fill() and Reader.push_exact() as they end up being thin
wrappers around read_at_least() and push_at_least().

[breaking-change]
2014-05-13 18:45:20 -07:00
..
distributions core: Remove the cast module 2014-05-11 01:13:02 -07:00
isaac.rs Fix fallout of requiring uint indices 2014-04-02 15:56:31 -07:00
lib.rs auto merge of #14164 : alexcrichton/rust/rollup, r=alexcrichton 2014-05-12 21:45:13 -07:00
os.rs auto merge of #13820 : klutzy/rust/urandom, r=alexcrichton 2014-05-12 20:17:13 -07:00
rand_impls.rs librustc: Remove ~EXPR, ~TYPE, and ~PAT from the language, except 2014-05-06 23:12:54 -07:00
reader.rs io: Add .read_at_least() to Reader 2014-05-13 18:45:20 -07:00
reseeding.rs rand: remove (almost) all ~[]'s from Vec. 2014-04-02 23:29:28 +11:00