objc2_metal/generated/
MTLFunctionHandle.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::*;
5use objc2_foundation::*;
6
7use crate::*;
8
9extern_protocol!(
10    /// [Apple's documentation](https://developer.apple.com/documentation/metal/mtlfunctionhandle?language=objc)
11    pub unsafe trait MTLFunctionHandle: NSObjectProtocol + Send + Sync {
12        #[cfg(feature = "MTLLibrary")]
13        #[unsafe(method(functionType))]
14        #[unsafe(method_family = none)]
15        fn functionType(&self) -> MTLFunctionType;
16
17        #[unsafe(method(name))]
18        #[unsafe(method_family = none)]
19        fn name(&self) -> Retained<NSString>;
20
21        #[cfg(feature = "MTLDevice")]
22        #[unsafe(method(device))]
23        #[unsafe(method_family = none)]
24        fn device(&self) -> Retained<ProtocolObject<dyn MTLDevice>>;
25
26        #[cfg(feature = "MTLTypes")]
27        /// Handle of the GPU resource suitable for storing in an Intersection Function Buffer.
28        ///
29        /// The handle must have been created from an intersection function annotated with the `intersection_function_buffer` tag.
30        #[unsafe(method(gpuResourceID))]
31        #[unsafe(method_family = none)]
32        fn gpuResourceID(&self) -> MTLResourceID;
33    }
34);