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::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;

use crate::*;

extern_class!(
    /// [Apple's documentation](https://developer.apple.com/documentation/coredata/nsfetchedpropertydescription?language=objc)
    #[unsafe(super(NSPropertyDescription, NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[cfg(feature = "NSPropertyDescription")]
    pub struct NSFetchedPropertyDescription;
);

#[cfg(feature = "NSPropertyDescription")]
extern_conformance!(
    unsafe impl NSCoding for NSFetchedPropertyDescription {}
);

#[cfg(feature = "NSPropertyDescription")]
extern_conformance!(
    unsafe impl NSCopying for NSFetchedPropertyDescription {}
);

#[cfg(feature = "NSPropertyDescription")]
unsafe impl CopyingHelper for NSFetchedPropertyDescription {
    type Result = Self;
}

#[cfg(feature = "NSPropertyDescription")]
extern_conformance!(
    unsafe impl NSObjectProtocol for NSFetchedPropertyDescription {}
);

#[cfg(feature = "NSPropertyDescription")]
impl NSFetchedPropertyDescription {
    extern_methods!(
        #[cfg(all(feature = "NSFetchRequest", feature = "NSPersistentStoreRequest"))]
        #[unsafe(method(fetchRequest))]
        #[unsafe(method_family = none)]
        pub unsafe fn fetchRequest(&self) -> Option<Retained<NSFetchRequest>>;

        #[cfg(all(feature = "NSFetchRequest", feature = "NSPersistentStoreRequest"))]
        /// Setter for [`fetchRequest`][Self::fetchRequest].
        ///
        /// # Safety
        ///
        /// `fetch_request` generic should be bound by `NSFetchRequestResult`.
        #[unsafe(method(setFetchRequest:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setFetchRequest(&self, fetch_request: Option<&NSFetchRequest>);
    );
}

/// Methods declared on superclass `NSObject`.
#[cfg(feature = "NSPropertyDescription")]
impl NSFetchedPropertyDescription {
    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>;
    );
}