use lief_ffi as ffi;
use crate::common::FromFFI;
use std::marker::PhantomData;
pub struct IVar<'a> {
ptr: cxx::UniquePtr<ffi::ObjC_IVar>,
_owner: PhantomData<&'a ()>,
}
impl FromFFI<ffi::ObjC_IVar> for IVar<'_> {
fn from_ffi(info: cxx::UniquePtr<ffi::ObjC_IVar>) -> Self {
Self {
ptr: info,
_owner: PhantomData,
}
}
}
impl IVar<'_> {
pub fn name(&self) -> String {
self.ptr.name().to_string()
}
pub fn mangled_type(&self) -> String {
self.ptr.mangled_type().to_string()
}
}