pub trait RandomCoreEffects: Send + Sync {
// Required methods
fn random_bytes<'life0, 'async_trait>(
&'life0 self,
len: usize,
) -> Pin<Box<dyn Future<Output = Vec<u8>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn random_bytes_32<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = [u8; 32]> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn random_u64<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = u64> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
}Expand description
Core random effects for generating random values.
This trait provides cryptographically secure random number generation for the Aura effects system. Implementations in handlers provide:
- Production: System cryptographic RNG
- Testing: Deterministic seeded RNG for reproducible tests
- Simulation: Controlled randomness for scenario testing
Required Methods§
Sourcefn random_bytes<'life0, 'async_trait>(
&'life0 self,
len: usize,
) -> Pin<Box<dyn Future<Output = Vec<u8>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn random_bytes<'life0, 'async_trait>(
&'life0 self,
len: usize,
) -> Pin<Box<dyn Future<Output = Vec<u8>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Generate random bytes of specified length
Implementations on Foreign Types§
Source§impl<T> RandomCoreEffects for Arc<T>where
T: RandomCoreEffects + ?Sized,
Blanket implementation for Arc where T: RandomCoreEffects
impl<T> RandomCoreEffects for Arc<T>where
T: RandomCoreEffects + ?Sized,
Blanket implementation for Arc