objc2_metal/generated/
MTL4StitchedFunctionDescriptor.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11 #[unsafe(super(MTL4FunctionDescriptor, NSObject))]
15 #[derive(Debug, PartialEq, Eq, Hash)]
16 #[cfg(feature = "MTL4FunctionDescriptor")]
17 pub struct MTL4StitchedFunctionDescriptor;
18);
19
20#[cfg(feature = "MTL4FunctionDescriptor")]
21extern_conformance!(
22 unsafe impl NSCopying for MTL4StitchedFunctionDescriptor {}
23);
24
25#[cfg(feature = "MTL4FunctionDescriptor")]
26unsafe impl CopyingHelper for MTL4StitchedFunctionDescriptor {
27 type Result = Self;
28}
29
30#[cfg(feature = "MTL4FunctionDescriptor")]
31extern_conformance!(
32 unsafe impl NSObjectProtocol for MTL4StitchedFunctionDescriptor {}
33);
34
35#[cfg(feature = "MTL4FunctionDescriptor")]
36impl MTL4StitchedFunctionDescriptor {
37 extern_methods!(
38 #[cfg(feature = "MTLFunctionStitching")]
39 #[unsafe(method(functionGraph))]
41 #[unsafe(method_family = none)]
42 pub fn functionGraph(&self) -> Option<Retained<MTLFunctionStitchingGraph>>;
43
44 #[cfg(feature = "MTLFunctionStitching")]
45 #[unsafe(method(setFunctionGraph:))]
49 #[unsafe(method_family = none)]
50 pub fn setFunctionGraph(&self, function_graph: Option<&MTLFunctionStitchingGraph>);
51
52 #[unsafe(method(functionDescriptors))]
54 #[unsafe(method_family = none)]
55 pub fn functionDescriptors(&self) -> Option<Retained<NSArray<MTL4FunctionDescriptor>>>;
56
57 #[unsafe(method(setFunctionDescriptors:))]
61 #[unsafe(method_family = none)]
62 pub fn setFunctionDescriptors(
63 &self,
64 function_descriptors: Option<&NSArray<MTL4FunctionDescriptor>>,
65 );
66 );
67}
68
69#[cfg(feature = "MTL4FunctionDescriptor")]
71impl MTL4StitchedFunctionDescriptor {
72 extern_methods!(
73 #[unsafe(method(init))]
74 #[unsafe(method_family = init)]
75 pub fn init(this: Allocated<Self>) -> Retained<Self>;
76
77 #[unsafe(method(new))]
78 #[unsafe(method_family = new)]
79 pub fn new() -> Retained<Self>;
80 );
81}
82
83#[cfg(feature = "MTL4FunctionDescriptor")]
84impl DefaultRetained for MTL4StitchedFunctionDescriptor {
85 #[inline]
86 fn default_retained() -> Retained<Self> {
87 Self::new()
88 }
89}