(r: HeapType)
| 162 | |
| 163 | impl From<HeapType> for wasmtime_heaptype_t { |
| 164 | fn from(r: HeapType) -> Self { |
| 165 | match r { |
| 166 | HeapType::Extern => Self::Extern, |
| 167 | HeapType::NoExtern => Self::NoExtern, |
| 168 | HeapType::Func => Self::Func, |
| 169 | HeapType::ConcreteFunc(f) => Self::ConcreteFunc(Box::new(wasm_functype_t::new(f))), |
| 170 | HeapType::NoFunc => Self::NoFunc, |
| 171 | HeapType::Any => Self::Any, |
| 172 | HeapType::None => Self::None, |
| 173 | HeapType::Eq => Self::Eq, |
| 174 | HeapType::I31 => Self::I31, |
| 175 | HeapType::Array => Self::Array, |
| 176 | HeapType::ConcreteArray(a) => { |
| 177 | Self::ConcreteArray(Box::new(wasmtime_array_type_t { ty: a })) |
| 178 | } |
| 179 | HeapType::Struct => Self::Struct, |
| 180 | HeapType::ConcreteStruct(s) => { |
| 181 | Self::ConcreteStruct(Box::new(wasmtime_struct_type_t { ty: s })) |
| 182 | } |
| 183 | HeapType::Exn => Self::Exn, |
| 184 | HeapType::ConcreteExn(e) => Self::ConcreteExn(Box::new(wasmtime_exn_type_t { ty: e })), |
| 185 | HeapType::NoExn => Self::NoExn, |
| 186 | HeapType::Cont | HeapType::ConcreteCont(_) | HeapType::NoCont => { |
| 187 | crate::abort("missing support for contref") |
| 188 | } |
| 189 | } |
| 190 | } |
| 191 | } |
| 192 | |
| 193 | #[unsafe(no_mangle)] |
nothing calls this directly
no test coverage detected