MCPcopy Create free account
hub / github.com/aws-samples/serverless-rust-demo / get_random_string

Function get_random_string

tests/aws_test.rs:18–23  ·  view source on GitHub ↗
(length: usize)

Source from the content-addressed store, hash-verified

16type E = Box<dyn std::error::Error + Send + Sync + 'static>;
17
18fn get_random_string(length: usize) -> String {
19 let mut rng = rand::thread_rng();
20 return (0..length)
21 .map(|_| rng.sample(Alphanumeric) as char)
22 .collect();
23}
24
25fn get_random_product() -> Product {
26 let mut rng = rand::thread_rng();

Callers 2

get_random_productFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected