LCOV - code coverage report
Current view: top level - src/pdb/types - pointer.rs (source / functions) Coverage Total Hit
Test: lief.lcov Lines: 0.0 % 12 0
Test Date: 2024-11-30:00:00:00 Functions: 0.0 % 3 0

            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, Type};
       6              : 
       7              : use crate::common::into_optional;
       8              : 
       9              : /// This structure represents a `LF_POINTER` PDB type
      10              : pub struct Pointer<'a> {
      11              :     ptr: cxx::UniquePtr<ffi::PDB_types_Pointer>,
      12              :     _owner: PhantomData<&'a ()>,
      13              : }
      14              : 
      15              : impl FromFFI<ffi::PDB_types_Pointer> for Pointer<'_> {
      16            0 :     fn from_ffi(cmd: cxx::UniquePtr<ffi::PDB_types_Pointer>) -> Self {
      17            0 :         Self {
      18            0 :             ptr: cmd,
      19            0 :             _owner: PhantomData,
      20            0 :         }
      21            0 :     }
      22              : }
      23              : 
      24              : impl Pointer<'_> {
      25              :     /// Underlying type targeted by this modifier
      26            0 :     pub fn underlying_type(&self) -> Option<Type> {
      27            0 :         into_optional(self.ptr.underlying_type())
      28            0 :     }
      29              : }
      30              : 
      31              : impl PdbType for Pointer<'_> {
      32            0 :     fn get_base(&self) -> &ffi::PDB_Type {
      33            0 :         self.ptr.as_ref().unwrap().as_ref()
      34            0 :     }
      35              : }
        

Generated by: LCOV version 2.1-1