objc2_core_data/generated/
NSFetchIndexDescription.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11 #[unsafe(super(NSObject))]
13 #[derive(Debug, PartialEq, Eq, Hash)]
14 pub struct NSFetchIndexDescription;
15);
16
17extern_conformance!(
18 unsafe impl NSCoding for NSFetchIndexDescription {}
19);
20
21extern_conformance!(
22 unsafe impl NSCopying for NSFetchIndexDescription {}
23);
24
25unsafe impl CopyingHelper for NSFetchIndexDescription {
26 type Result = Self;
27}
28
29extern_conformance!(
30 unsafe impl NSObjectProtocol for NSFetchIndexDescription {}
31);
32
33impl NSFetchIndexDescription {
34 extern_methods!(
35 #[cfg(feature = "NSFetchIndexElementDescription")]
36 #[unsafe(method(initWithName:elements:))]
37 #[unsafe(method_family = init)]
38 pub unsafe fn initWithName_elements(
39 this: Allocated<Self>,
40 name: &NSString,
41 elements: Option<&NSArray<NSFetchIndexElementDescription>>,
42 ) -> Retained<Self>;
43
44 #[unsafe(method(name))]
45 #[unsafe(method_family = none)]
46 pub unsafe fn name(&self) -> Retained<NSString>;
47
48 #[unsafe(method(setName:))]
52 #[unsafe(method_family = none)]
53 pub unsafe fn setName(&self, name: &NSString);
54
55 #[cfg(feature = "NSFetchIndexElementDescription")]
56 #[unsafe(method(elements))]
57 #[unsafe(method_family = none)]
58 pub unsafe fn elements(&self) -> Retained<NSArray<NSFetchIndexElementDescription>>;
59
60 #[cfg(feature = "NSFetchIndexElementDescription")]
61 #[unsafe(method(setElements:))]
65 #[unsafe(method_family = none)]
66 pub unsafe fn setElements(&self, elements: &NSArray<NSFetchIndexElementDescription>);
67
68 #[cfg(feature = "NSEntityDescription")]
69 #[unsafe(method(entity))]
73 #[unsafe(method_family = none)]
74 pub unsafe fn entity(&self) -> Option<Retained<NSEntityDescription>>;
75
76 #[unsafe(method(partialIndexPredicate))]
77 #[unsafe(method_family = none)]
78 pub unsafe fn partialIndexPredicate(&self) -> Option<Retained<NSPredicate>>;
79
80 #[unsafe(method(setPartialIndexPredicate:))]
84 #[unsafe(method_family = none)]
85 pub unsafe fn setPartialIndexPredicate(
86 &self,
87 partial_index_predicate: Option<&NSPredicate>,
88 );
89 );
90}
91
92impl NSFetchIndexDescription {
94 extern_methods!(
95 #[unsafe(method(init))]
96 #[unsafe(method_family = init)]
97 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
98
99 #[unsafe(method(new))]
100 #[unsafe(method_family = new)]
101 pub unsafe fn new() -> Retained<Self>;
102 );
103}