objc2-web-kit 0.3.0

Bindings to the WebKit framework
Documentation
//! 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" {
    /// [Apple's documentation](https://developer.apple.com/documentation/webkit/wkerrordomain?language=objc)
    pub static WKErrorDomain: &'static NSString;
}

/// Constants used by NSError to indicate errors in the WebKit domain.
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/webkit/wkerrorcode?language=objc)
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct WKErrorCode(pub NSInteger);
impl WKErrorCode {
    #[doc(alias = "WKErrorUnknown")]
    pub const Unknown: Self = Self(1);
    #[doc(alias = "WKErrorWebContentProcessTerminated")]
    pub const WebContentProcessTerminated: Self = Self(2);
    #[doc(alias = "WKErrorWebViewInvalidated")]
    pub const WebViewInvalidated: Self = Self(3);
    #[doc(alias = "WKErrorJavaScriptExceptionOccurred")]
    pub const JavaScriptExceptionOccurred: Self = Self(4);
    #[doc(alias = "WKErrorJavaScriptResultTypeIsUnsupported")]
    pub const JavaScriptResultTypeIsUnsupported: Self = Self(5);
    #[doc(alias = "WKErrorContentRuleListStoreCompileFailed")]
    pub const ContentRuleListStoreCompileFailed: Self = Self(6);
    #[doc(alias = "WKErrorContentRuleListStoreLookUpFailed")]
    pub const ContentRuleListStoreLookUpFailed: Self = Self(7);
    #[doc(alias = "WKErrorContentRuleListStoreRemoveFailed")]
    pub const ContentRuleListStoreRemoveFailed: Self = Self(8);
    #[doc(alias = "WKErrorContentRuleListStoreVersionMismatch")]
    pub const ContentRuleListStoreVersionMismatch: Self = Self(9);
    #[doc(alias = "WKErrorAttributedStringContentFailedToLoad")]
    pub const AttributedStringContentFailedToLoad: Self = Self(10);
    #[doc(alias = "WKErrorAttributedStringContentLoadTimedOut")]
    pub const AttributedStringContentLoadTimedOut: Self = Self(11);
    #[doc(alias = "WKErrorJavaScriptInvalidFrameTarget")]
    pub const JavaScriptInvalidFrameTarget: Self = Self(12);
    #[doc(alias = "WKErrorNavigationAppBoundDomain")]
    pub const NavigationAppBoundDomain: Self = Self(13);
    #[doc(alias = "WKErrorJavaScriptAppBoundDomain")]
    pub const JavaScriptAppBoundDomain: Self = Self(14);
    #[doc(alias = "WKErrorDuplicateCredential")]
    pub const DuplicateCredential: Self = Self(15);
    #[doc(alias = "WKErrorMalformedCredential")]
    pub const MalformedCredential: Self = Self(16);
    #[doc(alias = "WKErrorCredentialNotFound")]
    pub const CredentialNotFound: Self = Self(17);
}

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

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