objc2_vision/generated/
VNError.rs1use objc2::__framework_prelude::*;
4use objc2_foundation::*;
5
6use crate::*;
7
8extern "C" {
9 pub static VNErrorDomain: Option<&'static NSString>;
11}
12
13#[repr(transparent)]
16#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
17pub struct VNErrorCode(pub NSInteger);
18impl VNErrorCode {
19 #[doc(alias = "VNErrorTuriCoreErrorCode")]
20 pub const TuriCoreErrorCode: Self = Self(-1);
21 #[doc(alias = "VNErrorOK")]
22 pub const OK: Self = Self(0);
23 #[doc(alias = "VNErrorRequestCancelled")]
24 pub const RequestCancelled: Self = Self(1);
25 #[doc(alias = "VNErrorInvalidFormat")]
26 pub const InvalidFormat: Self = Self(2);
27 #[doc(alias = "VNErrorOperationFailed")]
28 pub const OperationFailed: Self = Self(3);
29 #[doc(alias = "VNErrorOutOfBoundsError")]
30 pub const OutOfBoundsError: Self = Self(4);
31 #[doc(alias = "VNErrorInvalidOption")]
32 pub const InvalidOption: Self = Self(5);
33 #[doc(alias = "VNErrorIOError")]
34 pub const IOError: Self = Self(6);
35 #[doc(alias = "VNErrorMissingOption")]
36 pub const MissingOption: Self = Self(7);
37 #[doc(alias = "VNErrorNotImplemented")]
38 pub const NotImplemented: Self = Self(8);
39 #[doc(alias = "VNErrorInternalError")]
40 pub const InternalError: Self = Self(9);
41 #[doc(alias = "VNErrorOutOfMemory")]
42 pub const OutOfMemory: Self = Self(10);
43 #[doc(alias = "VNErrorUnknownError")]
44 pub const UnknownError: Self = Self(11);
45 #[doc(alias = "VNErrorInvalidOperation")]
46 pub const InvalidOperation: Self = Self(12);
47 #[doc(alias = "VNErrorInvalidImage")]
48 pub const InvalidImage: Self = Self(13);
49 #[doc(alias = "VNErrorInvalidArgument")]
50 pub const InvalidArgument: Self = Self(14);
51 #[doc(alias = "VNErrorInvalidModel")]
52 pub const InvalidModel: Self = Self(15);
53 #[doc(alias = "VNErrorUnsupportedRevision")]
54 pub const UnsupportedRevision: Self = Self(16);
55 #[doc(alias = "VNErrorDataUnavailable")]
56 pub const DataUnavailable: Self = Self(17);
57 #[doc(alias = "VNErrorTimeStampNotFound")]
58 pub const TimeStampNotFound: Self = Self(18);
59 #[doc(alias = "VNErrorUnsupportedRequest")]
60 pub const UnsupportedRequest: Self = Self(19);
61 #[doc(alias = "VNErrorTimeout")]
62 pub const Timeout: Self = Self(20);
63 #[doc(alias = "VNErrorUnsupportedComputeStage")]
64 pub const UnsupportedComputeStage: Self = Self(21);
65 #[doc(alias = "VNErrorUnsupportedComputeDevice")]
66 pub const UnsupportedComputeDevice: Self = Self(22);
67}
68
69unsafe impl Encode for VNErrorCode {
70 const ENCODING: Encoding = NSInteger::ENCODING;
71}
72
73unsafe impl RefEncode for VNErrorCode {
74 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
75}