icrate 0.1.2

Bindings to Apple's frameworks
Documentation
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use crate::common::*;
use crate::CoreData::*;
use crate::Foundation::*;

ns_enum!(
    #[underlying(NSInteger)]
    pub enum NSPersistentHistoryChangeType {
        NSPersistentHistoryChangeTypeInsert = 0,
        NSPersistentHistoryChangeTypeUpdate = 1,
        NSPersistentHistoryChangeTypeDelete = 2,
    }
);

extern_class!(
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[cfg(feature = "CoreData_NSPersistentHistoryChange")]
    pub struct NSPersistentHistoryChange;

    #[cfg(feature = "CoreData_NSPersistentHistoryChange")]
    unsafe impl ClassType for NSPersistentHistoryChange {
        type Super = NSObject;
        type Mutability = InteriorMutable;
    }
);

#[cfg(feature = "CoreData_NSPersistentHistoryChange")]
unsafe impl NSCopying for NSPersistentHistoryChange {}

#[cfg(feature = "CoreData_NSPersistentHistoryChange")]
unsafe impl NSObjectProtocol for NSPersistentHistoryChange {}

extern_methods!(
    #[cfg(feature = "CoreData_NSPersistentHistoryChange")]
    unsafe impl NSPersistentHistoryChange {
        #[cfg(all(
            feature = "CoreData_NSEntityDescription",
            feature = "CoreData_NSManagedObjectContext"
        ))]
        #[method_id(@__retain_semantics Other entityDescriptionWithContext:)]
        pub unsafe fn entityDescriptionWithContext(
            context: &NSManagedObjectContext,
        ) -> Option<Id<NSEntityDescription>>;

        #[cfg(feature = "CoreData_NSEntityDescription")]
        #[method_id(@__retain_semantics Other entityDescription)]
        pub unsafe fn entityDescription() -> Option<Id<NSEntityDescription>>;

        #[cfg(feature = "CoreData_NSFetchRequest")]
        #[method_id(@__retain_semantics Other fetchRequest)]
        pub unsafe fn fetchRequest() -> Option<Id<NSFetchRequest>>;

        #[method(changeID)]
        pub unsafe fn changeID(&self) -> i64;

        #[cfg(feature = "CoreData_NSManagedObjectID")]
        #[method_id(@__retain_semantics Other changedObjectID)]
        pub unsafe fn changedObjectID(&self) -> Id<NSManagedObjectID>;

        #[method(changeType)]
        pub unsafe fn changeType(&self) -> NSPersistentHistoryChangeType;

        #[cfg(feature = "Foundation_NSDictionary")]
        #[method_id(@__retain_semantics Other tombstone)]
        pub unsafe fn tombstone(&self) -> Option<Id<NSDictionary>>;

        #[cfg(feature = "CoreData_NSPersistentHistoryTransaction")]
        #[method_id(@__retain_semantics Other transaction)]
        pub unsafe fn transaction(&self) -> Option<Id<NSPersistentHistoryTransaction>>;

        #[cfg(all(
            feature = "CoreData_NSPropertyDescription",
            feature = "Foundation_NSSet"
        ))]
        #[method_id(@__retain_semantics Other updatedProperties)]
        pub unsafe fn updatedProperties(&self) -> Option<Id<NSSet<NSPropertyDescription>>>;
    }
);

extern_methods!(
    /// Methods declared on superclass `NSObject`
    #[cfg(feature = "CoreData_NSPersistentHistoryChange")]
    unsafe impl NSPersistentHistoryChange {
        #[method_id(@__retain_semantics Init init)]
        pub unsafe fn init(this: Allocated<Self>) -> Id<Self>;

        #[method_id(@__retain_semantics New new)]
        pub unsafe fn new() -> Id<Self>;
    }
);