objc2_ui_kit/generated/
UISmartReplySuggestion.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5use objc2_foundation::*;
6
7use crate::*;
8
9extern_class!(
10    /// A class you use to handle a Smart Reply suggestion.
11    ///
12    /// Use the ``smartReply`` string as a signal of the user’s intention when you generate long form text based on the option the user selected.
13    ///
14    /// See also [Apple's documentation](https://developer.apple.com/documentation/uikit/uismartreplysuggestion?language=objc)
15    #[unsafe(super(UIInputSuggestion, NSObject))]
16    #[derive(Debug, PartialEq, Eq, Hash)]
17    #[cfg(feature = "UIInputSuggestion")]
18    pub struct UISmartReplySuggestion;
19);
20
21#[cfg(feature = "UIInputSuggestion")]
22extern_conformance!(
23    unsafe impl NSObjectProtocol for UISmartReplySuggestion {}
24);
25
26#[cfg(feature = "UIInputSuggestion")]
27impl UISmartReplySuggestion {
28    extern_methods!(
29        /// A string from the Smart Reply option the user selected.
30        ///
31        /// Use this as a signal of the user’s intention when you generate long form text based on the option the user selected.
32        #[unsafe(method(smartReply))]
33        #[unsafe(method_family = none)]
34        pub fn smartReply(&self) -> Retained<NSString>;
35    );
36}
37
38/// Methods declared on superclass `NSObject`.
39#[cfg(feature = "UIInputSuggestion")]
40impl UISmartReplySuggestion {
41    extern_methods!(
42        #[unsafe(method(init))]
43        #[unsafe(method_family = init)]
44        pub fn init(this: Allocated<Self>) -> Retained<Self>;
45
46        #[unsafe(method(new))]
47        #[unsafe(method_family = new)]
48        pub fn new() -> Retained<Self>;
49    );
50}
51
52#[cfg(feature = "UIInputSuggestion")]
53impl DefaultRetained for UISmartReplySuggestion {
54    #[inline]
55    fn default_retained() -> Retained<Self> {
56        Self::new()
57    }
58}