objc2_speech/generated/
SFSpeechRecognitionResult.rs1use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5use objc2_foundation::*;
6
7use crate::*;
8
9extern_class!(
10 #[unsafe(super(NSObject))]
12 #[derive(Debug, PartialEq, Eq, Hash)]
13 pub struct SFSpeechRecognitionResult;
14);
15
16unsafe impl NSCoding for SFSpeechRecognitionResult {}
17
18unsafe impl NSCopying for SFSpeechRecognitionResult {}
19
20unsafe impl CopyingHelper for SFSpeechRecognitionResult {
21 type Result = Self;
22}
23
24unsafe impl NSObjectProtocol for SFSpeechRecognitionResult {}
25
26unsafe impl NSSecureCoding for SFSpeechRecognitionResult {}
27
28impl SFSpeechRecognitionResult {
29 extern_methods!(
30 #[cfg(feature = "SFTranscription")]
31 #[unsafe(method(bestTranscription))]
32 #[unsafe(method_family = none)]
33 pub unsafe fn bestTranscription(&self) -> Retained<SFTranscription>;
34
35 #[cfg(feature = "SFTranscription")]
36 #[unsafe(method(transcriptions))]
37 #[unsafe(method_family = none)]
38 pub unsafe fn transcriptions(&self) -> Retained<NSArray<SFTranscription>>;
39
40 #[unsafe(method(isFinal))]
41 #[unsafe(method_family = none)]
42 pub unsafe fn isFinal(&self) -> bool;
43
44 #[cfg(feature = "SFSpeechRecognitionMetadata")]
45 #[unsafe(method(speechRecognitionMetadata))]
46 #[unsafe(method_family = none)]
47 pub unsafe fn speechRecognitionMetadata(
48 &self,
49 ) -> Option<Retained<SFSpeechRecognitionMetadata>>;
50 );
51}
52
53impl SFSpeechRecognitionResult {
55 extern_methods!(
56 #[unsafe(method(init))]
57 #[unsafe(method_family = init)]
58 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
59
60 #[unsafe(method(new))]
61 #[unsafe(method_family = new)]
62 pub unsafe fn new() -> Retained<Self>;
63 );
64}