objc2-fs-kit 0.3.2

Bindings to the FSKit framework
Documentation
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;

use crate::*;

/// Creates an error object for the given POSIX error code.
#[inline]
pub unsafe extern "C-unwind" fn fs_errorForPOSIXError(param1: c_int) -> Retained<NSError> {
    extern "C-unwind" {
        fn fs_errorForPOSIXError(param1: c_int) -> *mut NSError;
    }
    let ret = unsafe { fs_errorForPOSIXError(param1) };
    unsafe { Retained::retain_autoreleased(ret) }
        .expect("function was marked as returning non-null, but actually returned NULL")
}

/// Creates an error object for the given Mach error code.
#[inline]
pub unsafe extern "C-unwind" fn fs_errorForMachError(error_code: c_int) -> Retained<NSError> {
    extern "C-unwind" {
        fn fs_errorForMachError(error_code: c_int) -> *mut NSError;
    }
    let ret = unsafe { fs_errorForMachError(error_code) };
    unsafe { Retained::retain_autoreleased(ret) }
        .expect("function was marked as returning non-null, but actually returned NULL")
}

/// Creates an error object for the given Cocoa error code.
#[inline]
pub unsafe extern "C-unwind" fn fs_errorForCocoaError(error_code: c_int) -> Retained<NSError> {
    extern "C-unwind" {
        fn fs_errorForCocoaError(error_code: c_int) -> *mut NSError;
    }
    let ret = unsafe { fs_errorForCocoaError(error_code) };
    unsafe { Retained::retain_autoreleased(ret) }
        .expect("function was marked as returning non-null, but actually returned NULL")
}