Struct RngSeed
pub struct RngSeed { /* private fields */ }
Available on
tokio_unstable and crate feature rt only.A seed for random number generation.
In order to make certain functions within a runtime deterministic, a seed can be specified at the time of creation.
Implementations
impl RngSeed
pub fn from_bytes(bytes: &[u8]) -> Self
Generates a seed from the provided byte slice.
Example
let seed = RngSeed::from_bytes(b"make me a seed");Trait Implementations
Auto Trait Implementations
impl Freeze for RngSeed
impl RefUnwindSafe for RngSeed
impl Send for RngSeed
impl Sync for RngSeed
impl Unpin for RngSeed
impl UnsafeUnpin for RngSeed
impl UnwindSafe for RngSeed
Blanket Implementations
impl<T> BorrowMut<T> for Twhere T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> CloneToUninit for Twhere T: Clone,
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)
impl<T> Instrument for T
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
impl<T> WithSubscriber for T
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
MIT License
Copyright © Tokio Contributors
https://docs.rs/tokio/1.53.1/tokio/runtime/struct.RngSeed.html