LCOV - code coverage report
Current view: top level - src/objc - ivar.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 std::marker::PhantomData;
       4              : use crate::common::FromFFI;
       5              : 
       6              : /// This structure represents an instance variable (ivar)
       7              : pub struct IVar<'a> {
       8              :     ptr: cxx::UniquePtr<ffi::ObjC_IVar>,
       9              :     _owner: PhantomData<&'a ()>,
      10              : }
      11              : 
      12              : impl FromFFI<ffi::ObjC_IVar> for IVar<'_> {
      13            0 :     fn from_ffi(info: cxx::UniquePtr<ffi::ObjC_IVar>) -> Self {
      14            0 :         Self {
      15            0 :             ptr: info,
      16            0 :             _owner: PhantomData
      17            0 :         }
      18            0 :     }
      19              : }
      20              : 
      21              : impl IVar<'_> {
      22              :     /// Name of the instance variable
      23            0 :     pub fn name(&self) -> String {
      24            0 :         self.ptr.name().to_string()
      25            0 :     }
      26              : 
      27              :     /// Type of the instance var in its mangled representation (`[29i]`)
      28            0 :     pub fn mangled_type(&self) -> String {
      29            0 :         self.ptr.mangled_type().to_string()
      30            0 :     }
      31              : }
        

Generated by: LCOV version 2.1-1