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

Function toWasiSize

plugins/wasi_crypto/utils/hostfunction.h:130–134  ·  view source on GitHub ↗

Cast c++ size_t to wasi size_t.

Source from the content-addressed store, hash-verified

128
129/// Cast c++ size_t to wasi size_t.
130constexpr WasiCryptoExpect<__wasi_size_t> toWasiSize(size_t Size) noexcept {
131 ensureOrReturn(Size <= std::numeric_limits<__wasi_size_t>::max(),
132 __WASI_CRYPTO_ERRNO_ALGORITHM_FAILURE);
133 return static_cast<__wasi_size_t>(Size);
134}
135
136/// Convert string_view to inner Alg representation.
137template <typename T> WasiCryptoExpect<T> tryFrom(std::string_view) noexcept;

Callers 2

bodyMethod · 0.85
bodyMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected