pub fn properties(&self) -> Result<CFDictionary<CFString, CFType>> {
        unsafe {
            let mut props = mem::MaybeUninit::<CFMutableDictionaryRef>::uninit();

            let result = ffi::IORegistryEntryCreateCFProperties(
                self.0,
                props.as_mut_ptr(),
                kCFAllocatorDefault,
                0,
            );
            if result != kern_return::KERN_SUCCESS {
                Err(Error::last_os_error().with_ffi("IORegistryEntryCreateCFProperties"))
            } else {
                let props = props.assume_init();
                Ok(CFMutableDictionary::wrap_under_create_rule(props).to_immutable())
            }
        }
    }
/// Returns a typed dictionary with this object's properties.
Returns a typed dictionary with this object's properties.
Returns a typed dictionary with this object ' s properties .
pub fn properties(&self) -> Result<CFDictionary<CFString, CFType>> {
        unsafe {
            let mut props = mem::MaybeUninit::<CFMutableDictionaryRef>::uninit();
            let result = ffi::IORegistryEntryCreateCFProperties(
                self.0,
                props.as_mut_ptr(),
                kCFAllocatorDefault,
                0,
            );
            if result != kern_return::KERN_SUCCESS {
                Err(Error::last_os_error().with_ffi("IORegistryEntryCreateCFProperties"))
            } else {
                let props = props.assume_init();
                Ok(CFMutableDictionary::wrap_under_create_rule(props).to_immutable())
            }
        }
    }
pub fn properties ( & self ) -> Result < CFDictionary < CFString , CFType > > { unsafe { let mut props = mem :: MaybeUninit :: < CFMutableDictionaryRef > :: uninit ( ) ; let result = ffi :: IORegistryEntryCreateCFProperties ( self . 0 , props . as_mut_ptr ( ) , kCFAllocatorDefault , 0 , ) ; if result != kern_return :: KERN_SUCCESS { Err ( Error :: last_os_error ( ) . with_ffi ( " " ) ) } else { let props = props . assume_init ( ) ; Ok ( CFMutableDictionary :: wrap_under_create_rule ( props ) . to_immutable ( ) ) } } }
Returns a typed dictionary with this object's properties.
Returns a typed dictionary with this object ' s properties .
&self
&self