pub struct FunctionDescriptor(/* private fields */);Expand description
Descriptor for creating specialized functions.
C++ equivalent: MTL::FunctionDescriptor
Used to create specialized functions from a library.
Implementations§
Source§impl FunctionDescriptor
impl FunctionDescriptor
Sourcepub fn alloc() -> Option<Self>
pub fn alloc() -> Option<Self>
Allocate a new function descriptor.
C++ equivalent: static FunctionDescriptor* alloc()
Sourcepub fn init(&self) -> Option<Self>
pub fn init(&self) -> Option<Self>
Initialize an allocated function descriptor.
C++ equivalent: FunctionDescriptor* init()
Sourcepub fn function_descriptor() -> Option<Self>
pub fn function_descriptor() -> Option<Self>
Create a function descriptor using the factory method.
C++ equivalent: static FunctionDescriptor* functionDescriptor()
Sourcepub fn name(&self) -> Option<String>
pub fn name(&self) -> Option<String>
Get the function name.
C++ equivalent: NS::String* name() const
Sourcepub fn set_name(&self, name: &str)
pub fn set_name(&self, name: &str)
Set the function name.
C++ equivalent: void setName(const NS::String*)
Sourcepub fn specialized_name(&self) -> Option<String>
pub fn specialized_name(&self) -> Option<String>
Get the specialized name.
C++ equivalent: NS::String* specializedName() const
Sourcepub fn set_specialized_name(&self, name: &str)
pub fn set_specialized_name(&self, name: &str)
Set the specialized name.
C++ equivalent: void setSpecializedName(const NS::String*)
Sourcepub fn constant_values(&self) -> Option<FunctionConstantValues>
pub fn constant_values(&self) -> Option<FunctionConstantValues>
Get the function constant values.
C++ equivalent: FunctionConstantValues* constantValues() const
Sourcepub fn set_constant_values(&self, values: Option<&FunctionConstantValues>)
pub fn set_constant_values(&self, values: Option<&FunctionConstantValues>)
Set the function constant values.
C++ equivalent: void setConstantValues(const FunctionConstantValues*)
Sourcepub fn options(&self) -> FunctionOptions
pub fn options(&self) -> FunctionOptions
Get the function options.
C++ equivalent: FunctionOptions options() const
Sourcepub fn set_options(&self, options: FunctionOptions)
pub fn set_options(&self, options: FunctionOptions)
Set the function options.
C++ equivalent: void setOptions(FunctionOptions)
Sourcepub fn binary_archives_raw(&self) -> *mut c_void
pub fn binary_archives_raw(&self) -> *mut c_void
Get the binary archives (raw NSArray pointer).
C++ equivalent: NS::Array* binaryArchives() const
Sourcepub unsafe fn set_binary_archives_raw(&self, archives: *const c_void)
pub unsafe fn set_binary_archives_raw(&self, archives: *const c_void)
Set the binary archives.
C++ equivalent: void setBinaryArchives(const NS::Array*)
§Safety
The archives pointer must be a valid NSArray of BinaryArchive objects or null.