objc2_contacts/generated/
CNFetchResult.rs1use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5use objc2_foundation::*;
6
7use crate::*;
8
9extern_class!(
10 #[unsafe(super(NSObject))]
12 #[derive(Debug, PartialEq, Eq, Hash)]
13 pub struct CNFetchResult<ValueType: ?Sized = AnyObject>;
14);
15
16impl<ValueType: ?Sized + Message> CNFetchResult<ValueType> {
17 #[inline]
23 pub unsafe fn cast_unchecked<NewValueType: ?Sized + Message>(
24 &self,
25 ) -> &CNFetchResult<NewValueType> {
26 unsafe { &*((self as *const Self).cast()) }
27 }
28}
29
30extern_conformance!(
31 unsafe impl<ValueType: ?Sized> NSObjectProtocol for CNFetchResult<ValueType> {}
32);
33
34impl<ValueType: Message> CNFetchResult<ValueType> {
35 extern_methods!(
36 #[unsafe(method(init))]
37 #[unsafe(method_family = init)]
38 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
39
40 #[unsafe(method(new))]
41 #[unsafe(method_family = new)]
42 pub unsafe fn new() -> Retained<Self>;
43
44 #[unsafe(method(value))]
45 #[unsafe(method_family = none)]
46 pub unsafe fn value(&self) -> Retained<ValueType>;
47
48 #[unsafe(method(currentHistoryToken))]
49 #[unsafe(method_family = none)]
50 pub unsafe fn currentHistoryToken(&self) -> Retained<NSData>;
51 );
52}