Line data Source code
1 : use lief_ffi as ffi;
2 :
3 : use crate::common::FromFFI;
4 : use std::marker::PhantomData;
5 : use crate::pdb::types::PdbType;
6 :
7 : /// This structure wraps a `LF_PROCEDURE` PDB type
8 : pub struct Function<'a> {
9 : ptr: cxx::UniquePtr<ffi::PDB_types_Function>,
10 : _owner: PhantomData<&'a ()>,
11 : }
12 :
13 : impl FromFFI<ffi::PDB_types_Function> for Function<'_> {
14 0 : fn from_ffi(cmd: cxx::UniquePtr<ffi::PDB_types_Function>) -> Self {
15 0 : Self {
16 0 : ptr: cmd,
17 0 : _owner: PhantomData,
18 0 : }
19 0 : }
20 : }
21 :
22 : impl Function<'_> {
23 : }
24 :
25 : impl PdbType for Function<'_> {
26 0 : fn get_base(&self) -> &ffi::PDB_Type {
27 0 : self.ptr.as_ref().unwrap().as_ref()
28 0 : }
29 : }
|