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/nsderivedattributedescription?language=objc)
    #[unsafe(super(NSAttributeDescription, NSPropertyDescription, NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[cfg(all(feature = "NSAttributeDescription", feature = "NSPropertyDescription"))]
    pub struct NSDerivedAttributeDescription;
);

#[cfg(all(feature = "NSAttributeDescription", feature = "NSPropertyDescription"))]
extern_conformance!(
    unsafe impl NSCoding for NSDerivedAttributeDescription {}
);

#[cfg(all(feature = "NSAttributeDescription", feature = "NSPropertyDescription"))]
extern_conformance!(
    unsafe impl NSCopying for NSDerivedAttributeDescription {}
);

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

#[cfg(all(feature = "NSAttributeDescription", feature = "NSPropertyDescription"))]
extern_conformance!(
    unsafe impl NSObjectProtocol for NSDerivedAttributeDescription {}
);

#[cfg(all(feature = "NSAttributeDescription", feature = "NSPropertyDescription"))]
impl NSDerivedAttributeDescription {
    extern_methods!(
        #[unsafe(method(derivationExpression))]
        #[unsafe(method_family = none)]
        pub unsafe fn derivationExpression(&self) -> Option<Retained<NSExpression>>;

        /// Setter for [`derivationExpression`][Self::derivationExpression].
        #[unsafe(method(setDerivationExpression:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setDerivationExpression(&self, derivation_expression: Option<&NSExpression>);
    );
}

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