objc2-photos 0.3.2

Bindings to the Photos/PhotoKit 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!(
    /// [Apple's documentation](https://developer.apple.com/documentation/photos/phpersistentchange?language=objc)
    #[unsafe(super(NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct PHPersistentChange;
);

unsafe impl Send for PHPersistentChange {}

unsafe impl Sync for PHPersistentChange {}

extern_conformance!(
    unsafe impl NSObjectProtocol for PHPersistentChange {}
);

impl PHPersistentChange {
    extern_methods!(
        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub unsafe fn new() -> Retained<Self>;

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

        #[cfg(feature = "PHPersistentChangeToken")]
        /// This property is not atomic.
        ///
        /// # Safety
        ///
        /// This might not be thread-safe.
        #[unsafe(method(changeToken))]
        #[unsafe(method_family = none)]
        pub unsafe fn changeToken(&self) -> Retained<PHPersistentChangeToken>;

        #[cfg(all(feature = "PHPersistentObjectChangeDetails", feature = "PhotosTypes"))]
        #[unsafe(method(changeDetailsForObjectType:error:_))]
        #[unsafe(method_family = none)]
        pub unsafe fn changeDetailsForObjectType_error(
            &self,
            object_type: PHObjectType,
        ) -> Result<Retained<PHPersistentObjectChangeDetails>, Retained<NSError>>;
    );
}