objc2_metal/generated/
MTL4LibraryDescriptor.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11 #[unsafe(super(NSObject))]
15 #[derive(Debug, PartialEq, Eq, Hash)]
16 pub struct MTL4LibraryDescriptor;
17);
18
19extern_conformance!(
20 unsafe impl NSCopying for MTL4LibraryDescriptor {}
21);
22
23unsafe impl CopyingHelper for MTL4LibraryDescriptor {
24 type Result = Self;
25}
26
27extern_conformance!(
28 unsafe impl NSObjectProtocol for MTL4LibraryDescriptor {}
29);
30
31impl MTL4LibraryDescriptor {
32 extern_methods!(
33 #[unsafe(method(source))]
36 #[unsafe(method_family = none)]
37 pub fn source(&self) -> Option<Retained<NSString>>;
38
39 #[unsafe(method(setSource:))]
43 #[unsafe(method_family = none)]
44 pub fn setSource(&self, source: Option<&NSString>);
45
46 #[cfg(feature = "MTLLibrary")]
47 #[unsafe(method(options))]
49 #[unsafe(method_family = none)]
50 pub fn options(&self) -> Option<Retained<MTLCompileOptions>>;
51
52 #[cfg(feature = "MTLLibrary")]
53 #[unsafe(method(setOptions:))]
57 #[unsafe(method_family = none)]
58 pub fn setOptions(&self, options: Option<&MTLCompileOptions>);
59
60 #[unsafe(method(name))]
62 #[unsafe(method_family = none)]
63 pub fn name(&self) -> Option<Retained<NSString>>;
64
65 #[unsafe(method(setName:))]
69 #[unsafe(method_family = none)]
70 pub fn setName(&self, name: Option<&NSString>);
71 );
72}
73
74impl MTL4LibraryDescriptor {
76 extern_methods!(
77 #[unsafe(method(init))]
78 #[unsafe(method_family = init)]
79 pub fn init(this: Allocated<Self>) -> Retained<Self>;
80
81 #[unsafe(method(new))]
82 #[unsafe(method_family = new)]
83 pub fn new() -> Retained<Self>;
84 );
85}
86
87impl DefaultRetained for MTL4LibraryDescriptor {
88 #[inline]
89 fn default_retained() -> Retained<Self> {
90 Self::new()
91 }
92}