MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / try_fill_bytes

Method try_fill_bytes

crates/wasi-common/src/random.rs:31–36  ·  view source on GitHub ↗
(&mut self, buf: &mut [u8])

Source from the content-addressed store, hash-verified

29 Ok(((w0 as u64) << 32) + (w1 as u64))
30 }
31 fn try_fill_bytes(&mut self, buf: &mut [u8]) -> Result<(), Infallible> {
32 for b in buf.iter_mut() {
33 *b = self.cycle.next().expect("infinite sequence");
34 }
35 Ok(())
36 }
37}
38
39#[cfg(test)]

Callers 1

deterministicFunction · 0.45

Calls 4

OkFunction · 0.85
iter_mutMethod · 0.45
expectMethod · 0.45
nextMethod · 0.45

Tested by 1

deterministicFunction · 0.36