objc2_speech/generated/
SFTranscription.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11    /// [Apple's documentation](https://developer.apple.com/documentation/speech/sftranscription?language=objc)
12    #[unsafe(super(NSObject))]
13    #[derive(Debug, PartialEq, Eq, Hash)]
14    pub struct SFTranscription;
15);
16
17unsafe impl NSCoding for SFTranscription {}
18
19unsafe impl NSCopying for SFTranscription {}
20
21unsafe impl CopyingHelper for SFTranscription {
22    type Result = Self;
23}
24
25unsafe impl NSObjectProtocol for SFTranscription {}
26
27unsafe impl NSSecureCoding for SFTranscription {}
28
29impl SFTranscription {
30    extern_methods!(
31        #[unsafe(method(formattedString))]
32        #[unsafe(method_family = none)]
33        pub unsafe fn formattedString(&self) -> Retained<NSString>;
34
35        #[cfg(feature = "SFTranscriptionSegment")]
36        #[unsafe(method(segments))]
37        #[unsafe(method_family = none)]
38        pub unsafe fn segments(&self) -> Retained<NSArray<SFTranscriptionSegment>>;
39
40        #[deprecated = "speakingRate is moved to SFSpeechRecognitionMetadata"]
41        #[unsafe(method(speakingRate))]
42        #[unsafe(method_family = none)]
43        pub unsafe fn speakingRate(&self) -> c_double;
44
45        #[deprecated = "averagePauseDuration is moved to SFSpeechRecognitionMetadata"]
46        #[unsafe(method(averagePauseDuration))]
47        #[unsafe(method_family = none)]
48        pub unsafe fn averagePauseDuration(&self) -> NSTimeInterval;
49    );
50}
51
52/// Methods declared on superclass `NSObject`.
53impl SFTranscription {
54    extern_methods!(
55        #[unsafe(method(init))]
56        #[unsafe(method_family = init)]
57        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
58
59        #[unsafe(method(new))]
60        #[unsafe(method_family = new)]
61        pub unsafe fn new() -> Retained<Self>;
62    );
63}