12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182 |
- <!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `rand_core` crate."><meta name="keywords" content="rust, rustlang, rust-lang, rand_core"><title>rand_core - Rust</title><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../dark.css"><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><script src="../storage.js"></script><link rel="shortcut icon" href="https://www.rust-lang.org/favicon.ico"></head><body class="rustdoc mod"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../rand_core/index.html'><img src='https://www.rust-lang.org/logos/rust-logo-128x128-blk.png' alt='logo' width='100'></a><p class='location'>Crate rand_core</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#modules">Modules</a></li><li><a href="#structs">Structs</a></li><li><a href="#enums">Enums</a></li><li><a href="#traits">Traits</a></li></ul></div><p class='location'></p><script>window.sidebarCurrent = {name: 'rand_core', ty: 'mod', relpath: '../'};</script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../theme.js"></script><nav class="sub"><form class="search-form js-only"><div class="search-container"><input class="search-input" name="search" autocomplete="off" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='in-band'>Crate <a class="mod" href=''>rand_core</a></span><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../src/rand_core/lib.rs.html#11-404' title='goto source code'>[src]</a></span></h1><div class='docblock'><p>Random number generation traits</p>
- <p>This crate is mainly of interest to crates publishing implementations of
- <a href="trait.RngCore.html"><code>RngCore</code></a>. Other users are encouraged to use the <a href="https://crates.io/crates/rand">rand</a> crate instead
- which re-exports the main traits and error types.</p>
- <p><a href="trait.RngCore.html"><code>RngCore</code></a> is the core trait implemented by algorithmic pseudo-random number
- generators and external random-number sources.</p>
- <p><a href="trait.SeedableRng.html"><code>SeedableRng</code></a> is an extension trait for construction from fixed seeds and
- other random number generators.</p>
- <p><a href="struct.Error.html"><code>Error</code></a> is provided for error-handling. It is safe to use in <code>no_std</code>
- environments.</p>
- <p>The <a href="impls/index.html"><code>impls</code></a> and <a href="le/index.html"><code>le</code></a> sub-modules include a few small functions to assist
- implementation of <a href="trait.RngCore.html"><code>RngCore</code></a>.</p>
- </div><h2 id='modules' class='section-header'><a href="#modules">Modules</a></h2>
- <table>
- <tr class=' module-item'>
- <td><a class="mod" href="block/index.html"
- title='mod rand_core::block'>block</a></td>
- <td class='docblock-short'>
- <p>The <code>BlockRngCore</code> trait and implementation helpers</p>
- </td>
- </tr>
- <tr class=' module-item'>
- <td><a class="mod" href="impls/index.html"
- title='mod rand_core::impls'>impls</a></td>
- <td class='docblock-short'>
- <p>Helper functions for implementing <code>RngCore</code> functions.</p>
- </td>
- </tr>
- <tr class=' module-item'>
- <td><a class="mod" href="le/index.html"
- title='mod rand_core::le'>le</a></td>
- <td class='docblock-short'>
- <p>Little-Endian utilities</p>
- </td>
- </tr></table><h2 id='structs' class='section-header'><a href="#structs">Structs</a></h2>
- <table>
- <tr class=' module-item'>
- <td><a class="struct" href="struct.Error.html"
- title='struct rand_core::Error'>Error</a></td>
- <td class='docblock-short'>
- <p>Error type of random number generators</p>
- </td>
- </tr></table><h2 id='enums' class='section-header'><a href="#enums">Enums</a></h2>
- <table>
- <tr class=' module-item'>
- <td><a class="enum" href="enum.ErrorKind.html"
- title='enum rand_core::ErrorKind'>ErrorKind</a></td>
- <td class='docblock-short'>
- <p>Error kind which can be matched over.</p>
- </td>
- </tr></table><h2 id='traits' class='section-header'><a href="#traits">Traits</a></h2>
- <table>
- <tr class=' module-item'>
- <td><a class="trait" href="trait.CryptoRng.html"
- title='trait rand_core::CryptoRng'>CryptoRng</a></td>
- <td class='docblock-short'>
- <p>A marker trait used to indicate that an <a href="trait.RngCore.html"><code>RngCore</code></a> or <a href="../rand_core/block/trait.BlockRngCore.html"><code>BlockRngCore</code></a>
- implementation is supposed to be cryptographically secure.</p>
- </td>
- </tr>
- <tr class=' module-item'>
- <td><a class="trait" href="trait.RngCore.html"
- title='trait rand_core::RngCore'>RngCore</a></td>
- <td class='docblock-short'>
- <p>The core of a random number generator.</p>
- </td>
- </tr>
- <tr class=' module-item'>
- <td><a class="trait" href="trait.SeedableRng.html"
- title='trait rand_core::SeedableRng'>SeedableRng</a></td>
- <td class='docblock-short'>
- <p>A random number generator that can be explicitly seeded.</p>
- </td>
- </tr></table></section><section id="search" class="content hidden"></section><section class="footer"></section><aside id="help" class="hidden"><div><h1 class="hidden">Help</h1><div class="shortcuts"><h2>Keyboard Shortcuts</h2><dl><dt><kbd>?</kbd></dt><dd>Show this help dialog</dd><dt><kbd>S</kbd></dt><dd>Focus the search field</dd><dt><kbd>↑</kbd></dt><dd>Move up in search results</dd><dt><kbd>↓</kbd></dt><dd>Move down in search results</dd><dt><kbd>↹</kbd></dt><dd>Switch tab</dd><dt><kbd>⏎</kbd></dt><dd>Go to active search result</dd><dt><kbd>+</kbd></dt><dd>Expand all sections</dd><dt><kbd>-</kbd></dt><dd>Collapse all sections</dd></dl></div><div class="infos"><h2>Search Tricks</h2><p>Prefix searches with a type followed by a colon (e.g. <code>fn:</code>) to restrict the search to a given type.</p><p>Accepted types are: <code>fn</code>, <code>mod</code>, <code>struct</code>, <code>enum</code>, <code>trait</code>, <code>type</code>, <code>macro</code>, and <code>const</code>.</p><p>Search functions by type signature (e.g. <code>vec -> usize</code> or <code>* -> vec</code>)</p><p>Search multiple things at once by splitting your query with comma (e.g. <code>str,u8</code> or <code>String,struct:Vec,test</code>)</p></div></div></aside><script>window.rootPath = "../";window.currentCrate = "rand_core";</script><script src="../aliases.js"></script><script src="../main.js"></script><script defer src="../search-index.js"></script></body></html>
|