LCOV - code coverage report
Current view: top level - src/pdb/types - method.rs (source / functions) Coverage Total Hit
Test: lief.lcov Lines: 0.0 % 16 0
Test Date: 2024-10-27: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              : 
       6              : use crate::declare_fwd_iterator;
       7              : 
       8              : /// This class represents a Method (`LF_ONEMETHOD`) that can be defined in
       9              : /// ClassLike PDB type
      10              : pub struct Method<'a> {
      11              :     ptr: cxx::UniquePtr<ffi::PDB_types_Method>,
      12              :     _owner: PhantomData<&'a ()>,
      13              : }
      14              : 
      15              : impl FromFFI<ffi::PDB_types_Method> for Method<'_> {
      16            0 :     fn from_ffi(cmd: cxx::UniquePtr<ffi::PDB_types_Method>) -> Self {
      17            0 :         Self {
      18            0 :             ptr: cmd,
      19            0 :             _owner: PhantomData,
      20            0 :         }
      21            0 :     }
      22              : }
      23              : 
      24              : impl Method<'_> {
      25              :     /// Name of the method
      26            0 :     pub fn name(&self) -> String {
      27            0 :         self.ptr.name().to_string()
      28            0 :     }
      29              : 
      30              : }
      31              : 
      32            0 : declare_fwd_iterator!(
      33            0 :     Methods,
      34            0 :     Method<'a>,
      35            0 :     ffi::PDB_types_Method,
      36            0 :     ffi::PDB_types_ClassLike,
      37            0 :     ffi::PDB_types_ClassLike_it_methods
      38            0 : );
      39              : 
      40              : 
        

Generated by: LCOV version 2.1-1