objc2_fs_kit/generated/
FSKitFunctions.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10/// Creates an error object for the given POSIX error code.
11#[inline]
12pub unsafe extern "C-unwind" fn fs_errorForPOSIXError(param1: c_int) -> Retained<NSError> {
13    extern "C-unwind" {
14        fn fs_errorForPOSIXError(param1: c_int) -> *mut NSError;
15    }
16    let ret = unsafe { fs_errorForPOSIXError(param1) };
17    unsafe { Retained::retain_autoreleased(ret) }
18        .expect("function was marked as returning non-null, but actually returned NULL")
19}
20
21/// Creates an error object for the given Mach error code.
22#[inline]
23pub unsafe extern "C-unwind" fn fs_errorForMachError(error_code: c_int) -> Retained<NSError> {
24    extern "C-unwind" {
25        fn fs_errorForMachError(error_code: c_int) -> *mut NSError;
26    }
27    let ret = unsafe { fs_errorForMachError(error_code) };
28    unsafe { Retained::retain_autoreleased(ret) }
29        .expect("function was marked as returning non-null, but actually returned NULL")
30}
31
32/// Creates an error object for the given Cocoa error code.
33#[inline]
34pub unsafe extern "C-unwind" fn fs_errorForCocoaError(error_code: c_int) -> Retained<NSError> {
35    extern "C-unwind" {
36        fn fs_errorForCocoaError(error_code: c_int) -> *mut NSError;
37    }
38    let ret = unsafe { fs_errorForCocoaError(error_code) };
39    unsafe { Retained::retain_autoreleased(ret) }
40        .expect("function was marked as returning non-null, but actually returned NULL")
41}