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

Method read_from_slice_le

cranelift/codegen/src/data_value.rs:243–245  ·  view source on GitHub ↗

Read a [DataValue] from a slice using a given [Type] in little-endian byte order. # Panics: Panics if the slice does not have enough space to accommodate the [DataValue]

(src: &[u8], ty: Type)

Source from the content-addressed store, hash-verified

241 ///
242 /// Panics if the slice does not have enough space to accommodate the [DataValue]
243 pub fn read_from_slice_le(src: &[u8], ty: Type) -> Self {
244 DataValue::read_from_slice_ne(src, ty).to_le()
245 }
246
247 /// Write a [DataValue] to a memory location in native-endian byte order.
248 pub unsafe fn write_value_to(&self, p: *mut u128) {

Callers

nothing calls this directly

Calls 1

to_leMethod · 0.80

Tested by

no test coverage detected