objc2-link-presentation 0.3.2

Bindings to the LinkPresentation framework
Documentation
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;

use crate::*;

extern "C" {
    /// The domain for Link Presentation errors.
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/linkpresentation/lperrordomain?language=objc)
    pub static LPErrorDomain: Option<&'static NSErrorDomain>;
}

/// [Apple's documentation](https://developer.apple.com/documentation/linkpresentation/lperrorcode?language=objc)
// NS_ERROR_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct LPErrorCode(pub NSInteger);
impl LPErrorCode {
    /// An unknown error.
    #[doc(alias = "LPErrorUnknown")]
    pub const Unknown: Self = Self(1);
    /// An error indicating that a metadata fetch failed.
    #[doc(alias = "LPErrorMetadataFetchFailed")]
    pub const MetadataFetchFailed: Self = Self(2);
    /// An error indicating that the metadata fetch was canceled by the client.
    #[doc(alias = "LPErrorMetadataFetchCancelled")]
    pub const MetadataFetchCancelled: Self = Self(3);
    /// An error indicating that the metadata fetch took longer than allowed.
    #[doc(alias = "LPErrorMetadataFetchTimedOut")]
    pub const MetadataFetchTimedOut: Self = Self(4);
    /// An error indicating that the metadata fetch was not allowed due to system policies.
    #[doc(alias = "LPErrorMetadataFetchNotAllowed")]
    pub const MetadataFetchNotAllowed: Self = Self(5);
}

unsafe impl Encode for LPErrorCode {
    const ENCODING: Encoding = NSInteger::ENCODING;
}

unsafe impl RefEncode for LPErrorCode {
    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}