objc2_safari_services/generated/
SFError.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    /// [Apple's documentation](https://developer.apple.com/documentation/safariservices/sferrordomain?language=objc)
10    pub static SFErrorDomain: Option<&'static NSString>;
11}
12
13/// [Apple's documentation](https://developer.apple.com/documentation/safariservices/sferrorcode?language=objc)
14// NS_ENUM
15#[repr(transparent)]
16#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
17pub struct SFErrorCode(pub NSInteger);
18impl SFErrorCode {
19    #[doc(alias = "SFErrorNoExtensionFound")]
20    pub const NoExtensionFound: Self = Self(1);
21    #[doc(alias = "SFErrorNoAttachmentFound")]
22    pub const NoAttachmentFound: Self = Self(2);
23    #[doc(alias = "SFErrorLoadingInterrupted")]
24    pub const LoadingInterrupted: Self = Self(3);
25}
26
27unsafe impl Encode for SFErrorCode {
28    const ENCODING: Encoding = NSInteger::ENCODING;
29}
30
31unsafe impl RefEncode for SFErrorCode {
32    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
33}