Line data Source code
1 : use lief_ffi as ffi;
2 :
3 : use crate::common::FromFFI;
4 : use crate::dwarf::editor::types::EditorType;
5 :
6 : /// This structure represents an array type (`DW_TAG_array_type`).
7 : pub struct Array {
8 : ptr: cxx::UniquePtr<ffi::DWARF_editor_ArrayType>,
9 : }
10 :
11 : impl FromFFI<ffi::DWARF_editor_ArrayType> for Array {
12 0 : fn from_ffi(cmd: cxx::UniquePtr<ffi::DWARF_editor_ArrayType>) -> Self {
13 0 : Self {
14 0 : ptr: cmd,
15 0 : }
16 0 : }
17 : }
18 :
19 : impl EditorType for Array {
20 0 : fn get_base(&self) -> &ffi::DWARF_editor_Type {
21 0 : self.ptr.as_ref().unwrap().as_ref()
22 0 : }
23 : }
24 :
|