Skip to main content

MTLVisibleFunctionTable

Trait MTLVisibleFunctionTable 

Source
pub unsafe trait MTLVisibleFunctionTable: MTLResource {
    // Provided methods
    fn gpuResourceID(&self) -> MTLResourceID
       where Self: Sized + Message { ... }
    unsafe fn setFunction_atIndex(
        &self,
        function: Option<&ProtocolObject<dyn MTLFunctionHandle>>,
        index: NSUInteger,
    )
       where Self: Sized + Message { ... }
    unsafe fn setFunctions_withRange(
        &self,
        functions: NonNull<*const ProtocolObject<dyn MTLFunctionHandle>>,
        range: NSRange,
    )
       where Self: Sized + Message { ... }
}
Available on crate features MTLAllocation and MTLResource and MTLVisibleFunctionTable only.
Expand description

Provided Methods§

Source

fn gpuResourceID(&self) -> MTLResourceID
where Self: Sized + Message,

Available on crate feature MTLTypes only.

Handle of the GPU resource suitable for storing in an Argument Buffer

Source

unsafe fn setFunction_atIndex( &self, function: Option<&ProtocolObject<dyn MTLFunctionHandle>>, index: NSUInteger, )
where Self: Sized + Message,

Available on crate feature MTLFunctionHandle only.
§Safety
  • function must be safe to call.
  • function must have the correct argument and return types.
  • index might not be bounds-checked.
Source

unsafe fn setFunctions_withRange( &self, functions: NonNull<*const ProtocolObject<dyn MTLFunctionHandle>>, range: NSRange, )
where Self: Sized + Message,

Available on crate feature MTLFunctionHandle only.
§Safety
  • functions must be a valid pointer.
  • range might not be bounds-checked.

Trait Implementations§

Source§

impl<T> ImplementedBy<T> for dyn MTLVisibleFunctionTable

Source§

impl ProtocolType for dyn MTLVisibleFunctionTable

Source§

const NAME: &'static str = "MTLVisibleFunctionTable"

The name of the Objective-C protocol that this type represents. Read more
Source§

fn protocol() -> Option<&'static AnyProtocol>

Get a reference to the Objective-C protocol object that this type represents. Read more

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<T> MTLVisibleFunctionTable for ProtocolObject<T>

Implementors§