objc2_link_presentation/generated/
LPError.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use objc2::__framework_prelude::*;
4use objc2_foundation::*;
5
6use crate::*;
7
8extern "C" {
9    /// The domain for Link Presentation errors.
10    ///
11    /// See also [Apple's documentation](https://developer.apple.com/documentation/linkpresentation/lperrordomain?language=objc)
12    pub static LPErrorDomain: Option<&'static NSErrorDomain>;
13}
14
15/// [Apple's documentation](https://developer.apple.com/documentation/linkpresentation/lperrorcode?language=objc)
16// NS_ERROR_ENUM
17#[repr(transparent)]
18#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
19pub struct LPErrorCode(pub NSInteger);
20impl LPErrorCode {
21    /// An unknown error.
22    #[doc(alias = "LPErrorUnknown")]
23    pub const Unknown: Self = Self(1);
24    /// An error indicating that a metadata fetch failed.
25    #[doc(alias = "LPErrorMetadataFetchFailed")]
26    pub const MetadataFetchFailed: Self = Self(2);
27    /// An error indicating that the metadata fetch was canceled by the client.
28    #[doc(alias = "LPErrorMetadataFetchCancelled")]
29    pub const MetadataFetchCancelled: Self = Self(3);
30    /// An error indicating that the metadata fetch took longer than allowed.
31    #[doc(alias = "LPErrorMetadataFetchTimedOut")]
32    pub const MetadataFetchTimedOut: Self = Self(4);
33    /// An error indicating that the metadata fetch was not allowed due to system policies.
34    #[doc(alias = "LPErrorMetadataFetchNotAllowed")]
35    pub const MetadataFetchNotAllowed: Self = Self(5);
36}
37
38unsafe impl Encode for LPErrorCode {
39    const ENCODING: Encoding = NSInteger::ENCODING;
40}
41
42unsafe impl RefEncode for LPErrorCode {
43    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
44}