objc2_fs_kit/generated/
FSKitError.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5use objc2_foundation::*;
6
7use crate::*;
8
9extern "C" {
10    /// An error domain for FSKit errors.
11    ///
12    /// See
13    /// <doc
14    /// ://com.apple.documentation/documentation/Foundation/NSError> for more information on error domains.
15    ///
16    /// See also [Apple's documentation](https://developer.apple.com/documentation/fskit/fskiterrordomain?language=objc)
17    pub static FSKitErrorDomain: &'static NSErrorDomain;
18}
19
20/// A code that indicates a specific FSKit error.
21///
22/// See also [Apple's documentation](https://developer.apple.com/documentation/fskit/fserrorcode?language=objc)
23// NS_ERROR_ENUM
24#[repr(transparent)]
25#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
26pub struct FSErrorCode(pub NSInteger);
27impl FSErrorCode {
28    /// The module failed to load.
29    #[doc(alias = "FSErrorModuleLoadFailed")]
30    pub const ModuleLoadFailed: Self = Self(4500);
31    /// FSKit didn't recognize the resource, and probing failed to find a match.
32    #[doc(alias = "FSErrorResourceUnrecognized")]
33    pub const ResourceUnrecognized: Self = Self(4501);
34    /// The resource is damaged.
35    ///
36    /// This error indicates the resource needs a repair operation, or that a repair operation failed.
37    /// > Note: The status in this error applies to the resource. A failing repair operation reports a more specific error status.
38    #[doc(alias = "FSErrorResourceDamaged")]
39    pub const ResourceDamaged: Self = Self(4502);
40    /// FSKit recognizes the resource, but the resource isn't usable.
41    ///
42    /// For example, this error occurs when a resource uses a file system's internal feature flags.
43    /// If the only modules that support the file system don't support those feature flags, this code indicates an unusable resource.
44    /// The error tells the person using the module why the resource isn't usable.
45    #[doc(alias = "FSErrorResourceUnusable")]
46    pub const ResourceUnusable: Self = Self(4503);
47    /// An operation is in progress.
48    #[doc(alias = "FSErrorStatusOperationInProgress")]
49    pub const StatusOperationInProgress: Self = Self(4504);
50    /// An operation is paused.
51    #[doc(alias = "FSErrorStatusOperationPaused")]
52    pub const StatusOperationPaused: Self = Self(4505);
53    /// While enumerating a directory, the given cookie didn't resolve to a valid directory entry.
54    #[doc(alias = "FSErrorInvalidDirectoryCookie")]
55    pub const InvalidDirectoryCookie: Self = Self(4506);
56}
57
58unsafe impl Encode for FSErrorCode {
59    const ENCODING: Encoding = NSInteger::ENCODING;
60}
61
62unsafe impl RefEncode for FSErrorCode {
63    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
64}