# [−] [src] Module rand_core::impls

Helper functions for implementing `RngCore` functions.

For cross-platform reproducibility, these functions all use Little Endian: least-significant part first. For example, `next_u64_via_u32` takes `u32` values `x, y`, then outputs `(y << 32) | x`. To implement `next_u32` from `next_u64` in little-endian order, one should use `next_u64() as u32`.

Byte-swapping (like the std `to_le` functions) is only needed to convert to/from byte sequences, and since its purpose is reproducibility, non-reproducible sources (e.g. `OsRng`) need not bother with it.

## Functions

fill_bytes_via_next | Implement `fill_bytes` via `next_u64` and `next_u32`, little-endian order.
fill_via_u32_chunks | Implement `fill_bytes` by reading chunks from the output buffer of a block based RNG.
fill_via_u64_chunks | Implement `fill_bytes` by reading chunks from the output buffer of a block based RNG.
next_u32_via_fill | Implement `next_u32` via `fill_bytes`, little-endian order.
next_u64_via_fill | Implement `next_u64` via `fill_bytes`, little-endian order.
next_u64_via_u32 | Implement `next_u64` via `next_u32`, little-endian order.

# Help

## Keyboard Shortcuts

`?`
  Show this help dialog
`S`
  Focus the search field
`↑`
  Move up in search results
`↓`
  Move down in search results
`↹`
  Switch tab
`⏎`
  Go to active search result
`+`
  Expand all sections
`-`
  Collapse all sections

## Search Tricks

Prefix searches with a type followed by a colon (e.g., `fn:`) to restrict the search to a given type.

Accepted types are: `fn`, `mod`, `struct`, `enum`, `trait`, `type`, `macro`, and `const`.

Search functions by type signature (e.g., `vec -> usize` or `* -> vec`)

Search multiple things at once by splitting your query with comma (e.g., `str,u8` or `String,struct:Vec,test`)