icrate 0.1.2

Bindings to Apple's frameworks
Documentation
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use crate::common::*;
use crate::CoreData::*;
use crate::Foundation::*;

extern_static!(NSFetchRequestExpressionType: NSExpressionType = 50);

extern_class!(
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[cfg(feature = "CoreData_NSFetchRequestExpression")]
    pub struct NSFetchRequestExpression;

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

#[cfg(feature = "CoreData_NSFetchRequestExpression")]
unsafe impl NSCoding for NSFetchRequestExpression {}

#[cfg(feature = "CoreData_NSFetchRequestExpression")]
unsafe impl NSCopying for NSFetchRequestExpression {}

#[cfg(feature = "CoreData_NSFetchRequestExpression")]
unsafe impl NSObjectProtocol for NSFetchRequestExpression {}

#[cfg(feature = "CoreData_NSFetchRequestExpression")]
unsafe impl NSSecureCoding for NSFetchRequestExpression {}

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

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

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

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

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

        #[cfg(feature = "Foundation_NSCoder")]
        #[method_id(@__retain_semantics Init initWithCoder:)]
        pub unsafe fn initWithCoder(this: Allocated<Self>, coder: &NSCoder) -> Option<Id<Self>>;
    }
);

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

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