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")]
17extern_conformance!(
18    unsafe impl NSObjectProtocol for NSProtocolChecker {}
19);
20
21#[cfg(feature = "NSProxy")]
22impl NSProtocolChecker {
23    extern_methods!(
24        #[unsafe(method(protocol))]
25        #[unsafe(method_family = none)]
26        pub unsafe fn protocol(&self) -> Retained<AnyProtocol>;
27
28        #[unsafe(method(target))]
29        #[unsafe(method_family = none)]
30        pub unsafe fn target(&self) -> Option<Retained<NSObject>>;
31    );
32}
33
34/// NSProtocolCheckerCreation.
35#[cfg(feature = "NSProxy")]
36impl NSProtocolChecker {
37    extern_methods!(
38        #[unsafe(method(protocolCheckerWithTarget:protocol:))]
39        #[unsafe(method_family = none)]
40        pub unsafe fn protocolCheckerWithTarget_protocol(
41            an_object: &NSObject,
42            a_protocol: &AnyProtocol,
43        ) -> Retained<Self>;
44
45        #[unsafe(method(initWithTarget:protocol:))]
46        #[unsafe(method_family = init)]
47        pub unsafe fn initWithTarget_protocol(
48            this: Allocated<Self>,
49            an_object: &NSObject,
50            a_protocol: &AnyProtocol,
51        ) -> Retained<Self>;
52    );
53}