Skip to main content

random

Function random 

Source
pub fn random<T: Random>() -> T
Available on crate features rand-expand and rand only.
Expand description

生成指定类型的随机值(T::random() 的便捷包装)。

§Feature Requirement

需要启用 "rand-expand" 特性。

§Examples

use lib_unknown::rand::random;

let v: u32 = random();
let _ = v;