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

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

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

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

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

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

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

        #[cfg(feature = "NSAttributeDescription")]
        #[unsafe(method(expressionResultType))]
        #[unsafe(method_family = none)]
        pub unsafe fn expressionResultType(&self) -> NSAttributeType;

        #[cfg(feature = "NSAttributeDescription")]
        /// Setter for [`expressionResultType`][Self::expressionResultType].
        #[unsafe(method(setExpressionResultType:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setExpressionResultType(&self, expression_result_type: NSAttributeType);
    );
}

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