(
mut cx: WasmtimeStoreContextMut<'_>,
eqref: Option<&wasmtime_eqref_t>,
out: &mut MaybeUninit<wasmtime_arrayref_t>,
)
| 119 | |
| 120 | #[unsafe(no_mangle)] |
| 121 | pub unsafe extern "C" fn wasmtime_eqref_as_array( |
| 122 | mut cx: WasmtimeStoreContextMut<'_>, |
| 123 | eqref: Option<&wasmtime_eqref_t>, |
| 124 | out: &mut MaybeUninit<wasmtime_arrayref_t>, |
| 125 | ) -> bool { |
| 126 | if let Some(eqref) = eqref.and_then(|e| e.as_wasmtime()) { |
| 127 | let mut scope = RootScope::new(&mut cx); |
| 128 | let rooted = eqref.to_rooted(&mut scope); |
| 129 | if let Ok(Some(arrayref)) = rooted.as_array(&scope) { |
| 130 | let owned = arrayref.to_owned_rooted(&mut scope).expect("just created"); |
| 131 | crate::initialize(out, Some(owned).into()); |
| 132 | return true; |
| 133 | } |
| 134 | } |
| 135 | crate::initialize(out, None::<OwnedRooted<ArrayRef>>.into()); |
| 136 | false |
| 137 | } |
| 138 | |
| 139 | #[unsafe(no_mangle)] |
| 140 | pub unsafe extern "C" fn wasmtime_eqref_type( |
no test coverage detected