MCPcopy Create free account
hub / github.com/MaterializeInc/materialize / generate_bytes

Function generate_bytes

test/test-util/src/generator/bytes.rs:14–19  ·  view source on GitHub ↗

Generates and returns bytes of length `len`.

(len: usize)

Source from the content-addressed store, hash-verified

12
13/// Generates and returns bytes of length `len`.
14pub fn generate_bytes(len: usize) -> Vec<u8> {
15 rand::rng()
16 .sample_iter(&Alphanumeric)
17 .take(len)
18 .collect::<Vec<u8>>()
19}

Callers

nothing calls this directly

Calls 1

takeMethod · 0.45

Tested by

no test coverage detected