objc2_foundation/generated/
NSProtocolChecker.rs1use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5
6use crate::*;
7
8extern_class!(
9 #[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 fn protocol(&self) -> Retained<AnyProtocol>;
27
28 #[unsafe(method(target))]
29 #[unsafe(method_family = none)]
30 pub fn target(&self) -> Option<Retained<NSObject>>;
31 );
32}
33
34#[cfg(feature = "NSProxy")]
36impl NSProtocolChecker {
37 extern_methods!(
38 #[unsafe(method(protocolCheckerWithTarget:protocol:))]
43 #[unsafe(method_family = none)]
44 pub unsafe fn protocolCheckerWithTarget_protocol(
45 an_object: &NSObject,
46 a_protocol: &AnyProtocol,
47 ) -> Retained<Self>;
48
49 #[unsafe(method(initWithTarget:protocol:))]
54 #[unsafe(method_family = init)]
55 pub unsafe fn initWithTarget_protocol(
56 this: Allocated<Self>,
57 an_object: &NSObject,
58 a_protocol: &AnyProtocol,
59 ) -> Retained<Self>;
60 );
61}