wasmer_compiler/
unwind.rs1use crate::lib::std::vec::Vec;
9
10#[derive(rkyv::Serialize, rkyv::Deserialize, rkyv::Archive, Debug, Clone, PartialEq, Eq)]
18pub enum CompiledFunctionUnwindInfo {
19 WindowsX64(Vec<u8>),
21
22 Dwarf,
24}
25
26#[derive(Clone, Copy)]
28pub enum CompiledFunctionUnwindInfoRef<'a> {
29 WindowsX64(&'a [u8]),
31 Dwarf,
33}
34
35impl<'a> From<&'a CompiledFunctionUnwindInfo> for CompiledFunctionUnwindInfoRef<'a> {
36 fn from(uw: &'a CompiledFunctionUnwindInfo) -> Self {
37 match uw {
38 CompiledFunctionUnwindInfo::WindowsX64(d) => {
39 CompiledFunctionUnwindInfoRef::WindowsX64(d)
40 }
41 CompiledFunctionUnwindInfo::Dwarf => CompiledFunctionUnwindInfoRef::Dwarf,
42 }
43 }
44}
45
46impl<'a> From<&'a ArchivedCompiledFunctionUnwindInfo> for CompiledFunctionUnwindInfoRef<'a> {
47 fn from(uw: &'a ArchivedCompiledFunctionUnwindInfo) -> Self {
48 match uw {
49 ArchivedCompiledFunctionUnwindInfo::WindowsX64(d) => {
50 CompiledFunctionUnwindInfoRef::WindowsX64(d)
51 }
52 ArchivedCompiledFunctionUnwindInfo::Dwarf => CompiledFunctionUnwindInfoRef::Dwarf,
53 }
54 }
55}