Struct random::Default [−][src]
An instance of the default source.
The default source is the Xorshift128+ algorithm.
Implementations
impl Default
[src]
pub fn new() -> Default
[src]
Create an instance of the default source.
Each thread has its own copy of the default source, and each copy is initialized with the same default seed. Therefore, the usage is thread safe; however, each thread is responsible for reseeding its source.
pub fn seed(self, seed: [u64; 2]) -> Default
[src]
Seed the source.
At least one bit of the seed should be nonzero.
Trait Implementations
impl Clone for Default
[src]
impl Source for Default
[src]
Auto Trait Implementations
impl !RefUnwindSafe for Default
impl !Send for Default
impl !Sync for Default
impl Unpin for Default
impl !UnwindSafe for Default
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,