objc2_web_kit/generated/
DOMException.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ffi::*;
4use objc2::__framework_prelude::*;
5use objc2_foundation::*;
6
7use crate::*;
8
9extern "C" {
10    /// [Apple's documentation](https://developer.apple.com/documentation/webkit/domexception?language=objc)
11    pub static DOMException: Option<&'static NSString>;
12}
13
14/// [Apple's documentation](https://developer.apple.com/documentation/webkit/domexceptioncode?language=objc)
15#[deprecated]
16#[repr(transparent)]
17#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
18pub struct DOMExceptionCode(pub c_uint);
19impl DOMExceptionCode {
20    #[doc(alias = "DOM_INDEX_SIZE_ERR")]
21    #[deprecated]
22    pub const INDEX_SIZE_ERR: Self = Self(1);
23    #[doc(alias = "DOM_DOMSTRING_SIZE_ERR")]
24    #[deprecated]
25    pub const DOMSTRING_SIZE_ERR: Self = Self(2);
26    #[doc(alias = "DOM_HIERARCHY_REQUEST_ERR")]
27    #[deprecated]
28    pub const HIERARCHY_REQUEST_ERR: Self = Self(3);
29    #[doc(alias = "DOM_WRONG_DOCUMENT_ERR")]
30    #[deprecated]
31    pub const WRONG_DOCUMENT_ERR: Self = Self(4);
32    #[doc(alias = "DOM_INVALID_CHARACTER_ERR")]
33    #[deprecated]
34    pub const INVALID_CHARACTER_ERR: Self = Self(5);
35    #[doc(alias = "DOM_NO_DATA_ALLOWED_ERR")]
36    #[deprecated]
37    pub const NO_DATA_ALLOWED_ERR: Self = Self(6);
38    #[doc(alias = "DOM_NO_MODIFICATION_ALLOWED_ERR")]
39    #[deprecated]
40    pub const NO_MODIFICATION_ALLOWED_ERR: Self = Self(7);
41    #[doc(alias = "DOM_NOT_FOUND_ERR")]
42    #[deprecated]
43    pub const NOT_FOUND_ERR: Self = Self(8);
44    #[doc(alias = "DOM_NOT_SUPPORTED_ERR")]
45    #[deprecated]
46    pub const NOT_SUPPORTED_ERR: Self = Self(9);
47    #[doc(alias = "DOM_INUSE_ATTRIBUTE_ERR")]
48    #[deprecated]
49    pub const INUSE_ATTRIBUTE_ERR: Self = Self(10);
50    #[doc(alias = "DOM_INVALID_STATE_ERR")]
51    #[deprecated]
52    pub const INVALID_STATE_ERR: Self = Self(11);
53    #[doc(alias = "DOM_SYNTAX_ERR")]
54    #[deprecated]
55    pub const SYNTAX_ERR: Self = Self(12);
56    #[doc(alias = "DOM_INVALID_MODIFICATION_ERR")]
57    #[deprecated]
58    pub const INVALID_MODIFICATION_ERR: Self = Self(13);
59    #[doc(alias = "DOM_NAMESPACE_ERR")]
60    #[deprecated]
61    pub const NAMESPACE_ERR: Self = Self(14);
62    #[doc(alias = "DOM_INVALID_ACCESS_ERR")]
63    #[deprecated]
64    pub const INVALID_ACCESS_ERR: Self = Self(15);
65}
66
67unsafe impl Encode for DOMExceptionCode {
68    const ENCODING: Encoding = c_uint::ENCODING;
69}
70
71unsafe impl RefEncode for DOMExceptionCode {
72    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
73}