pub struct FunctionConstant(/* private fields */);Expand description
Function constant definition.
C++ equivalent: MTL::FunctionConstant
Contains information about a function constant defined in shader code.
Implementations§
Source§impl FunctionConstant
impl FunctionConstant
Sourcepub fn alloc() -> Option<Self>
pub fn alloc() -> Option<Self>
Allocate a new function constant.
C++ equivalent: static FunctionConstant* alloc()
Sourcepub fn init(&self) -> Option<Self>
pub fn init(&self) -> Option<Self>
Initialize an allocated function constant.
C++ equivalent: FunctionConstant* init()
Sourcepub fn name(&self) -> Option<String>
pub fn name(&self) -> Option<String>
Get the function constant name.
C++ equivalent: NS::String* name() const
Sourcepub fn constant_type(&self) -> DataType
pub fn constant_type(&self) -> DataType
Get the function constant data type.
C++ equivalent: DataType type() const
Trait Implementations§
Source§impl Clone for FunctionConstant
impl Clone for FunctionConstant
Source§impl Debug for FunctionConstant
impl Debug for FunctionConstant
Source§impl Drop for FunctionConstant
impl Drop for FunctionConstant
Source§impl Referencing for FunctionConstant
impl Referencing for FunctionConstant
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 FunctionConstant
impl Sync for FunctionConstant
Auto Trait Implementations§
impl Freeze for FunctionConstant
impl RefUnwindSafe for FunctionConstant
impl Unpin for FunctionConstant
impl UnwindSafe for FunctionConstant
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