MCPcopy Create free account
hub / github.com/WasmEdge/WasmEdge / arrayOutputPull

Method arrayOutputPull

plugins/wasi_crypto/common/ctx.cpp:18–29  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

16}
17
18WasiCryptoExpect<size_t>
19Context::arrayOutputPull(__wasi_array_output_t ArrayOutputHandle,
20 Span<uint8_t> Buf) noexcept {
21 return ArrayOutputManager.get(ArrayOutputHandle)
22 .map([=](Common::ArrayOutput &ArrayOutput) noexcept {
23 auto [Size, AlreadyConsumed] = ArrayOutput.pull(Buf);
24 if (AlreadyConsumed) {
25 ArrayOutputManager.close(ArrayOutputHandle);
26 }
27 return Size;
28 });
29}
30
31WasiCryptoExpect<__wasi_options_t>
32Context::optionsOpen(__wasi_algorithm_type_e_t AlgType) noexcept {

Callers 1

bodyMethod · 0.45

Calls 3

getMethod · 0.45
pullMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected