objc2_ui_kit/generated/
UIMailConversationEntry.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10#[repr(transparent)]
15#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
16pub struct UIMailConversationEntryKind(pub NSInteger);
17impl UIMailConversationEntryKind {
18 #[doc(alias = "UIMailConversationEntryKindNone")]
20 pub const None: Self = Self(0);
21 #[doc(alias = "UIMailConversationEntryKindPersonal")]
23 pub const Personal: Self = Self(1);
24 #[doc(alias = "UIMailConversationEntryKindPromotion")]
26 pub const Promotion: Self = Self(2);
27 #[doc(alias = "UIMailConversationEntryKindSocial")]
29 pub const Social: Self = Self(3);
30 #[doc(alias = "UIMailConversationEntryKindTransaction")]
32 pub const Transaction: Self = Self(4);
33 #[doc(alias = "UIMailConversationEntryKindNews")]
35 pub const News: Self = Self(5);
36}
37
38unsafe impl Encode for UIMailConversationEntryKind {
39 const ENCODING: Encoding = NSInteger::ENCODING;
40}
41
42unsafe impl RefEncode for UIMailConversationEntryKind {
43 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
44}
45
46extern_class!(
47 #[unsafe(super(UIConversationEntry, NSObject))]
51 #[derive(Debug, PartialEq, Eq, Hash)]
52 #[cfg(feature = "UIConversationEntry")]
53 pub struct UIMailConversationEntry;
54);
55
56#[cfg(feature = "UIConversationEntry")]
57extern_conformance!(
58 unsafe impl NSObjectProtocol for UIMailConversationEntry {}
59);
60
61#[cfg(feature = "UIConversationEntry")]
62impl UIMailConversationEntry {
63 extern_methods!(
64 #[unsafe(method(kind))]
66 #[unsafe(method_family = none)]
67 pub fn kind(&self) -> UIMailConversationEntryKind;
68
69 #[unsafe(method(setKind:))]
71 #[unsafe(method_family = none)]
72 pub fn setKind(&self, kind: UIMailConversationEntryKind);
73
74 #[unsafe(method(responseSecondaryRecipientIdentifiers))]
76 #[unsafe(method_family = none)]
77 pub fn responseSecondaryRecipientIdentifiers(&self) -> Retained<NSSet<NSString>>;
78
79 #[unsafe(method(setResponseSecondaryRecipientIdentifiers:))]
83 #[unsafe(method_family = none)]
84 pub fn setResponseSecondaryRecipientIdentifiers(
85 &self,
86 response_secondary_recipient_identifiers: &NSSet<NSString>,
87 );
88 );
89}
90
91#[cfg(feature = "UIConversationEntry")]
93impl UIMailConversationEntry {
94 extern_methods!(
95 #[unsafe(method(init))]
96 #[unsafe(method_family = init)]
97 pub fn init(this: Allocated<Self>) -> Retained<Self>;
98
99 #[unsafe(method(new))]
100 #[unsafe(method_family = new)]
101 pub fn new() -> Retained<Self>;
102 );
103}
104
105#[cfg(feature = "UIConversationEntry")]
106impl DefaultRetained for UIMailConversationEntry {
107 #[inline]
108 fn default_retained() -> Retained<Self> {
109 Self::new()
110 }
111}