objc2_core_data/generated/
NSFetchRequestExpression.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5use objc2_foundation::*;
6
7use crate::*;
8
9/// [Apple's documentation](https://developer.apple.com/documentation/coredata/nsfetchrequestexpressiontype?language=objc)
10pub static NSFetchRequestExpressionType: NSExpressionType = NSExpressionType(50);
11
12extern_class!(
13    /// [Apple's documentation](https://developer.apple.com/documentation/coredata/nsfetchrequestexpression?language=objc)
14    #[unsafe(super(NSExpression, NSObject))]
15    #[derive(Debug, PartialEq, Eq, Hash)]
16    pub struct NSFetchRequestExpression;
17);
18
19extern_conformance!(
20    unsafe impl NSCoding for NSFetchRequestExpression {}
21);
22
23extern_conformance!(
24    unsafe impl NSCopying for NSFetchRequestExpression {}
25);
26
27unsafe impl CopyingHelper for NSFetchRequestExpression {
28    type Result = Self;
29}
30
31extern_conformance!(
32    unsafe impl NSObjectProtocol for NSFetchRequestExpression {}
33);
34
35extern_conformance!(
36    unsafe impl NSSecureCoding for NSFetchRequestExpression {}
37);
38
39impl NSFetchRequestExpression {
40    extern_methods!(
41        #[unsafe(method(expressionForFetch:context:countOnly:))]
42        #[unsafe(method_family = none)]
43        pub unsafe fn expressionForFetch_context_countOnly(
44            fetch: &NSExpression,
45            context: &NSExpression,
46            count_flag: bool,
47        ) -> Retained<NSExpression>;
48
49        #[unsafe(method(requestExpression))]
50        #[unsafe(method_family = none)]
51        pub unsafe fn requestExpression(&self) -> Retained<NSExpression>;
52
53        #[unsafe(method(contextExpression))]
54        #[unsafe(method_family = none)]
55        pub unsafe fn contextExpression(&self) -> Retained<NSExpression>;
56
57        #[unsafe(method(isCountOnlyRequest))]
58        #[unsafe(method_family = none)]
59        pub unsafe fn isCountOnlyRequest(&self) -> bool;
60    );
61}
62
63/// Methods declared on superclass `NSExpression`.
64impl NSFetchRequestExpression {
65    extern_methods!(
66        #[unsafe(method(initWithExpressionType:))]
67        #[unsafe(method_family = init)]
68        pub unsafe fn initWithExpressionType(
69            this: Allocated<Self>,
70            r#type: NSExpressionType,
71        ) -> Retained<Self>;
72
73        #[unsafe(method(initWithCoder:))]
74        #[unsafe(method_family = init)]
75        pub unsafe fn initWithCoder(
76            this: Allocated<Self>,
77            coder: &NSCoder,
78        ) -> Option<Retained<Self>>;
79    );
80}
81
82/// Methods declared on superclass `NSObject`.
83impl NSFetchRequestExpression {
84    extern_methods!(
85        #[unsafe(method(init))]
86        #[unsafe(method_family = init)]
87        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
88
89        #[unsafe(method(new))]
90        #[unsafe(method_family = new)]
91        pub unsafe fn new() -> Retained<Self>;
92    );
93}