You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: processor.rs
    path of file: ./repos/heim/heim-cpu/src/sys/macos/bindings
    
    the code of the file until where you have to start completion: #![allow(non_camel_case_types)]

use std::ptr;
use std::slice;

use mach::kern_return::{self, kern_return_t};
use m
    
pub fn processor_load_info() -> Result<Vec<processor_cpu_load_info>> {
    let port = host_port::HostPort::get();

    let mut cpu_count = 0;
    let mut processor_info: processor_info_array_t = ptr::null_mut();
    let mut cpu_info_count = 0;

    let result = unsafe {
        host_processor_info(
            *port,
            PROCESSOR_CPU_LOAD_INFO,
            &mut cpu_count,
            &mut processor_info,
            &mut cpu_info_count,
        )
    };

    if result != kern_return::KERN_SUCCESS {
        Err(Error::last_os_error().with_ffi("host_processor_info"))
    } else {
        let cpu_info = unsafe { slice::from_raw_parts(processor_info, cpu_info_count as usize) };
        // Could use a `::std::mem::transmute` probably, but this is okay too
        let mut stats = Vec::with_capacity(cpu_count as usize);
        for chunk in cpu_info.chunks(4) {
            stats.push(processor_cpu_load_info {
                user: chunk[CPU_STATE_USER] as natural_t,
                system: chunk[CPU_STATE_SYSTEM] as natural_t,
                idle: chunk[CPU_STATE_IDLE] as natural_t,
                nice: chunk[CPU_STATE_NICE] as natural_t,
            })
        }

        let result = unsafe {
            vm_deallocate(
                mach_task_self(),
                processor_info as vm_address_t,
                cpu_info_count as vm_size_t * std::mem::size_of::<natural_t>(),
            )
        };
        if result != kern_return::KERN_SUCCESS {
            return Err(Error::last_os_error().with_ffi("vm_deallocate"));
        }

        Ok(stats)
    }
}