pub struct FunctionHandle(/* private fields */);Expand description
A handle to a compiled function.
C++ equivalent: MTL::FunctionHandle
Implementations§
Source§impl FunctionHandle
impl FunctionHandle
Sourcepub unsafe fn from_raw(ptr: *mut c_void) -> Option<Self>
pub unsafe fn from_raw(ptr: *mut c_void) -> Option<Self>
Create a FunctionHandle from a raw pointer.
§Safety
The pointer must be a valid Metal function handle object.
Sourcepub fn device(&self) -> Device
pub fn device(&self) -> Device
Get the device that created this function handle.
C++ equivalent: Device* device() const
Sourcepub fn function_type(&self) -> FunctionType
pub fn function_type(&self) -> FunctionType
Get the type of the function.
C++ equivalent: FunctionType functionType() const
Sourcepub fn gpu_resource_id(&self) -> ResourceID
pub fn gpu_resource_id(&self) -> ResourceID
Get the GPU resource ID for bindless access.
C++ equivalent: ResourceID gpuResourceID() const
Trait Implementations§
Source§impl Clone for FunctionHandle
impl Clone for FunctionHandle
Source§impl Debug for FunctionHandle
impl Debug for FunctionHandle
Source§impl Drop for FunctionHandle
impl Drop for FunctionHandle
Source§impl Referencing for FunctionHandle
impl Referencing for FunctionHandle
Source§fn as_mut_ptr(&self) -> *mut c_void
fn as_mut_ptr(&self) -> *mut c_void
Get the raw mutable pointer to the Objective-C object.
Source§fn retain(&self) -> Selfwhere
Self: Clone,
fn retain(&self) -> Selfwhere
Self: Clone,
Retain the object, incrementing its reference count. Read more
Source§fn autorelease(&self) -> Selfwhere
Self: Clone,
fn autorelease(&self) -> Selfwhere
Self: Clone,
Autorelease the object. Read more
Source§fn retain_count(&self) -> usize
fn retain_count(&self) -> usize
Get the retain count of the object. Read more
impl Send for FunctionHandle
impl Sync for FunctionHandle
Auto Trait Implementations§
impl Freeze for FunctionHandle
impl RefUnwindSafe for FunctionHandle
impl Unpin for FunctionHandle
impl UnwindSafe for FunctionHandle
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more