pub struct EncodableRng {
pub rng: StdRng,
}
Expand description
Wrapper for making random number generators serializable. Does no actual encoding, and merely creates a new generator on decoding. This is because rand generators do not expose internal state.
Fields§
§rng: StdRng
Implementations§
Source§impl EncodableRng
impl EncodableRng
pub fn new() -> EncodableRng
Trait Implementations§
Source§impl Clone for EncodableRng
impl Clone for EncodableRng
Source§fn clone(&self) -> EncodableRng
fn clone(&self) -> EncodableRng
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Default for EncodableRng
impl Default for EncodableRng
Source§impl<'de> Deserialize<'de> for EncodableRng
impl<'de> Deserialize<'de> for EncodableRng
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for EncodableRng
impl RefUnwindSafe for EncodableRng
impl Send for EncodableRng
impl Sync for EncodableRng
impl Unpin for EncodableRng
impl UnwindSafe for EncodableRng
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more