#[non_exhaustive]pub struct ServiceEntropy { /* private fields */ }Expand description
Host entropy used to select the VM’s initial math.random sequence.
Like ServiceClock, every constructor carries a determinism label. The provider is read
once while the VM is built; math.randomseed remains available afterward.
Implementations§
Source§impl ServiceEntropy
impl ServiceEntropy
Sourcepub fn system() -> Self
pub fn system() -> Self
System entropy where Rustia has a default platform adapter. If the platform random
source is temporarily unavailable, a time-varying fallback still preserves live()’s
no-replay-guarantee contract. Labeled nondeterministic.
Sourcepub fn from_fn(entropy: impl FnMut() -> u64 + 'static) -> Self
pub fn from_fn(entropy: impl FnMut() -> u64 + 'static) -> Self
Host-supplied replay-stable seed provider.
Sourcepub fn from_nondeterministic_fn(entropy: impl FnMut() -> u64 + 'static) -> Self
pub fn from_nondeterministic_fn(entropy: impl FnMut() -> u64 + 'static) -> Self
Host-supplied live seed provider, explicitly labeled nondeterministic.
Trait Implementations§
Source§impl Clone for ServiceEntropy
impl Clone for ServiceEntropy
Source§fn clone(&self) -> ServiceEntropy
fn clone(&self) -> ServiceEntropy
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 moreAuto Trait Implementations§
impl Freeze for ServiceEntropy
impl !RefUnwindSafe for ServiceEntropy
impl !Send for ServiceEntropy
impl !Sync for ServiceEntropy
impl Unpin for ServiceEntropy
impl UnsafeUnpin for ServiceEntropy
impl !UnwindSafe for ServiceEntropy
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