objc2_speech/generated/SFSpeechRecognitionTaskHint.rs
1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use objc2::__framework_prelude::*;
4
5use crate::*;
6
7/// The type of task for which you are using speech recognition.
8///
9/// See also [Apple's documentation](https://developer.apple.com/documentation/speech/sfspeechrecognitiontaskhint?language=objc)
10// NS_ENUM
11#[repr(transparent)]
12#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
13pub struct SFSpeechRecognitionTaskHint(pub NSInteger);
14impl SFSpeechRecognitionTaskHint {
15 /// An unspecified type of task.
16 ///
17 /// Use this hint type when the intended use for captured speech does not match the other task types.
18 #[doc(alias = "SFSpeechRecognitionTaskHintUnspecified")]
19 pub const Unspecified: Self = Self(0);
20 /// A task that uses captured speech for text entry.
21 ///
22 /// Use this hint type when you are using speech recognition for a task that's similar to the keyboard's built-in dictation function.
23 #[doc(alias = "SFSpeechRecognitionTaskHintDictation")]
24 pub const Dictation: Self = Self(1);
25 /// A task that uses captured speech to specify search terms.
26 ///
27 /// Use this hint type when you are using speech recognition to identify search terms.
28 #[doc(alias = "SFSpeechRecognitionTaskHintSearch")]
29 pub const Search: Self = Self(2);
30 /// A task that uses captured speech for short, confirmation-style requests.
31 ///
32 /// Use this hint type when you are using speech recognition to handle confirmation commands, such as "yes," "no," or "maybe."
33 #[doc(alias = "SFSpeechRecognitionTaskHintConfirmation")]
34 pub const Confirmation: Self = Self(3);
35}
36
37unsafe impl Encode for SFSpeechRecognitionTaskHint {
38 const ENCODING: Encoding = NSInteger::ENCODING;
39}
40
41unsafe impl RefEncode for SFSpeechRecognitionTaskHint {
42 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
43}