LCOV - code coverage report
Current view: top level - src/objc - property.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 class represents a `@property` in Objective-C
       7              : pub struct Property<'a> {
       8              :     ptr: cxx::UniquePtr<ffi::ObjC_Property>,
       9              :     _owner: PhantomData<&'a ()>,
      10              : }
      11              : 
      12              : impl FromFFI<ffi::ObjC_Property> for Property<'_> {
      13            0 :     fn from_ffi(info: cxx::UniquePtr<ffi::ObjC_Property>) -> Self {
      14            0 :         Self {
      15            0 :             ptr: info,
      16            0 :             _owner: PhantomData
      17            0 :         }
      18            0 :     }
      19              : }
      20              : 
      21              : impl Property<'_> {
      22              :     /// Name of the property
      23            0 :     pub fn name(&self) -> String {
      24            0 :         self.ptr.name().to_string()
      25            0 :     }
      26              : 
      27              :     /// (raw) property's attributes (e.g. `T@"NSString",C,D,N`)
      28            0 :     pub fn attribute(&self) -> String {
      29            0 :         self.ptr.attribute().to_string()
      30            0 :     }
      31              : }
      32              : 
        

Generated by: LCOV version 2.1-1