vmi_os_windows/comps/
macros.rs1macro_rules! impl_symbols {
2 () => {
3 fn symbols(&self) -> &$crate::offsets::Symbols {
4 &self.vmi.underlying_os().symbols
5 }
6 };
7}
8
9macro_rules! impl_offsets {
10 () => {
11 fn offsets(&self) -> &$crate::offsets::Offsets {
12 &self.vmi.underlying_os().offsets
13 }
14 };
15}
16
17macro_rules! impl_offsets_ext_v1 {
18 () => {
19 fn offsets_ext(&self) -> &$crate::offsets::v1::Offsets {
20 match self.vmi.underlying_os().offsets.ext() {
21 Some($crate::offsets::OffsetsExt::V1(offsets)) => offsets,
22 _ => unreachable!(),
23 }
24 }
25 };
26}
27
28macro_rules! impl_offsets_ext_v2 {
29 () => {
30 fn offsets_ext(&self) -> &$crate::offsets::v2::Offsets {
31 match self.vmi.underlying_os().offsets.ext() {
32 Some($crate::offsets::OffsetsExt::V2(offsets)) => offsets,
33 _ => unreachable!(),
34 }
35 }
36 };
37}
38
39pub(crate) use impl_offsets;
40pub(crate) use impl_offsets_ext_v1;
41pub(crate) use impl_offsets_ext_v2;
42pub(crate) use impl_symbols;