objc2_core_data/generated/
NSFetchedPropertyDescription.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11    /// [Apple's documentation](https://developer.apple.com/documentation/coredata/nsfetchedpropertydescription?language=objc)
12    #[unsafe(super(NSPropertyDescription, NSObject))]
13    #[derive(Debug, PartialEq, Eq, Hash)]
14    #[cfg(feature = "NSPropertyDescription")]
15    pub struct NSFetchedPropertyDescription;
16);
17
18#[cfg(feature = "NSPropertyDescription")]
19extern_conformance!(
20    unsafe impl NSCoding for NSFetchedPropertyDescription {}
21);
22
23#[cfg(feature = "NSPropertyDescription")]
24extern_conformance!(
25    unsafe impl NSCopying for NSFetchedPropertyDescription {}
26);
27
28#[cfg(feature = "NSPropertyDescription")]
29unsafe impl CopyingHelper for NSFetchedPropertyDescription {
30    type Result = Self;
31}
32
33#[cfg(feature = "NSPropertyDescription")]
34extern_conformance!(
35    unsafe impl NSObjectProtocol for NSFetchedPropertyDescription {}
36);
37
38#[cfg(feature = "NSPropertyDescription")]
39impl NSFetchedPropertyDescription {
40    extern_methods!(
41        #[cfg(all(feature = "NSFetchRequest", feature = "NSPersistentStoreRequest"))]
42        #[unsafe(method(fetchRequest))]
43        #[unsafe(method_family = none)]
44        pub unsafe fn fetchRequest(&self) -> Option<Retained<NSFetchRequest>>;
45
46        #[cfg(all(feature = "NSFetchRequest", feature = "NSPersistentStoreRequest"))]
47        /// Setter for [`fetchRequest`][Self::fetchRequest].
48        ///
49        /// # Safety
50        ///
51        /// `fetch_request` generic should be bound by `NSFetchRequestResult`.
52        #[unsafe(method(setFetchRequest:))]
53        #[unsafe(method_family = none)]
54        pub unsafe fn setFetchRequest(&self, fetch_request: Option<&NSFetchRequest>);
55    );
56}
57
58/// Methods declared on superclass `NSObject`.
59#[cfg(feature = "NSPropertyDescription")]
60impl NSFetchedPropertyDescription {
61    extern_methods!(
62        #[unsafe(method(init))]
63        #[unsafe(method_family = init)]
64        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
65
66        #[unsafe(method(new))]
67        #[unsafe(method_family = new)]
68        pub unsafe fn new() -> Retained<Self>;
69    );
70}