icrate/generated/CoreData/
NSRelationshipDescription.rs1use crate::common::*;
4use crate::CoreData::*;
5use crate::Foundation::*;
6
7ns_enum!(
8 #[underlying(NSUInteger)]
9 pub enum NSDeleteRule {
10 NSNoActionDeleteRule = 0,
11 NSNullifyDeleteRule = 1,
12 NSCascadeDeleteRule = 2,
13 NSDenyDeleteRule = 3,
14 }
15);
16
17extern_class!(
18 #[derive(Debug, PartialEq, Eq, Hash)]
19 #[cfg(feature = "CoreData_NSRelationshipDescription")]
20 pub struct NSRelationshipDescription;
21
22 #[cfg(feature = "CoreData_NSRelationshipDescription")]
23 unsafe impl ClassType for NSRelationshipDescription {
24 #[inherits(NSObject)]
25 type Super = NSPropertyDescription;
26 type Mutability = InteriorMutable;
27 }
28);
29
30#[cfg(feature = "CoreData_NSRelationshipDescription")]
31unsafe impl NSCoding for NSRelationshipDescription {}
32
33#[cfg(feature = "CoreData_NSRelationshipDescription")]
34unsafe impl NSCopying for NSRelationshipDescription {}
35
36#[cfg(feature = "CoreData_NSRelationshipDescription")]
37unsafe impl NSObjectProtocol for NSRelationshipDescription {}
38
39extern_methods!(
40 #[cfg(feature = "CoreData_NSRelationshipDescription")]
41 unsafe impl NSRelationshipDescription {
42 #[cfg(feature = "CoreData_NSEntityDescription")]
43 #[method_id(@__retain_semantics Other destinationEntity)]
44 pub unsafe fn destinationEntity(&self) -> Option<Id<NSEntityDescription>>;
45
46 #[cfg(feature = "CoreData_NSEntityDescription")]
47 #[method(setDestinationEntity:)]
48 pub unsafe fn setDestinationEntity(&self, destination_entity: Option<&NSEntityDescription>);
49
50 #[method_id(@__retain_semantics Other inverseRelationship)]
51 pub unsafe fn inverseRelationship(&self) -> Option<Id<NSRelationshipDescription>>;
52
53 #[method(setInverseRelationship:)]
54 pub unsafe fn setInverseRelationship(
55 &self,
56 inverse_relationship: Option<&NSRelationshipDescription>,
57 );
58
59 #[method(maxCount)]
60 pub unsafe fn maxCount(&self) -> NSUInteger;
61
62 #[method(setMaxCount:)]
63 pub unsafe fn setMaxCount(&self, max_count: NSUInteger);
64
65 #[method(minCount)]
66 pub unsafe fn minCount(&self) -> NSUInteger;
67
68 #[method(setMinCount:)]
69 pub unsafe fn setMinCount(&self, min_count: NSUInteger);
70
71 #[method(deleteRule)]
72 pub unsafe fn deleteRule(&self) -> NSDeleteRule;
73
74 #[method(setDeleteRule:)]
75 pub unsafe fn setDeleteRule(&self, delete_rule: NSDeleteRule);
76
77 #[method(isToMany)]
78 pub unsafe fn isToMany(&self) -> bool;
79
80 #[cfg(feature = "Foundation_NSData")]
81 #[method_id(@__retain_semantics Other versionHash)]
82 pub unsafe fn versionHash(&self) -> Id<NSData>;
83
84 #[method(isOrdered)]
85 pub unsafe fn isOrdered(&self) -> bool;
86
87 #[method(setOrdered:)]
88 pub unsafe fn setOrdered(&self, ordered: bool);
89 }
90);
91
92extern_methods!(
93 #[cfg(feature = "CoreData_NSRelationshipDescription")]
95 unsafe impl NSRelationshipDescription {
96 #[method_id(@__retain_semantics Init init)]
97 pub unsafe fn init(this: Allocated<Self>) -> Id<Self>;
98
99 #[method_id(@__retain_semantics New new)]
100 pub unsafe fn new() -> Id<Self>;
101 }
102);