MCPcopy Create free account
hub / github.com/explodingcamera/tinywasm / as_f32

Method as_f32

crates/types/src/value.rs:277–282  ·  view source on GitHub ↗

Return the `f32` from a `WasmValue`, if it is a `F32`.

(&self)

Source from the content-addressed store, hash-verified

275
276 /// Return the `f32` from a `WasmValue`, if it is a `F32`.
277 pub const fn as_f32(&self) -> Option<f32> {
278 match self {
279 Self::F32(i) => Some(*i),
280 _ => None,
281 }
282 }
283
284 /// Return the `f64` from a `WasmValue`, if it is a `F64`.
285 pub const fn as_f64(&self) -> Option<f64> {

Callers 1

wast_v128_to_bytesFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected