objc2_avf_audio/generated/
AVAudioSessionRoute.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::*;
5#[cfg(feature = "objc2-core-audio-types")]
6use objc2_core_audio_types::*;
7use objc2_foundation::*;
8
9use crate::*;
10
11/// The location of a data source on an iOS device.
12///
13/// See also [Apple's documentation](https://developer.apple.com/documentation/avfaudio/avaudiosessionlocation?language=objc)
14// NS_TYPED_ENUM
15pub type AVAudioSessionLocation = NSString;
16
17extern "C" {
18    /// [Apple's documentation](https://developer.apple.com/documentation/avfaudio/avaudiosessionlocationupper?language=objc)
19    pub static AVAudioSessionLocationUpper: &'static AVAudioSessionLocation;
20}
21
22extern "C" {
23    /// [Apple's documentation](https://developer.apple.com/documentation/avfaudio/avaudiosessionlocationlower?language=objc)
24    pub static AVAudioSessionLocationLower: &'static AVAudioSessionLocation;
25}
26
27/// The orientation or directionality of a data source on an iOS device.
28///
29/// See also [Apple's documentation](https://developer.apple.com/documentation/avfaudio/avaudiosessionorientation?language=objc)
30// NS_TYPED_ENUM
31pub type AVAudioSessionOrientation = NSString;
32
33extern "C" {
34    /// [Apple's documentation](https://developer.apple.com/documentation/avfaudio/avaudiosessionorientationtop?language=objc)
35    pub static AVAudioSessionOrientationTop: &'static AVAudioSessionOrientation;
36}
37
38extern "C" {
39    /// [Apple's documentation](https://developer.apple.com/documentation/avfaudio/avaudiosessionorientationbottom?language=objc)
40    pub static AVAudioSessionOrientationBottom: &'static AVAudioSessionOrientation;
41}
42
43extern "C" {
44    /// [Apple's documentation](https://developer.apple.com/documentation/avfaudio/avaudiosessionorientationfront?language=objc)
45    pub static AVAudioSessionOrientationFront: &'static AVAudioSessionOrientation;
46}
47
48extern "C" {
49    /// [Apple's documentation](https://developer.apple.com/documentation/avfaudio/avaudiosessionorientationback?language=objc)
50    pub static AVAudioSessionOrientationBack: &'static AVAudioSessionOrientation;
51}
52
53extern "C" {
54    /// [Apple's documentation](https://developer.apple.com/documentation/avfaudio/avaudiosessionorientationleft?language=objc)
55    pub static AVAudioSessionOrientationLeft: &'static AVAudioSessionOrientation;
56}
57
58extern "C" {
59    /// [Apple's documentation](https://developer.apple.com/documentation/avfaudio/avaudiosessionorientationright?language=objc)
60    pub static AVAudioSessionOrientationRight: &'static AVAudioSessionOrientation;
61}
62
63/// The possible polar patterns for a data source on an iOS device.
64///
65/// See also [Apple's documentation](https://developer.apple.com/documentation/avfaudio/avaudiosessionpolarpattern?language=objc)
66// NS_TYPED_ENUM
67pub type AVAudioSessionPolarPattern = NSString;
68
69extern "C" {
70    /// [Apple's documentation](https://developer.apple.com/documentation/avfaudio/avaudiosessionpolarpatternomnidirectional?language=objc)
71    pub static AVAudioSessionPolarPatternOmnidirectional: &'static AVAudioSessionPolarPattern;
72}
73
74extern "C" {
75    /// [Apple's documentation](https://developer.apple.com/documentation/avfaudio/avaudiosessionpolarpatterncardioid?language=objc)
76    pub static AVAudioSessionPolarPatternCardioid: &'static AVAudioSessionPolarPattern;
77}
78
79extern "C" {
80    /// [Apple's documentation](https://developer.apple.com/documentation/avfaudio/avaudiosessionpolarpatternsubcardioid?language=objc)
81    pub static AVAudioSessionPolarPatternSubcardioid: &'static AVAudioSessionPolarPattern;
82}
83
84extern "C" {
85    /// If you select a data source with AVAudioSessionPolarPatternStereo, then you must call setPreferredInputOrientation:error: on your Audio Session so that left and right are presented from the correct directions.
86    ///
87    /// See also [Apple's documentation](https://developer.apple.com/documentation/avfaudio/avaudiosessionpolarpatternstereo?language=objc)
88    pub static AVAudioSessionPolarPatternStereo: &'static AVAudioSessionPolarPattern;
89}
90
91extern_class!(
92    /// Information about a port's audio channels.
93    ///
94    /// AudioQueue, AURemoteIO and AUVoiceIO instances can be assigned to communicate with specific
95    /// hardware channels by setting an array of
96    /// <port
97    /// UID, channel index> pairs.
98    ///
99    /// See also [Apple's documentation](https://developer.apple.com/documentation/avfaudio/avaudiosessionchanneldescription?language=objc)
100    #[unsafe(super(NSObject))]
101    #[derive(Debug, PartialEq, Eq, Hash)]
102    pub struct AVAudioSessionChannelDescription;
103);
104
105unsafe impl Send for AVAudioSessionChannelDescription {}
106
107unsafe impl Sync for AVAudioSessionChannelDescription {}
108
109extern_conformance!(
110    unsafe impl NSObjectProtocol for AVAudioSessionChannelDescription {}
111);
112
113impl AVAudioSessionChannelDescription {
114    extern_methods!(
115        /// A human-readable name for the channel.
116        ///
117        /// This property is not atomic.
118        ///
119        /// # Safety
120        ///
121        /// This might not be thread-safe.
122        #[unsafe(method(channelName))]
123        #[unsafe(method_family = none)]
124        pub unsafe fn channelName(&self) -> Retained<NSString>;
125
126        /// The UID (unique identifier) of the port owning the channel.
127        ///
128        /// This property is not atomic.
129        ///
130        /// # Safety
131        ///
132        /// This might not be thread-safe.
133        #[unsafe(method(owningPortUID))]
134        #[unsafe(method_family = none)]
135        pub unsafe fn owningPortUID(&self) -> Retained<NSString>;
136
137        /// The index of this channel in its owning port's array of channels.
138        ///
139        /// This property is not atomic.
140        ///
141        /// # Safety
142        ///
143        /// This might not be thread-safe.
144        #[unsafe(method(channelNumber))]
145        #[unsafe(method_family = none)]
146        pub unsafe fn channelNumber(&self) -> NSUInteger;
147
148        #[cfg(feature = "objc2-core-audio-types")]
149        /// Description of the physical location of this channel.
150        ///
151        /// This property is not atomic.
152        ///
153        /// # Safety
154        ///
155        /// This might not be thread-safe.
156        #[unsafe(method(channelLabel))]
157        #[unsafe(method_family = none)]
158        pub unsafe fn channelLabel(&self) -> AudioChannelLabel;
159    );
160}
161
162/// Methods declared on superclass `NSObject`.
163impl AVAudioSessionChannelDescription {
164    extern_methods!(
165        #[unsafe(method(init))]
166        #[unsafe(method_family = init)]
167        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
168
169        #[unsafe(method(new))]
170        #[unsafe(method_family = new)]
171        pub unsafe fn new() -> Retained<Self>;
172    );
173}
174
175extern_class!(
176    /// Information about one of potentially multiple data sources associated with a port.
177    ///
178    /// See also [Apple's documentation](https://developer.apple.com/documentation/avfaudio/avaudiosessiondatasourcedescription?language=objc)
179    #[unsafe(super(NSObject))]
180    #[derive(Debug, PartialEq, Eq, Hash)]
181    pub struct AVAudioSessionDataSourceDescription;
182);
183
184unsafe impl Send for AVAudioSessionDataSourceDescription {}
185
186unsafe impl Sync for AVAudioSessionDataSourceDescription {}
187
188extern_conformance!(
189    unsafe impl NSObjectProtocol for AVAudioSessionDataSourceDescription {}
190);
191
192impl AVAudioSessionDataSourceDescription {
193    extern_methods!(
194        /// System-assigned ID for the data source.
195        #[unsafe(method(dataSourceID))]
196        #[unsafe(method_family = none)]
197        pub unsafe fn dataSourceID(&self) -> Retained<NSNumber>;
198
199        /// Human-readable name for the data source.
200        #[unsafe(method(dataSourceName))]
201        #[unsafe(method_family = none)]
202        pub unsafe fn dataSourceName(&self) -> Retained<NSString>;
203
204        /// Describes the general location of a data source. Will be nil for data sources for which the
205        /// location is not known.
206        #[unsafe(method(location))]
207        #[unsafe(method_family = none)]
208        pub unsafe fn location(&self) -> Option<Retained<AVAudioSessionLocation>>;
209
210        /// Describes the orientation of a data source.  Will be nil for data sources for which the
211        /// orientation is not known.
212        #[unsafe(method(orientation))]
213        #[unsafe(method_family = none)]
214        pub unsafe fn orientation(&self) -> Option<Retained<AVAudioSessionOrientation>>;
215
216        /// Array of one or more AVAudioSessionPolarPatterns describing the supported polar patterns for a
217        /// data source.  Will be nil for data sources that have no selectable patterns.
218        #[unsafe(method(supportedPolarPatterns))]
219        #[unsafe(method_family = none)]
220        pub unsafe fn supportedPolarPatterns(
221            &self,
222        ) -> Option<Retained<NSArray<AVAudioSessionPolarPattern>>>;
223
224        /// Describes the currently selected polar pattern.  Will be nil for data sources that have no
225        /// selectable patterns.
226        #[unsafe(method(selectedPolarPattern))]
227        #[unsafe(method_family = none)]
228        pub unsafe fn selectedPolarPattern(&self) -> Option<Retained<AVAudioSessionPolarPattern>>;
229
230        /// Describes the preferred polar pattern.  Will be nil for data sources that have no selectable
231        /// patterns or if no preference has been set.
232        #[unsafe(method(preferredPolarPattern))]
233        #[unsafe(method_family = none)]
234        pub unsafe fn preferredPolarPattern(&self) -> Option<Retained<AVAudioSessionPolarPattern>>;
235
236        /// Select the desired polar pattern from the set of available patterns. Setting a nil value
237        /// will clear the preference.
238        ///
239        ///
240        /// Note: If the owning port and data source are part of the active audio route, changing the polar
241        /// pattern will likely result in a route reconfiguration. If the owning port and data source are
242        /// not part of the active route, selecting a polar pattern will not result in an immediate route
243        /// reconfiguration.  Use AVAudioSession's setPreferredInput:error: method to activate the port. Use
244        /// setPreferredDataSource:error: to active the data source on the port.
245        /// You must call setPreferredInputOrientation:error: on the AVAudioSession if you chose the
246        /// AVAudioSessionPolarPatternStereo polar pattern.
247        #[unsafe(method(setPreferredPolarPattern:error:_))]
248        #[unsafe(method_family = none)]
249        pub unsafe fn setPreferredPolarPattern_error(
250            &self,
251            pattern: Option<&AVAudioSessionPolarPattern>,
252        ) -> Result<(), Retained<NSError>>;
253    );
254}
255
256/// Methods declared on superclass `NSObject`.
257impl AVAudioSessionDataSourceDescription {
258    extern_methods!(
259        #[unsafe(method(init))]
260        #[unsafe(method_family = init)]
261        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
262
263        #[unsafe(method(new))]
264        #[unsafe(method_family = new)]
265        pub unsafe fn new() -> Retained<Self>;
266    );
267}
268
269extern_class!(
270    /// Describes whether a specific capability is supported and if that capability is currently enabled
271    ///
272    /// See also [Apple's documentation](https://developer.apple.com/documentation/avfaudio/avaudiosessioncapability?language=objc)
273    #[unsafe(super(NSObject))]
274    #[derive(Debug, PartialEq, Eq, Hash)]
275    pub struct AVAudioSessionCapability;
276);
277
278unsafe impl Send for AVAudioSessionCapability {}
279
280unsafe impl Sync for AVAudioSessionCapability {}
281
282extern_conformance!(
283    unsafe impl NSObjectProtocol for AVAudioSessionCapability {}
284);
285
286impl AVAudioSessionCapability {
287    extern_methods!(
288        /// A Boolean value that indicates whether the capability is supported.
289        ///
290        /// This property is not atomic.
291        ///
292        /// # Safety
293        ///
294        /// This might not be thread-safe.
295        #[unsafe(method(isSupported))]
296        #[unsafe(method_family = none)]
297        pub unsafe fn isSupported(&self) -> bool;
298
299        /// A Boolean value that indicates whether the capability is enabled.
300        ///
301        /// This property is not atomic.
302        ///
303        /// # Safety
304        ///
305        /// This might not be thread-safe.
306        #[unsafe(method(isEnabled))]
307        #[unsafe(method_family = none)]
308        pub unsafe fn isEnabled(&self) -> bool;
309    );
310}
311
312/// Methods declared on superclass `NSObject`.
313impl AVAudioSessionCapability {
314    extern_methods!(
315        #[unsafe(method(init))]
316        #[unsafe(method_family = init)]
317        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
318
319        #[unsafe(method(new))]
320        #[unsafe(method_family = new)]
321        pub unsafe fn new() -> Retained<Self>;
322    );
323}
324
325extern_class!(
326    /// An object that describes capabilities of Bluetooth microphone ports.
327    ///
328    /// See also [Apple's documentation](https://developer.apple.com/documentation/avfaudio/avaudiosessionportextensionbluetoothmicrophone?language=objc)
329    #[unsafe(super(NSObject))]
330    #[derive(Debug, PartialEq, Eq, Hash)]
331    pub struct AVAudioSessionPortExtensionBluetoothMicrophone;
332);
333
334unsafe impl Send for AVAudioSessionPortExtensionBluetoothMicrophone {}
335
336unsafe impl Sync for AVAudioSessionPortExtensionBluetoothMicrophone {}
337
338extern_conformance!(
339    unsafe impl NSObjectProtocol for AVAudioSessionPortExtensionBluetoothMicrophone {}
340);
341
342impl AVAudioSessionPortExtensionBluetoothMicrophone {
343    extern_methods!(
344        /// Describes whether this port supports Bluetooth high-quality recording.
345        ///
346        /// Please see ``AVAudioSessionCategoryOptions/AVAudioSessionCategoryOptionBluetoothHighQualityRecording`` for details.
347        ///
348        /// This property is not atomic.
349        ///
350        /// # Safety
351        ///
352        /// This might not be thread-safe.
353        #[unsafe(method(highQualityRecording))]
354        #[unsafe(method_family = none)]
355        pub unsafe fn highQualityRecording(&self) -> Retained<AVAudioSessionCapability>;
356
357        /// Describes whether this port supports far-field input capture.
358        ///
359        /// This property is not atomic.
360        ///
361        /// # Safety
362        ///
363        /// This might not be thread-safe.
364        #[unsafe(method(farFieldCapture))]
365        #[unsafe(method_family = none)]
366        pub unsafe fn farFieldCapture(&self) -> Retained<AVAudioSessionCapability>;
367    );
368}
369
370/// Methods declared on superclass `NSObject`.
371impl AVAudioSessionPortExtensionBluetoothMicrophone {
372    extern_methods!(
373        #[unsafe(method(init))]
374        #[unsafe(method_family = init)]
375        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
376
377        #[unsafe(method(new))]
378        #[unsafe(method_family = new)]
379        pub unsafe fn new() -> Retained<Self>;
380    );
381}
382
383extern_class!(
384    /// Information about a port, a physical connector or audio device.
385    ///
386    /// See also [Apple's documentation](https://developer.apple.com/documentation/avfaudio/avaudiosessionportdescription?language=objc)
387    #[unsafe(super(NSObject))]
388    #[derive(Debug, PartialEq, Eq, Hash)]
389    pub struct AVAudioSessionPortDescription;
390);
391
392unsafe impl Send for AVAudioSessionPortDescription {}
393
394unsafe impl Sync for AVAudioSessionPortDescription {}
395
396extern_conformance!(
397    unsafe impl NSObjectProtocol for AVAudioSessionPortDescription {}
398);
399
400impl AVAudioSessionPortDescription {
401    extern_methods!(
402        #[cfg(feature = "AVAudioSessionTypes")]
403        /// This property is not atomic.
404        ///
405        /// # Safety
406        ///
407        /// This might not be thread-safe.
408        #[unsafe(method(portType))]
409        #[unsafe(method_family = none)]
410        pub unsafe fn portType(&self) -> Retained<AVAudioSessionPort>;
411
412        /// A descriptive name for the associated hardware port
413        ///
414        /// This property is not atomic.
415        ///
416        /// # Safety
417        ///
418        /// This might not be thread-safe.
419        #[unsafe(method(portName))]
420        #[unsafe(method_family = none)]
421        pub unsafe fn portName(&self) -> Retained<NSString>;
422
423        /// A system-assigned unique identifier for the associated hardware port
424        ///
425        /// This property is not atomic.
426        ///
427        /// # Safety
428        ///
429        /// This might not be thread-safe.
430        #[unsafe(method(UID))]
431        #[unsafe(method_family = none)]
432        pub unsafe fn UID(&self) -> Retained<NSString>;
433
434        /// This property's value will be true if the associated hardware port has built-in
435        /// processing for two-way voice communication.
436        ///
437        /// Applications that use their own proprietary voice processing algorithms should use this property
438        /// to decide when to disable processing.  On the other hand, if using Apple's Voice Processing I/O
439        /// unit (subtype kAudioUnitSubType_VoiceProcessingIO), the system will automatically manage this
440        /// for the application. In particular, ports of type AVAudioSessionPortBluetoothHFP and
441        /// AVAudioSessionPortCarAudio often have hardware voice processing.
442        #[unsafe(method(hasHardwareVoiceCallProcessing))]
443        #[unsafe(method_family = none)]
444        pub unsafe fn hasHardwareVoiceCallProcessing(&self) -> bool;
445
446        /// This property's value will be true if the port supports spatial audio playback and the feature is
447        /// enabled.
448        ///
449        /// 'Now Playing' apps should also inform the system if they support multichannel audio content using
450        /// -setSupportsMultichannelContent:error: method. Apps may also register to receive the
451        /// AVAudioSessionSpatialPlaybackCapabilitiesChanged notification to detect changes in user preferences that
452        /// affect spatial audio playback.
453        ///
454        /// This property is only relevant in the context of ports that have a small number of hardware channels
455        /// (typically 2), but have enhanced capabilities for rendering multi-channel content. Note that some port
456        /// types such as USB and HDMI may support multi-channel playback because they have hardware formats supporting
457        /// more than 2 channels. For example, many HDMI receivers are connected to multiple speakers and are capable of
458        /// rendering 5.1, 7.1, or other popular surround sound formats. Applications interested in utilizing multi-channel
459        /// formats should also query AVAudioSession's maximumOutputNumberOfChannels property and make use of
460        /// -setPreferredOutputNumberOfChannels:error: to set the preferred number of hardware channels.
461        #[unsafe(method(isSpatialAudioEnabled))]
462        #[unsafe(method_family = none)]
463        pub unsafe fn isSpatialAudioEnabled(&self) -> bool;
464
465        /// This property is not atomic.
466        ///
467        /// # Safety
468        ///
469        /// This might not be thread-safe.
470        #[unsafe(method(channels))]
471        #[unsafe(method_family = none)]
472        pub unsafe fn channels(
473            &self,
474        ) -> Option<Retained<NSArray<AVAudioSessionChannelDescription>>>;
475
476        /// Will be nil if there are no selectable data sources.
477        ///
478        /// This property is not atomic.
479        ///
480        /// # Safety
481        ///
482        /// This might not be thread-safe.
483        #[unsafe(method(dataSources))]
484        #[unsafe(method_family = none)]
485        pub unsafe fn dataSources(
486            &self,
487        ) -> Option<Retained<NSArray<AVAudioSessionDataSourceDescription>>>;
488
489        /// Will be nil if there are no selectable data sources. In all other cases, this property reflects
490        /// the currently selected data source.
491        ///
492        /// This property is not atomic.
493        ///
494        /// # Safety
495        ///
496        /// This might not be thread-safe.
497        #[unsafe(method(selectedDataSource))]
498        #[unsafe(method_family = none)]
499        pub unsafe fn selectedDataSource(
500            &self,
501        ) -> Option<Retained<AVAudioSessionDataSourceDescription>>;
502
503        /// This property reflects the application's preferred data source for the Port. Will be nil if
504        /// there are no selectable data sources or if no preference has been set.
505        ///
506        /// This property is not atomic.
507        ///
508        /// # Safety
509        ///
510        /// This might not be thread-safe.
511        #[unsafe(method(preferredDataSource))]
512        #[unsafe(method_family = none)]
513        pub unsafe fn preferredDataSource(
514            &self,
515        ) -> Option<Retained<AVAudioSessionDataSourceDescription>>;
516
517        /// Select the preferred data source for this port. The input dataSource parameter must be
518        /// one of the dataSources exposed by the dataSources property. Setting a nil value will clear the
519        /// preference. Note: if the port is part of the active audio route, changing the data source will
520        /// likely result in a route reconfiguration.  If the port is not part of the active route,
521        /// selecting a new data source will not result in an immediate route reconfiguration.  Use
522        /// AVAudioSession's -setPreferredInput:error: method to activate the port.
523        #[unsafe(method(setPreferredDataSource:error:_))]
524        #[unsafe(method_family = none)]
525        pub unsafe fn setPreferredDataSource_error(
526            &self,
527            data_source: Option<&AVAudioSessionDataSourceDescription>,
528        ) -> Result<(), Retained<NSError>>;
529    );
530}
531
532/// Methods declared on superclass `NSObject`.
533impl AVAudioSessionPortDescription {
534    extern_methods!(
535        #[unsafe(method(init))]
536        #[unsafe(method_family = init)]
537        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
538
539        #[unsafe(method(new))]
540        #[unsafe(method_family = new)]
541        pub unsafe fn new() -> Retained<Self>;
542    );
543}
544
545/// BluetoothMicrophoneExtension.
546impl AVAudioSessionPortDescription {
547    extern_methods!(
548        /// An optional port extension that describes capabilities relevant to Bluetooth microphone ports.
549        ///
550        /// This property is optional and will be `nil` for all ports for which this capability set doesn't apply.
551        ///
552        /// This property is not atomic.
553        ///
554        /// # Safety
555        ///
556        /// This might not be thread-safe.
557        #[unsafe(method(bluetoothMicrophoneExtension))]
558        #[unsafe(method_family = none)]
559        pub unsafe fn bluetoothMicrophoneExtension(
560            &self,
561        ) -> Option<Retained<AVAudioSessionPortExtensionBluetoothMicrophone>>;
562    );
563}
564
565extern_class!(
566    /// A description of the input and output ports which comprise a route.
567    ///
568    /// See also [Apple's documentation](https://developer.apple.com/documentation/avfaudio/avaudiosessionroutedescription?language=objc)
569    #[unsafe(super(NSObject))]
570    #[derive(Debug, PartialEq, Eq, Hash)]
571    pub struct AVAudioSessionRouteDescription;
572);
573
574unsafe impl Send for AVAudioSessionRouteDescription {}
575
576unsafe impl Sync for AVAudioSessionRouteDescription {}
577
578extern_conformance!(
579    unsafe impl NSObjectProtocol for AVAudioSessionRouteDescription {}
580);
581
582impl AVAudioSessionRouteDescription {
583    extern_methods!(
584        /// Flattened list of all input port descriptions associated with all the streams as part of the route.
585        ///
586        /// This property is not atomic.
587        ///
588        /// # Safety
589        ///
590        /// This might not be thread-safe.
591        #[unsafe(method(inputs))]
592        #[unsafe(method_family = none)]
593        pub unsafe fn inputs(&self) -> Retained<NSArray<AVAudioSessionPortDescription>>;
594
595        /// Flattened list of all output port descriptions associated with all the streams as part of the route.
596        ///
597        /// This property is not atomic.
598        ///
599        /// # Safety
600        ///
601        /// This might not be thread-safe.
602        #[unsafe(method(outputs))]
603        #[unsafe(method_family = none)]
604        pub unsafe fn outputs(&self) -> Retained<NSArray<AVAudioSessionPortDescription>>;
605    );
606}
607
608/// Methods declared on superclass `NSObject`.
609impl AVAudioSessionRouteDescription {
610    extern_methods!(
611        #[unsafe(method(init))]
612        #[unsafe(method_family = init)]
613        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
614
615        #[unsafe(method(new))]
616        #[unsafe(method_family = new)]
617        pub unsafe fn new() -> Retained<Self>;
618    );
619}