objc2-health-kit 0.3.2

Bindings to the HealthKit framework
Documentation
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;

use crate::*;

extern_class!(
    /// An abstract HKSample subclass representing the results of a scored assessment.
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/healthkit/hkscoredassessment?language=objc)
    #[unsafe(super(HKSample, HKObject, NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[cfg(all(feature = "HKObject", feature = "HKSample"))]
    pub struct HKScoredAssessment;
);

#[cfg(all(feature = "HKObject", feature = "HKSample"))]
unsafe impl Send for HKScoredAssessment {}

#[cfg(all(feature = "HKObject", feature = "HKSample"))]
unsafe impl Sync for HKScoredAssessment {}

#[cfg(all(feature = "HKObject", feature = "HKSample"))]
extern_conformance!(
    unsafe impl NSCoding for HKScoredAssessment {}
);

#[cfg(all(feature = "HKObject", feature = "HKSample"))]
extern_conformance!(
    unsafe impl NSCopying for HKScoredAssessment {}
);

#[cfg(all(feature = "HKObject", feature = "HKSample"))]
unsafe impl CopyingHelper for HKScoredAssessment {
    type Result = Self;
}

#[cfg(all(feature = "HKObject", feature = "HKSample"))]
extern_conformance!(
    unsafe impl NSObjectProtocol for HKScoredAssessment {}
);

#[cfg(all(feature = "HKObject", feature = "HKSample"))]
extern_conformance!(
    unsafe impl NSSecureCoding for HKScoredAssessment {}
);

#[cfg(all(feature = "HKObject", feature = "HKSample"))]
impl HKScoredAssessment {
    extern_methods!(
        /// The score determined by the answers on an assessment
        ///
        /// This property is not atomic.
        ///
        /// # Safety
        ///
        /// This might not be thread-safe.
        #[unsafe(method(score))]
        #[unsafe(method_family = none)]
        pub unsafe fn score(&self) -> NSInteger;

        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub unsafe fn new() -> Retained<Self>;
    );
}