objc2-core-data 0.2.2

Bindings to the CoreData framework
Documentation
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;

use crate::*;

pub static NSFetchRequestExpressionType: NSExpressionType = NSExpressionType(50);

extern_class!(
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct NSFetchRequestExpression;

    unsafe impl ClassType for NSFetchRequestExpression {
        #[inherits(NSObject)]
        type Super = NSExpression;
        type Mutability = InteriorMutable;
    }
);

unsafe impl NSCoding for NSFetchRequestExpression {}

unsafe impl NSCopying for NSFetchRequestExpression {}

unsafe impl NSObjectProtocol for NSFetchRequestExpression {}

unsafe impl NSSecureCoding for NSFetchRequestExpression {}

extern_methods!(
    unsafe impl NSFetchRequestExpression {
        #[method_id(@__retain_semantics Other expressionForFetch:context:countOnly:)]
        pub unsafe fn expressionForFetch_context_countOnly(
            fetch: &NSExpression,
            context: &NSExpression,
            count_flag: bool,
        ) -> Retained<NSExpression>;

        #[method_id(@__retain_semantics Other requestExpression)]
        pub unsafe fn requestExpression(&self) -> Retained<NSExpression>;

        #[method_id(@__retain_semantics Other contextExpression)]
        pub unsafe fn contextExpression(&self) -> Retained<NSExpression>;

        #[method(isCountOnlyRequest)]
        pub unsafe fn isCountOnlyRequest(&self) -> bool;
    }
);

extern_methods!(
    /// Methods declared on superclass `NSExpression`
    unsafe impl NSFetchRequestExpression {
        #[method_id(@__retain_semantics Init initWithExpressionType:)]
        pub unsafe fn initWithExpressionType(
            this: Allocated<Self>,
            r#type: NSExpressionType,
        ) -> Retained<Self>;

        #[method_id(@__retain_semantics Init initWithCoder:)]
        pub unsafe fn initWithCoder(
            this: Allocated<Self>,
            coder: &NSCoder,
        ) -> Option<Retained<Self>>;
    }
);

extern_methods!(
    /// Methods declared on superclass `NSObject`
    unsafe impl NSFetchRequestExpression {
        #[method_id(@__retain_semantics Init init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

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