1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern "C" {
/// The error domain for managed asset packs.
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/backgroundassets/bamanagederrordomain?language=objc)
pub static BAManagedErrorDomain: &'static NSErrorDomain;
}
extern "C" {
/// The `-[NSError userInfo]` key for an asset pack’s identifier.
///
/// This key is relevant when the error code is ``BAManagedErrorCode/BAManagedErrorCodeAssetPackNotFound``.
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/backgroundassets/baassetpackidentifiererrorkey?language=objc)
pub static BAAssetPackIdentifierErrorKey: &'static NSErrorUserInfoKey;
}
/// An error code for a managed asset pack.
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/backgroundassets/bamanagederrorcode?language=objc)
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct BAManagedErrorCode(pub NSInteger);
impl BAManagedErrorCode {
/// An error code that indicates the system can’t find an asset pack with the given identifier.
///
/// Refer to the value in `-[NSError userInfo]` for the key `BAAssetPackIdentifierErrorKey` for the asset pack’s identifier.
#[doc(alias = "BAManagedErrorCodeAssetPackNotFound")]
pub const AssetPackNotFound: Self = Self(0);
/// An error code that indicates the system can’t find a file at the specified path.
///
/// Refer to the value in `-[NSError userInfo]` for the key `NSFilePathErrorKey` for the file path.
#[doc(alias = "BAManagedErrorCodeFileNotFound")]
pub const FileNotFound: Self = Self(1);
}
unsafe impl Encode for BAManagedErrorCode {
const ENCODING: Encoding = NSInteger::ENCODING;
}
unsafe impl RefEncode for BAManagedErrorCode {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}