objc2_metal/generated/
MTLFunctionLog.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use objc2::__framework_prelude::*;
4use objc2_foundation::*;
5
6use crate::*;
7
8/// [Apple's documentation](https://developer.apple.com/documentation/metal/mtlfunctionlogtype?language=objc)
9// NS_ENUM
10#[repr(transparent)]
11#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
12pub struct MTLFunctionLogType(pub NSUInteger);
13impl MTLFunctionLogType {
14    #[doc(alias = "MTLFunctionLogTypeValidation")]
15    pub const Validation: Self = Self(0);
16}
17
18unsafe impl Encode for MTLFunctionLogType {
19    const ENCODING: Encoding = NSUInteger::ENCODING;
20}
21
22unsafe impl RefEncode for MTLFunctionLogType {
23    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
24}
25
26extern_protocol!(
27    /// [Apple's documentation](https://developer.apple.com/documentation/metal/mtllogcontainer?language=objc)
28    pub unsafe trait MTLLogContainer: NSObjectProtocol + NSFastEnumeration {}
29);
30
31extern_protocol!(
32    /// [Apple's documentation](https://developer.apple.com/documentation/metal/mtlfunctionlogdebuglocation?language=objc)
33    pub unsafe trait MTLFunctionLogDebugLocation: NSObjectProtocol {
34        #[unsafe(method(functionName))]
35        #[unsafe(method_family = none)]
36        fn functionName(&self) -> Option<Retained<NSString>>;
37
38        #[unsafe(method(URL))]
39        #[unsafe(method_family = none)]
40        fn URL(&self) -> Option<Retained<NSURL>>;
41
42        #[unsafe(method(line))]
43        #[unsafe(method_family = none)]
44        fn line(&self) -> NSUInteger;
45
46        #[unsafe(method(column))]
47        #[unsafe(method_family = none)]
48        fn column(&self) -> NSUInteger;
49    }
50);
51
52extern_protocol!(
53    /// [Apple's documentation](https://developer.apple.com/documentation/metal/mtlfunctionlog?language=objc)
54    pub unsafe trait MTLFunctionLog: NSObjectProtocol {
55        #[unsafe(method(type))]
56        #[unsafe(method_family = none)]
57        fn r#type(&self) -> MTLFunctionLogType;
58
59        #[unsafe(method(encoderLabel))]
60        #[unsafe(method_family = none)]
61        fn encoderLabel(&self) -> Option<Retained<NSString>>;
62
63        #[cfg(feature = "MTLLibrary")]
64        #[unsafe(method(function))]
65        #[unsafe(method_family = none)]
66        fn function(&self) -> Option<Retained<ProtocolObject<dyn MTLFunction>>>;
67
68        #[unsafe(method(debugLocation))]
69        #[unsafe(method_family = none)]
70        fn debugLocation(
71            &self,
72        ) -> Option<Retained<ProtocolObject<dyn MTLFunctionLogDebugLocation>>>;
73    }
74);