pub struct VortexSeed { /* private fields */ }Expand description
A 128-bit simulation seed.
Two identical VortexSeed values will always produce identical simulation
behaviour. This is the top-level input to every Vortex simulation.
Implementations§
Source§impl VortexSeed
impl VortexSeed
Sourcepub const fn from_u64(val: u64) -> Self
pub const fn from_u64(val: u64) -> Self
Create a seed from a single u64 (zero-extends the high half).
Convenient for simple test fixtures: VortexSeed::from_u64(42).
Sourcepub const fn to_u64(&self) -> u64
pub const fn to_u64(&self) -> u64
Convert to a single u64 by XOR-folding.
Used when interfacing with the existing DetRng::new(u64) API.
Sourcepub fn from_bytes(bytes: [u8; 16]) -> Self
pub fn from_bytes(bytes: [u8; 16]) -> Self
Create from a byte array (big-endian).
Trait Implementations§
Source§impl Clone for VortexSeed
impl Clone for VortexSeed
Source§fn clone(&self) -> VortexSeed
fn clone(&self) -> VortexSeed
Returns a duplicate 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 Debug for VortexSeed
impl Debug for VortexSeed
Source§impl Display for VortexSeed
impl Display for VortexSeed
Source§impl From<u64> for VortexSeed
impl From<u64> for VortexSeed
Source§impl Hash for VortexSeed
impl Hash for VortexSeed
Source§impl PartialEq for VortexSeed
impl PartialEq for VortexSeed
impl Copy for VortexSeed
impl Eq for VortexSeed
impl StructuralPartialEq for VortexSeed
Auto Trait Implementations§
impl Freeze for VortexSeed
impl RefUnwindSafe for VortexSeed
impl Send for VortexSeed
impl Sync for VortexSeed
impl Unpin for VortexSeed
impl UnsafeUnpin for VortexSeed
impl UnwindSafe for VortexSeed
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