about summary refs log tree commit diff
path: root/src/libstd/rand/reader.rs
AgeCommit message (Collapse)AuthorLines
2014-02-03std: Remove io::io_errorAlex Crichton-9/+9
* All I/O now returns IoResult<T> = Result<T, IoError> * All formatting traits now return fmt::Result = IoResult<()> * The if_ok!() macro was added to libstd
2014-01-17Tweak the interface of std::ioAlex Crichton-3/+3
* Reexport io::mem and io::buffered structs directly under io, make mem/buffered private modules * Remove with_mem_writer * Remove DEFAULT_CAPACITY and use DEFAULT_BUF_SIZE (in io::buffered)
2014-01-07stdtest: Fix all leaked trait importsAlex Crichton-0/+2
2014-01-07std: Fill in all missing importsAlex Crichton-0/+1
Fallout from the previous commits
2013-12-26std::rand: remove the `fn main()` from the examples.Huon Wilson-4/+2
2013-11-11Move std::rt::io to std::ioAlex Crichton-3/+3
2013-10-28Remove the extension traits for Readers/WritersAlex Crichton-5/+4
These methods are all excellent candidates for default methods, so there's no need to require extra imports of various traits.
2013-10-22Drop the '2' suffix from logging macrosAlex Crichton-2/+2
Who doesn't like a massive renaming?
2013-10-09std::rand::reader: describe cfg!(endianness).Huon Wilson-0/+4
2013-10-09std::rand: documentation additions & fixes.Huon Wilson-2/+4
2013-10-09std::rand: make the windows OSRng more correct, remove some C++.Huon Wilson-7/+31
This lets the C++ code in the rt handle the (slightly) tricky parts of random number generation: e.g. error detection/handling, and using the values of the `#define`d options to the various functions.
2013-10-09std::rand: Add OSRng, ReaderRng wrappers around the OS RNG & generic Readers ↵Huon Wilson-0/+94
respectively. The former reads from e.g. /dev/urandom, the latter just wraps any std::rt::io::Reader into an interface that implements Rng. This also adds Rng.fill_bytes for efficient implementations of the above (reading 8 bytes at a time is inefficient when you can read 1000), and removes the dependence on src/rt (i.e. rand_gen_seed) although this last one requires implementing hand-seeding of the XorShiftRng used in the scheduler on Linux/unixes, since OSRng relies on a scheduler existing to be able to read from /dev/urandom.