karyon_core 1.0.0

Runtime-agnostic async utilities (smol/tokio) for the karyon crates: executors, task groups, queues, timeouts, and optional Ed25519 crypto.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use rand::Rng;

/// Generates and returns a random u32.
pub fn random_32() -> u32 {
    rand::rng().random()
}

/// Generates and returns a random u64.
pub fn random_64() -> u64 {
    rand::rng().random()
}

/// Generates and returns a random u16.
pub fn random_16() -> u16 {
    rand::rng().random()
}