objc2_speech/generated/
SFSpeechLanguageModel.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11 #[unsafe(super(NSObject))]
13 #[derive(Debug, PartialEq, Eq, Hash)]
14 pub struct SFSpeechLanguageModelConfiguration;
15);
16
17unsafe impl Send for SFSpeechLanguageModelConfiguration {}
18
19unsafe impl Sync for SFSpeechLanguageModelConfiguration {}
20
21unsafe impl NSCopying for SFSpeechLanguageModelConfiguration {}
22
23unsafe impl CopyingHelper for SFSpeechLanguageModelConfiguration {
24 type Result = Self;
25}
26
27unsafe impl NSObjectProtocol for SFSpeechLanguageModelConfiguration {}
28
29impl SFSpeechLanguageModelConfiguration {
30 extern_methods!(
31 #[unsafe(method(languageModel))]
32 #[unsafe(method_family = none)]
33 pub unsafe fn languageModel(&self) -> Retained<NSURL>;
34
35 #[unsafe(method(vocabulary))]
36 #[unsafe(method_family = none)]
37 pub unsafe fn vocabulary(&self) -> Option<Retained<NSURL>>;
38
39 #[unsafe(method(initWithLanguageModel:))]
40 #[unsafe(method_family = init)]
41 pub unsafe fn initWithLanguageModel(
42 this: Allocated<Self>,
43 language_model: &NSURL,
44 ) -> Retained<Self>;
45
46 #[unsafe(method(initWithLanguageModel:vocabulary:))]
47 #[unsafe(method_family = init)]
48 pub unsafe fn initWithLanguageModel_vocabulary(
49 this: Allocated<Self>,
50 language_model: &NSURL,
51 vocabulary: Option<&NSURL>,
52 ) -> Retained<Self>;
53 );
54}
55
56impl SFSpeechLanguageModelConfiguration {
58 extern_methods!(
59 #[unsafe(method(init))]
60 #[unsafe(method_family = init)]
61 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
62
63 #[unsafe(method(new))]
64 #[unsafe(method_family = new)]
65 pub unsafe fn new() -> Retained<Self>;
66 );
67}
68
69extern_class!(
70 #[unsafe(super(NSObject))]
72 #[derive(Debug, PartialEq, Eq, Hash)]
73 pub struct SFSpeechLanguageModel;
74);
75
76unsafe impl NSObjectProtocol for SFSpeechLanguageModel {}
77
78impl SFSpeechLanguageModel {
79 extern_methods!(
80 #[cfg(feature = "block2")]
81 #[unsafe(method(prepareCustomLanguageModelForUrl:clientIdentifier:configuration:completion:))]
82 #[unsafe(method_family = none)]
83 pub unsafe fn prepareCustomLanguageModelForUrl_clientIdentifier_configuration_completion(
84 asset: &NSURL,
85 client_identifier: &NSString,
86 configuration: &SFSpeechLanguageModelConfiguration,
87 completion: &block2::Block<dyn Fn(*mut NSError)>,
88 );
89
90 #[cfg(feature = "block2")]
91 #[unsafe(method(prepareCustomLanguageModelForUrl:clientIdentifier:configuration:ignoresCache:completion:))]
92 #[unsafe(method_family = none)]
93 pub unsafe fn prepareCustomLanguageModelForUrl_clientIdentifier_configuration_ignoresCache_completion(
94 asset: &NSURL,
95 client_identifier: &NSString,
96 configuration: &SFSpeechLanguageModelConfiguration,
97 ignores_cache: bool,
98 completion: &block2::Block<dyn Fn(*mut NSError)>,
99 );
100 );
101}
102
103impl SFSpeechLanguageModel {
105 extern_methods!(
106 #[unsafe(method(init))]
107 #[unsafe(method_family = init)]
108 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
109
110 #[unsafe(method(new))]
111 #[unsafe(method_family = new)]
112 pub unsafe fn new() -> Retained<Self>;
113 );
114}