objc2_device_discovery_extension/generated/
DDErrors.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern "C" {
11 pub static DDErrorDomain: &'static NSString;
15}
16
17#[repr(transparent)]
23#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
24pub struct DDErrorCode(pub NSInteger);
25impl DDErrorCode {
26 #[doc(alias = "DDErrorCodeSuccess")]
27 pub const Success: Self = Self(0);
28 #[doc(alias = "DDErrorCodeUnknown")]
30 pub const Unknown: Self = Self(350000);
31 #[doc(alias = "DDErrorCodeBadParameter")]
33 pub const BadParameter: Self = Self(350001);
34 #[doc(alias = "DDErrorCodeUnsupported")]
36 pub const Unsupported: Self = Self(350002);
37 #[doc(alias = "DDErrorCodeTimeout")]
39 pub const Timeout: Self = Self(350003);
40 #[doc(alias = "DDErrorCodeInternal")]
42 pub const Internal: Self = Self(350004);
43 #[doc(alias = "DDErrorCodeMissingEntitlement")]
45 pub const MissingEntitlement: Self = Self(350005);
46 #[doc(alias = "DDErrorCodePermission")]
48 pub const Permission: Self = Self(350006);
49 #[doc(alias = "DDErrorCodeNext")]
51 pub const Next: Self = Self(350007);
52}
53
54unsafe impl Encode for DDErrorCode {
55 const ENCODING: Encoding = NSInteger::ENCODING;
56}
57
58unsafe impl RefEncode for DDErrorCode {
59 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
60}
61
62pub type DDErrorOutType = *mut *mut NSError;
66
67#[cfg(feature = "block2")]
73pub type DDErrorHandler = *mut block2::DynBlock<dyn Fn(*mut NSError)>;