objc2_foundation/generated/
NSProtocolChecker.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::*;
5
6use crate::*;
7
8extern_class!(
9    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsprotocolchecker?language=objc)
10    #[unsafe(super(NSProxy))]
11    #[derive(Debug, PartialEq, Eq, Hash)]
12    #[cfg(feature = "NSProxy")]
13    pub struct NSProtocolChecker;
14);
15
16#[cfg(feature = "NSProxy")]
17unsafe impl NSObjectProtocol for NSProtocolChecker {}
18
19#[cfg(feature = "NSProxy")]
20impl NSProtocolChecker {
21    extern_methods!(
22        #[unsafe(method(protocol))]
23        #[unsafe(method_family = none)]
24        pub unsafe fn protocol(&self) -> Retained<AnyProtocol>;
25
26        #[unsafe(method(target))]
27        #[unsafe(method_family = none)]
28        pub unsafe fn target(&self) -> Option<Retained<NSObject>>;
29    );
30}
31
32/// NSProtocolCheckerCreation.
33#[cfg(feature = "NSProxy")]
34impl NSProtocolChecker {
35    extern_methods!(
36        #[unsafe(method(protocolCheckerWithTarget:protocol:))]
37        #[unsafe(method_family = none)]
38        pub unsafe fn protocolCheckerWithTarget_protocol(
39            an_object: &NSObject,
40            a_protocol: &AnyProtocol,
41        ) -> Retained<Self>;
42
43        #[unsafe(method(initWithTarget:protocol:))]
44        #[unsafe(method_family = init)]
45        pub unsafe fn initWithTarget_protocol(
46            this: Allocated<Self>,
47            an_object: &NSObject,
48            a_protocol: &AnyProtocol,
49        ) -> Retained<Self>;
50    );
51}