Capability-oriented random number generators
This corresponds to
Capability-oriented APIs represent access to external resources as objects which can be passed around between different parts of a program.
Two notable features are the [
OsRng] and [
CapRng] types, which
wrap up access to the operating system entropy source in capability
This crate uses the existing
rand::SeedableRng trait rather than having
its own version, however while
rand::SeedableRng is mostly just a pure
interface, it provides a
from_entropy function which directly reads
from the operating system entropy source. To preserve the
capability-oriented interface, avoid using
from_entropy function on any of the types that implement that trait.
Generating random samples from probability distributions
Convenience re-export of common members.
Random number generators and adapters.
Error type of random number generators
Trait for casting types to byte slices
An automatically-implemented extension trait on
The core of a random number generator.
A random number generator that can be explicitly seeded.
Generates a random value using the thread-local random number generator.
Retrieve the lazily-initialized thread-local random number generator, seeded by the system.