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

Method cumulative_size

crates/wasi-common/src/string_array.rs:41–46  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

39 }
40
41 pub fn cumulative_size(&self) -> u32 {
42 self.elems
43 .iter()
44 .map(|e| e.as_bytes().len() + 1)
45 .sum::<usize>() as u32
46 }
47
48 pub fn write_to_guest(
49 &self,

Callers 4

pushMethod · 0.80
write_to_guestMethod · 0.80
args_sizes_getMethod · 0.80
environ_sizes_getMethod · 0.80

Calls 4

as_bytesMethod · 0.80
mapMethod · 0.45
iterMethod · 0.45
lenMethod · 0.45

Tested by

no test coverage detected