objc2_core_motion/generated/
CMAmbientPressure.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::*;
5use objc2_foundation::*;
6
7use crate::*;
8
9extern_class!(
10    /// [Apple's documentation](https://developer.apple.com/documentation/coremotion/cmambientpressuredata?language=objc)
11    #[unsafe(super(CMLogItem, NSObject))]
12    #[derive(Debug, PartialEq, Eq, Hash)]
13    #[cfg(feature = "CMLogItem")]
14    pub struct CMAmbientPressureData;
15);
16
17#[cfg(feature = "CMLogItem")]
18extern_conformance!(
19    unsafe impl NSCoding for CMAmbientPressureData {}
20);
21
22#[cfg(feature = "CMLogItem")]
23extern_conformance!(
24    unsafe impl NSCopying for CMAmbientPressureData {}
25);
26
27#[cfg(feature = "CMLogItem")]
28unsafe impl CopyingHelper for CMAmbientPressureData {
29    type Result = Self;
30}
31
32#[cfg(feature = "CMLogItem")]
33extern_conformance!(
34    unsafe impl NSObjectProtocol for CMAmbientPressureData {}
35);
36
37#[cfg(feature = "CMLogItem")]
38extern_conformance!(
39    unsafe impl NSSecureCoding for CMAmbientPressureData {}
40);
41
42#[cfg(feature = "CMLogItem")]
43impl CMAmbientPressureData {
44    extern_methods!(
45        /// Discussion:
46        /// The pressure as measured by the pressure sensor.
47        /// Pressure is in kPa (kilopascals).
48        #[unsafe(method(pressure))]
49        #[unsafe(method_family = none)]
50        pub unsafe fn pressure(&self) -> Retained<NSMeasurement<NSUnitPressure>>;
51
52        /// Discussion:
53        /// The temperature as measured by the pressure sensor.
54        /// Temperature is in C (degrees centrigrade).
55        #[unsafe(method(temperature))]
56        #[unsafe(method_family = none)]
57        pub unsafe fn temperature(&self) -> Retained<NSMeasurement<NSUnitTemperature>>;
58    );
59}
60
61/// Methods declared on superclass `NSObject`.
62#[cfg(feature = "CMLogItem")]
63impl CMAmbientPressureData {
64    extern_methods!(
65        #[unsafe(method(init))]
66        #[unsafe(method_family = init)]
67        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
68
69        #[unsafe(method(new))]
70        #[unsafe(method_family = new)]
71        pub unsafe fn new() -> Retained<Self>;
72    );
73}