objc2_foundation/generated/
NSXMLParser.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6
7use crate::*;
8
9/// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsxmlparserexternalentityresolvingpolicy?language=objc)
10// NS_ENUM
11#[repr(transparent)]
12#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
13pub struct NSXMLParserExternalEntityResolvingPolicy(pub NSUInteger);
14impl NSXMLParserExternalEntityResolvingPolicy {
15    #[doc(alias = "NSXMLParserResolveExternalEntitiesNever")]
16    pub const ResolveExternalEntitiesNever: Self = Self(0);
17    #[doc(alias = "NSXMLParserResolveExternalEntitiesNoNetwork")]
18    pub const ResolveExternalEntitiesNoNetwork: Self = Self(1);
19    #[doc(alias = "NSXMLParserResolveExternalEntitiesSameOriginOnly")]
20    pub const ResolveExternalEntitiesSameOriginOnly: Self = Self(2);
21    #[doc(alias = "NSXMLParserResolveExternalEntitiesAlways")]
22    pub const ResolveExternalEntitiesAlways: Self = Self(3);
23}
24
25unsafe impl Encode for NSXMLParserExternalEntityResolvingPolicy {
26    const ENCODING: Encoding = NSUInteger::ENCODING;
27}
28
29unsafe impl RefEncode for NSXMLParserExternalEntityResolvingPolicy {
30    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
31}
32
33extern_class!(
34    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsxmlparser?language=objc)
35    #[unsafe(super(NSObject))]
36    #[derive(Debug, PartialEq, Eq, Hash)]
37    pub struct NSXMLParser;
38);
39
40extern_conformance!(
41    unsafe impl NSObjectProtocol for NSXMLParser {}
42);
43
44impl NSXMLParser {
45    extern_methods!(
46        #[cfg(feature = "NSURL")]
47        #[unsafe(method(initWithContentsOfURL:))]
48        #[unsafe(method_family = init)]
49        pub fn initWithContentsOfURL(this: Allocated<Self>, url: &NSURL) -> Option<Retained<Self>>;
50
51        #[cfg(feature = "NSData")]
52        #[unsafe(method(initWithData:))]
53        #[unsafe(method_family = init)]
54        pub fn initWithData(this: Allocated<Self>, data: &NSData) -> Retained<Self>;
55
56        #[cfg(feature = "NSStream")]
57        #[unsafe(method(initWithStream:))]
58        #[unsafe(method_family = init)]
59        pub fn initWithStream(this: Allocated<Self>, stream: &NSInputStream) -> Retained<Self>;
60
61        /// # Safety
62        ///
63        /// This is not retained internally, you must ensure the object is still alive.
64        #[unsafe(method(delegate))]
65        #[unsafe(method_family = none)]
66        pub unsafe fn delegate(&self) -> Option<Retained<ProtocolObject<dyn NSXMLParserDelegate>>>;
67
68        /// Setter for [`delegate`][Self::delegate].
69        ///
70        /// # Safety
71        ///
72        /// This is unretained, you must ensure the object is kept alive while in use.
73        #[unsafe(method(setDelegate:))]
74        #[unsafe(method_family = none)]
75        pub unsafe fn setDelegate(
76            &self,
77            delegate: Option<&ProtocolObject<dyn NSXMLParserDelegate>>,
78        );
79
80        #[unsafe(method(shouldProcessNamespaces))]
81        #[unsafe(method_family = none)]
82        pub fn shouldProcessNamespaces(&self) -> bool;
83
84        /// Setter for [`shouldProcessNamespaces`][Self::shouldProcessNamespaces].
85        #[unsafe(method(setShouldProcessNamespaces:))]
86        #[unsafe(method_family = none)]
87        pub fn setShouldProcessNamespaces(&self, should_process_namespaces: bool);
88
89        #[unsafe(method(shouldReportNamespacePrefixes))]
90        #[unsafe(method_family = none)]
91        pub fn shouldReportNamespacePrefixes(&self) -> bool;
92
93        /// Setter for [`shouldReportNamespacePrefixes`][Self::shouldReportNamespacePrefixes].
94        #[unsafe(method(setShouldReportNamespacePrefixes:))]
95        #[unsafe(method_family = none)]
96        pub fn setShouldReportNamespacePrefixes(&self, should_report_namespace_prefixes: bool);
97
98        #[unsafe(method(externalEntityResolvingPolicy))]
99        #[unsafe(method_family = none)]
100        pub fn externalEntityResolvingPolicy(&self) -> NSXMLParserExternalEntityResolvingPolicy;
101
102        /// Setter for [`externalEntityResolvingPolicy`][Self::externalEntityResolvingPolicy].
103        #[unsafe(method(setExternalEntityResolvingPolicy:))]
104        #[unsafe(method_family = none)]
105        pub fn setExternalEntityResolvingPolicy(
106            &self,
107            external_entity_resolving_policy: NSXMLParserExternalEntityResolvingPolicy,
108        );
109
110        #[cfg(all(feature = "NSSet", feature = "NSURL"))]
111        #[unsafe(method(allowedExternalEntityURLs))]
112        #[unsafe(method_family = none)]
113        pub fn allowedExternalEntityURLs(&self) -> Option<Retained<NSSet<NSURL>>>;
114
115        #[cfg(all(feature = "NSSet", feature = "NSURL"))]
116        /// Setter for [`allowedExternalEntityURLs`][Self::allowedExternalEntityURLs].
117        ///
118        /// This is [copied][crate::NSCopying::copy] when set.
119        #[unsafe(method(setAllowedExternalEntityURLs:))]
120        #[unsafe(method_family = none)]
121        pub fn setAllowedExternalEntityURLs(
122            &self,
123            allowed_external_entity_ur_ls: Option<&NSSet<NSURL>>,
124        );
125
126        #[unsafe(method(parse))]
127        #[unsafe(method_family = none)]
128        pub fn parse(&self) -> bool;
129
130        #[unsafe(method(abortParsing))]
131        #[unsafe(method_family = none)]
132        pub fn abortParsing(&self);
133
134        #[cfg(feature = "NSError")]
135        #[unsafe(method(parserError))]
136        #[unsafe(method_family = none)]
137        pub fn parserError(&self) -> Option<Retained<NSError>>;
138
139        #[unsafe(method(shouldResolveExternalEntities))]
140        #[unsafe(method_family = none)]
141        pub fn shouldResolveExternalEntities(&self) -> bool;
142
143        /// Setter for [`shouldResolveExternalEntities`][Self::shouldResolveExternalEntities].
144        #[unsafe(method(setShouldResolveExternalEntities:))]
145        #[unsafe(method_family = none)]
146        pub fn setShouldResolveExternalEntities(&self, should_resolve_external_entities: bool);
147    );
148}
149
150/// Methods declared on superclass `NSObject`.
151impl NSXMLParser {
152    extern_methods!(
153        #[unsafe(method(init))]
154        #[unsafe(method_family = init)]
155        pub fn init(this: Allocated<Self>) -> Retained<Self>;
156
157        #[unsafe(method(new))]
158        #[unsafe(method_family = new)]
159        pub fn new() -> Retained<Self>;
160    );
161}
162
163impl DefaultRetained for NSXMLParser {
164    #[inline]
165    fn default_retained() -> Retained<Self> {
166        Self::new()
167    }
168}
169
170/// NSXMLParserLocatorAdditions.
171impl NSXMLParser {
172    extern_methods!(
173        #[cfg(feature = "NSString")]
174        #[unsafe(method(publicID))]
175        #[unsafe(method_family = none)]
176        pub fn publicID(&self) -> Option<Retained<NSString>>;
177
178        #[cfg(feature = "NSString")]
179        #[unsafe(method(systemID))]
180        #[unsafe(method_family = none)]
181        pub fn systemID(&self) -> Option<Retained<NSString>>;
182
183        #[unsafe(method(lineNumber))]
184        #[unsafe(method_family = none)]
185        pub fn lineNumber(&self) -> NSInteger;
186
187        #[unsafe(method(columnNumber))]
188        #[unsafe(method_family = none)]
189        pub fn columnNumber(&self) -> NSInteger;
190    );
191}
192
193extern_protocol!(
194    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsxmlparserdelegate?language=objc)
195    pub unsafe trait NSXMLParserDelegate: NSObjectProtocol {
196        #[optional]
197        #[unsafe(method(parserDidStartDocument:))]
198        #[unsafe(method_family = none)]
199        fn parserDidStartDocument(&self, parser: &NSXMLParser);
200
201        #[optional]
202        #[unsafe(method(parserDidEndDocument:))]
203        #[unsafe(method_family = none)]
204        fn parserDidEndDocument(&self, parser: &NSXMLParser);
205
206        #[cfg(feature = "NSString")]
207        #[optional]
208        #[unsafe(method(parser:foundNotationDeclarationWithName:publicID:systemID:))]
209        #[unsafe(method_family = none)]
210        fn parser_foundNotationDeclarationWithName_publicID_systemID(
211            &self,
212            parser: &NSXMLParser,
213            name: &NSString,
214            public_id: Option<&NSString>,
215            system_id: Option<&NSString>,
216        );
217
218        #[cfg(feature = "NSString")]
219        #[optional]
220        #[unsafe(method(parser:foundUnparsedEntityDeclarationWithName:publicID:systemID:notationName:))]
221        #[unsafe(method_family = none)]
222        fn parser_foundUnparsedEntityDeclarationWithName_publicID_systemID_notationName(
223            &self,
224            parser: &NSXMLParser,
225            name: &NSString,
226            public_id: Option<&NSString>,
227            system_id: Option<&NSString>,
228            notation_name: Option<&NSString>,
229        );
230
231        #[cfg(feature = "NSString")]
232        #[optional]
233        #[unsafe(method(parser:foundAttributeDeclarationWithName:forElement:type:defaultValue:))]
234        #[unsafe(method_family = none)]
235        fn parser_foundAttributeDeclarationWithName_forElement_type_defaultValue(
236            &self,
237            parser: &NSXMLParser,
238            attribute_name: &NSString,
239            element_name: &NSString,
240            r#type: Option<&NSString>,
241            default_value: Option<&NSString>,
242        );
243
244        #[cfg(feature = "NSString")]
245        #[optional]
246        #[unsafe(method(parser:foundElementDeclarationWithName:model:))]
247        #[unsafe(method_family = none)]
248        fn parser_foundElementDeclarationWithName_model(
249            &self,
250            parser: &NSXMLParser,
251            element_name: &NSString,
252            model: &NSString,
253        );
254
255        #[cfg(feature = "NSString")]
256        #[optional]
257        #[unsafe(method(parser:foundInternalEntityDeclarationWithName:value:))]
258        #[unsafe(method_family = none)]
259        fn parser_foundInternalEntityDeclarationWithName_value(
260            &self,
261            parser: &NSXMLParser,
262            name: &NSString,
263            value: Option<&NSString>,
264        );
265
266        #[cfg(feature = "NSString")]
267        #[optional]
268        #[unsafe(method(parser:foundExternalEntityDeclarationWithName:publicID:systemID:))]
269        #[unsafe(method_family = none)]
270        fn parser_foundExternalEntityDeclarationWithName_publicID_systemID(
271            &self,
272            parser: &NSXMLParser,
273            name: &NSString,
274            public_id: Option<&NSString>,
275            system_id: Option<&NSString>,
276        );
277
278        #[cfg(all(feature = "NSDictionary", feature = "NSString"))]
279        #[optional]
280        #[unsafe(method(parser:didStartElement:namespaceURI:qualifiedName:attributes:))]
281        #[unsafe(method_family = none)]
282        fn parser_didStartElement_namespaceURI_qualifiedName_attributes(
283            &self,
284            parser: &NSXMLParser,
285            element_name: &NSString,
286            namespace_uri: Option<&NSString>,
287            q_name: Option<&NSString>,
288            attribute_dict: &NSDictionary<NSString, NSString>,
289        );
290
291        #[cfg(feature = "NSString")]
292        #[optional]
293        #[unsafe(method(parser:didEndElement:namespaceURI:qualifiedName:))]
294        #[unsafe(method_family = none)]
295        fn parser_didEndElement_namespaceURI_qualifiedName(
296            &self,
297            parser: &NSXMLParser,
298            element_name: &NSString,
299            namespace_uri: Option<&NSString>,
300            q_name: Option<&NSString>,
301        );
302
303        #[cfg(feature = "NSString")]
304        #[optional]
305        #[unsafe(method(parser:didStartMappingPrefix:toURI:))]
306        #[unsafe(method_family = none)]
307        fn parser_didStartMappingPrefix_toURI(
308            &self,
309            parser: &NSXMLParser,
310            prefix: &NSString,
311            namespace_uri: &NSString,
312        );
313
314        #[cfg(feature = "NSString")]
315        #[optional]
316        #[unsafe(method(parser:didEndMappingPrefix:))]
317        #[unsafe(method_family = none)]
318        fn parser_didEndMappingPrefix(&self, parser: &NSXMLParser, prefix: &NSString);
319
320        #[cfg(feature = "NSString")]
321        #[optional]
322        #[unsafe(method(parser:foundCharacters:))]
323        #[unsafe(method_family = none)]
324        fn parser_foundCharacters(&self, parser: &NSXMLParser, string: &NSString);
325
326        #[cfg(feature = "NSString")]
327        #[optional]
328        #[unsafe(method(parser:foundIgnorableWhitespace:))]
329        #[unsafe(method_family = none)]
330        fn parser_foundIgnorableWhitespace(
331            &self,
332            parser: &NSXMLParser,
333            whitespace_string: &NSString,
334        );
335
336        #[cfg(feature = "NSString")]
337        #[optional]
338        #[unsafe(method(parser:foundProcessingInstructionWithTarget:data:))]
339        #[unsafe(method_family = none)]
340        fn parser_foundProcessingInstructionWithTarget_data(
341            &self,
342            parser: &NSXMLParser,
343            target: &NSString,
344            data: Option<&NSString>,
345        );
346
347        #[cfg(feature = "NSString")]
348        #[optional]
349        #[unsafe(method(parser:foundComment:))]
350        #[unsafe(method_family = none)]
351        fn parser_foundComment(&self, parser: &NSXMLParser, comment: &NSString);
352
353        #[cfg(feature = "NSData")]
354        #[optional]
355        #[unsafe(method(parser:foundCDATA:))]
356        #[unsafe(method_family = none)]
357        fn parser_foundCDATA(&self, parser: &NSXMLParser, cdata_block: &NSData);
358
359        #[cfg(all(feature = "NSData", feature = "NSString"))]
360        #[optional]
361        #[unsafe(method(parser:resolveExternalEntityName:systemID:))]
362        #[unsafe(method_family = none)]
363        fn parser_resolveExternalEntityName_systemID(
364            &self,
365            parser: &NSXMLParser,
366            name: &NSString,
367            system_id: Option<&NSString>,
368        ) -> Option<Retained<NSData>>;
369
370        #[cfg(feature = "NSError")]
371        #[optional]
372        #[unsafe(method(parser:parseErrorOccurred:))]
373        #[unsafe(method_family = none)]
374        fn parser_parseErrorOccurred(&self, parser: &NSXMLParser, parse_error: &NSError);
375
376        #[cfg(feature = "NSError")]
377        #[optional]
378        #[unsafe(method(parser:validationErrorOccurred:))]
379        #[unsafe(method_family = none)]
380        fn parser_validationErrorOccurred(&self, parser: &NSXMLParser, validation_error: &NSError);
381    }
382);
383
384extern "C" {
385    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsxmlparsererrordomain?language=objc)
386    #[cfg(all(feature = "NSError", feature = "NSString"))]
387    pub static NSXMLParserErrorDomain: &'static NSErrorDomain;
388}
389
390/// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsxmlparsererror?language=objc)
391// NS_ENUM
392#[repr(transparent)]
393#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
394pub struct NSXMLParserError(pub NSInteger);
395impl NSXMLParserError {
396    #[doc(alias = "NSXMLParserInternalError")]
397    pub const InternalError: Self = Self(1);
398    #[doc(alias = "NSXMLParserOutOfMemoryError")]
399    pub const OutOfMemoryError: Self = Self(2);
400    #[doc(alias = "NSXMLParserDocumentStartError")]
401    pub const DocumentStartError: Self = Self(3);
402    #[doc(alias = "NSXMLParserEmptyDocumentError")]
403    pub const EmptyDocumentError: Self = Self(4);
404    #[doc(alias = "NSXMLParserPrematureDocumentEndError")]
405    pub const PrematureDocumentEndError: Self = Self(5);
406    #[doc(alias = "NSXMLParserInvalidHexCharacterRefError")]
407    pub const InvalidHexCharacterRefError: Self = Self(6);
408    #[doc(alias = "NSXMLParserInvalidDecimalCharacterRefError")]
409    pub const InvalidDecimalCharacterRefError: Self = Self(7);
410    #[doc(alias = "NSXMLParserInvalidCharacterRefError")]
411    pub const InvalidCharacterRefError: Self = Self(8);
412    #[doc(alias = "NSXMLParserInvalidCharacterError")]
413    pub const InvalidCharacterError: Self = Self(9);
414    #[doc(alias = "NSXMLParserCharacterRefAtEOFError")]
415    pub const CharacterRefAtEOFError: Self = Self(10);
416    #[doc(alias = "NSXMLParserCharacterRefInPrologError")]
417    pub const CharacterRefInPrologError: Self = Self(11);
418    #[doc(alias = "NSXMLParserCharacterRefInEpilogError")]
419    pub const CharacterRefInEpilogError: Self = Self(12);
420    #[doc(alias = "NSXMLParserCharacterRefInDTDError")]
421    pub const CharacterRefInDTDError: Self = Self(13);
422    #[doc(alias = "NSXMLParserEntityRefAtEOFError")]
423    pub const EntityRefAtEOFError: Self = Self(14);
424    #[doc(alias = "NSXMLParserEntityRefInPrologError")]
425    pub const EntityRefInPrologError: Self = Self(15);
426    #[doc(alias = "NSXMLParserEntityRefInEpilogError")]
427    pub const EntityRefInEpilogError: Self = Self(16);
428    #[doc(alias = "NSXMLParserEntityRefInDTDError")]
429    pub const EntityRefInDTDError: Self = Self(17);
430    #[doc(alias = "NSXMLParserParsedEntityRefAtEOFError")]
431    pub const ParsedEntityRefAtEOFError: Self = Self(18);
432    #[doc(alias = "NSXMLParserParsedEntityRefInPrologError")]
433    pub const ParsedEntityRefInPrologError: Self = Self(19);
434    #[doc(alias = "NSXMLParserParsedEntityRefInEpilogError")]
435    pub const ParsedEntityRefInEpilogError: Self = Self(20);
436    #[doc(alias = "NSXMLParserParsedEntityRefInInternalSubsetError")]
437    pub const ParsedEntityRefInInternalSubsetError: Self = Self(21);
438    #[doc(alias = "NSXMLParserEntityReferenceWithoutNameError")]
439    pub const EntityReferenceWithoutNameError: Self = Self(22);
440    #[doc(alias = "NSXMLParserEntityReferenceMissingSemiError")]
441    pub const EntityReferenceMissingSemiError: Self = Self(23);
442    #[doc(alias = "NSXMLParserParsedEntityRefNoNameError")]
443    pub const ParsedEntityRefNoNameError: Self = Self(24);
444    #[doc(alias = "NSXMLParserParsedEntityRefMissingSemiError")]
445    pub const ParsedEntityRefMissingSemiError: Self = Self(25);
446    #[doc(alias = "NSXMLParserUndeclaredEntityError")]
447    pub const UndeclaredEntityError: Self = Self(26);
448    #[doc(alias = "NSXMLParserUnparsedEntityError")]
449    pub const UnparsedEntityError: Self = Self(28);
450    #[doc(alias = "NSXMLParserEntityIsExternalError")]
451    pub const EntityIsExternalError: Self = Self(29);
452    #[doc(alias = "NSXMLParserEntityIsParameterError")]
453    pub const EntityIsParameterError: Self = Self(30);
454    #[doc(alias = "NSXMLParserUnknownEncodingError")]
455    pub const UnknownEncodingError: Self = Self(31);
456    #[doc(alias = "NSXMLParserEncodingNotSupportedError")]
457    pub const EncodingNotSupportedError: Self = Self(32);
458    #[doc(alias = "NSXMLParserStringNotStartedError")]
459    pub const StringNotStartedError: Self = Self(33);
460    #[doc(alias = "NSXMLParserStringNotClosedError")]
461    pub const StringNotClosedError: Self = Self(34);
462    #[doc(alias = "NSXMLParserNamespaceDeclarationError")]
463    pub const NamespaceDeclarationError: Self = Self(35);
464    #[doc(alias = "NSXMLParserEntityNotStartedError")]
465    pub const EntityNotStartedError: Self = Self(36);
466    #[doc(alias = "NSXMLParserEntityNotFinishedError")]
467    pub const EntityNotFinishedError: Self = Self(37);
468    #[doc(alias = "NSXMLParserLessThanSymbolInAttributeError")]
469    pub const LessThanSymbolInAttributeError: Self = Self(38);
470    #[doc(alias = "NSXMLParserAttributeNotStartedError")]
471    pub const AttributeNotStartedError: Self = Self(39);
472    #[doc(alias = "NSXMLParserAttributeNotFinishedError")]
473    pub const AttributeNotFinishedError: Self = Self(40);
474    #[doc(alias = "NSXMLParserAttributeHasNoValueError")]
475    pub const AttributeHasNoValueError: Self = Self(41);
476    #[doc(alias = "NSXMLParserAttributeRedefinedError")]
477    pub const AttributeRedefinedError: Self = Self(42);
478    #[doc(alias = "NSXMLParserLiteralNotStartedError")]
479    pub const LiteralNotStartedError: Self = Self(43);
480    #[doc(alias = "NSXMLParserLiteralNotFinishedError")]
481    pub const LiteralNotFinishedError: Self = Self(44);
482    #[doc(alias = "NSXMLParserCommentNotFinishedError")]
483    pub const CommentNotFinishedError: Self = Self(45);
484    #[doc(alias = "NSXMLParserProcessingInstructionNotStartedError")]
485    pub const ProcessingInstructionNotStartedError: Self = Self(46);
486    #[doc(alias = "NSXMLParserProcessingInstructionNotFinishedError")]
487    pub const ProcessingInstructionNotFinishedError: Self = Self(47);
488    #[doc(alias = "NSXMLParserNotationNotStartedError")]
489    pub const NotationNotStartedError: Self = Self(48);
490    #[doc(alias = "NSXMLParserNotationNotFinishedError")]
491    pub const NotationNotFinishedError: Self = Self(49);
492    #[doc(alias = "NSXMLParserAttributeListNotStartedError")]
493    pub const AttributeListNotStartedError: Self = Self(50);
494    #[doc(alias = "NSXMLParserAttributeListNotFinishedError")]
495    pub const AttributeListNotFinishedError: Self = Self(51);
496    #[doc(alias = "NSXMLParserMixedContentDeclNotStartedError")]
497    pub const MixedContentDeclNotStartedError: Self = Self(52);
498    #[doc(alias = "NSXMLParserMixedContentDeclNotFinishedError")]
499    pub const MixedContentDeclNotFinishedError: Self = Self(53);
500    #[doc(alias = "NSXMLParserElementContentDeclNotStartedError")]
501    pub const ElementContentDeclNotStartedError: Self = Self(54);
502    #[doc(alias = "NSXMLParserElementContentDeclNotFinishedError")]
503    pub const ElementContentDeclNotFinishedError: Self = Self(55);
504    #[doc(alias = "NSXMLParserXMLDeclNotStartedError")]
505    pub const XMLDeclNotStartedError: Self = Self(56);
506    #[doc(alias = "NSXMLParserXMLDeclNotFinishedError")]
507    pub const XMLDeclNotFinishedError: Self = Self(57);
508    #[doc(alias = "NSXMLParserConditionalSectionNotStartedError")]
509    pub const ConditionalSectionNotStartedError: Self = Self(58);
510    #[doc(alias = "NSXMLParserConditionalSectionNotFinishedError")]
511    pub const ConditionalSectionNotFinishedError: Self = Self(59);
512    #[doc(alias = "NSXMLParserExternalSubsetNotFinishedError")]
513    pub const ExternalSubsetNotFinishedError: Self = Self(60);
514    #[doc(alias = "NSXMLParserDOCTYPEDeclNotFinishedError")]
515    pub const DOCTYPEDeclNotFinishedError: Self = Self(61);
516    #[doc(alias = "NSXMLParserMisplacedCDATAEndStringError")]
517    pub const MisplacedCDATAEndStringError: Self = Self(62);
518    #[doc(alias = "NSXMLParserCDATANotFinishedError")]
519    pub const CDATANotFinishedError: Self = Self(63);
520    #[doc(alias = "NSXMLParserMisplacedXMLDeclarationError")]
521    pub const MisplacedXMLDeclarationError: Self = Self(64);
522    #[doc(alias = "NSXMLParserSpaceRequiredError")]
523    pub const SpaceRequiredError: Self = Self(65);
524    #[doc(alias = "NSXMLParserSeparatorRequiredError")]
525    pub const SeparatorRequiredError: Self = Self(66);
526    #[doc(alias = "NSXMLParserNMTOKENRequiredError")]
527    pub const NMTOKENRequiredError: Self = Self(67);
528    #[doc(alias = "NSXMLParserNAMERequiredError")]
529    pub const NAMERequiredError: Self = Self(68);
530    #[doc(alias = "NSXMLParserPCDATARequiredError")]
531    pub const PCDATARequiredError: Self = Self(69);
532    #[doc(alias = "NSXMLParserURIRequiredError")]
533    pub const URIRequiredError: Self = Self(70);
534    #[doc(alias = "NSXMLParserPublicIdentifierRequiredError")]
535    pub const PublicIdentifierRequiredError: Self = Self(71);
536    #[doc(alias = "NSXMLParserLTRequiredError")]
537    pub const LTRequiredError: Self = Self(72);
538    #[doc(alias = "NSXMLParserGTRequiredError")]
539    pub const GTRequiredError: Self = Self(73);
540    #[doc(alias = "NSXMLParserLTSlashRequiredError")]
541    pub const LTSlashRequiredError: Self = Self(74);
542    #[doc(alias = "NSXMLParserEqualExpectedError")]
543    pub const EqualExpectedError: Self = Self(75);
544    #[doc(alias = "NSXMLParserTagNameMismatchError")]
545    pub const TagNameMismatchError: Self = Self(76);
546    #[doc(alias = "NSXMLParserUnfinishedTagError")]
547    pub const UnfinishedTagError: Self = Self(77);
548    #[doc(alias = "NSXMLParserStandaloneValueError")]
549    pub const StandaloneValueError: Self = Self(78);
550    #[doc(alias = "NSXMLParserInvalidEncodingNameError")]
551    pub const InvalidEncodingNameError: Self = Self(79);
552    #[doc(alias = "NSXMLParserCommentContainsDoubleHyphenError")]
553    pub const CommentContainsDoubleHyphenError: Self = Self(80);
554    #[doc(alias = "NSXMLParserInvalidEncodingError")]
555    pub const InvalidEncodingError: Self = Self(81);
556    #[doc(alias = "NSXMLParserExternalStandaloneEntityError")]
557    pub const ExternalStandaloneEntityError: Self = Self(82);
558    #[doc(alias = "NSXMLParserInvalidConditionalSectionError")]
559    pub const InvalidConditionalSectionError: Self = Self(83);
560    #[doc(alias = "NSXMLParserEntityValueRequiredError")]
561    pub const EntityValueRequiredError: Self = Self(84);
562    #[doc(alias = "NSXMLParserNotWellBalancedError")]
563    pub const NotWellBalancedError: Self = Self(85);
564    #[doc(alias = "NSXMLParserExtraContentError")]
565    pub const ExtraContentError: Self = Self(86);
566    #[doc(alias = "NSXMLParserInvalidCharacterInEntityError")]
567    pub const InvalidCharacterInEntityError: Self = Self(87);
568    #[doc(alias = "NSXMLParserParsedEntityRefInInternalError")]
569    pub const ParsedEntityRefInInternalError: Self = Self(88);
570    #[doc(alias = "NSXMLParserEntityRefLoopError")]
571    pub const EntityRefLoopError: Self = Self(89);
572    #[doc(alias = "NSXMLParserEntityBoundaryError")]
573    pub const EntityBoundaryError: Self = Self(90);
574    #[doc(alias = "NSXMLParserInvalidURIError")]
575    pub const InvalidURIError: Self = Self(91);
576    #[doc(alias = "NSXMLParserURIFragmentError")]
577    pub const URIFragmentError: Self = Self(92);
578    #[doc(alias = "NSXMLParserNoDTDError")]
579    pub const NoDTDError: Self = Self(94);
580    #[doc(alias = "NSXMLParserDelegateAbortedParseError")]
581    pub const DelegateAbortedParseError: Self = Self(512);
582}
583
584unsafe impl Encode for NSXMLParserError {
585    const ENCODING: Encoding = NSInteger::ENCODING;
586}
587
588unsafe impl RefEncode for NSXMLParserError {
589    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
590}