objc2-core-data 0.3.2

Bindings to the CoreData 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/coredata/nsmanagedobjectid?language=objc)
    #[unsafe(super(NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct NSManagedObjectID;
);

unsafe impl Send for NSManagedObjectID {}

unsafe impl Sync for NSManagedObjectID {}

extern_conformance!(
    unsafe impl NSCopying for NSManagedObjectID {}
);

unsafe impl CopyingHelper for NSManagedObjectID {
    type Result = Self;
}

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

impl NSManagedObjectID {
    extern_methods!(
        #[cfg(feature = "NSEntityDescription")]
        #[unsafe(method(entity))]
        #[unsafe(method_family = none)]
        pub unsafe fn entity(&self) -> Retained<NSEntityDescription>;

        #[cfg(feature = "NSPersistentStore")]
        #[unsafe(method(persistentStore))]
        #[unsafe(method_family = none)]
        pub unsafe fn persistentStore(&self) -> Option<Retained<NSPersistentStore>>;

        #[unsafe(method(isTemporaryID))]
        #[unsafe(method_family = none)]
        pub unsafe fn isTemporaryID(&self) -> bool;

        #[unsafe(method(URIRepresentation))]
        #[unsafe(method_family = none)]
        pub unsafe fn URIRepresentation(&self) -> Retained<NSURL>;
    );
}

/// Methods declared on superclass `NSObject`.
impl NSManagedObjectID {
    extern_methods!(
        #[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>;
    );
}