objc2_messages/generated/
MSMessageError.rs1use objc2::__framework_prelude::*;
4use objc2_foundation::*;
5
6use crate::*;
7
8extern "C" {
9 pub static MSStickersErrorDomain: Option<&'static NSString>;
11}
12
13extern "C" {
14 pub static MSMessagesErrorDomain: Option<&'static NSString>;
16}
17
18#[repr(transparent)]
21#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
22pub struct MSMessageErrorCode(pub NSInteger);
23impl MSMessageErrorCode {
24 #[doc(alias = "MSMessageErrorCodeUnknown")]
25 pub const Unknown: Self = Self(-1);
26 #[doc(alias = "MSMessageErrorCodeFileNotFound")]
27 pub const FileNotFound: Self = Self(1);
28 #[doc(alias = "MSMessageErrorCodeFileUnreadable")]
29 pub const FileUnreadable: Self = Self(2);
30 #[doc(alias = "MSMessageErrorCodeImproperFileType")]
31 pub const ImproperFileType: Self = Self(3);
32 #[doc(alias = "MSMessageErrorCodeImproperFileURL")]
33 pub const ImproperFileURL: Self = Self(4);
34 #[doc(alias = "MSMessageErrorCodeStickerFileImproperFileAttributes")]
35 pub const StickerFileImproperFileAttributes: Self = Self(5);
36 #[doc(alias = "MSMessageErrorCodeStickerFileImproperFileSize")]
37 pub const StickerFileImproperFileSize: Self = Self(6);
38 #[doc(alias = "MSMessageErrorCodeStickerFileImproperFileFormat")]
39 pub const StickerFileImproperFileFormat: Self = Self(7);
40 #[doc(alias = "MSMessageErrorCodeURLExceedsMaxSize")]
41 pub const URLExceedsMaxSize: Self = Self(8);
42 #[doc(alias = "MSMessageErrorCodeSendWithoutRecentInteraction")]
43 pub const SendWithoutRecentInteraction: Self = Self(9);
44 #[doc(alias = "MSMessageErrorCodeSendWhileNotVisible")]
45 pub const SendWhileNotVisible: Self = Self(10);
46 #[doc(alias = "MSMessageErrorCodeAPIUnavailableInPresentationContext")]
47 pub const APIUnavailableInPresentationContext: Self = Self(11);
48}
49
50unsafe impl Encode for MSMessageErrorCode {
51 const ENCODING: Encoding = NSInteger::ENCODING;
52}
53
54unsafe impl RefEncode for MSMessageErrorCode {
55 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
56}