pub struct VertexAttributeDescriptorArray(/* private fields */);Expand description
An array of vertex attribute descriptors.
C++ equivalent: MTL::VertexAttributeDescriptorArray
Implementations§
Source§impl VertexAttributeDescriptorArray
impl VertexAttributeDescriptorArray
Sourcepub fn new() -> Option<Self>
pub fn new() -> Option<Self>
Create a new vertex attribute descriptor array.
C++ equivalent: static VertexAttributeDescriptorArray* alloc()->init()
Sourcepub unsafe fn from_raw(ptr: *mut c_void) -> Option<Self>
pub unsafe fn from_raw(ptr: *mut c_void) -> Option<Self>
Create a VertexAttributeDescriptorArray from a raw pointer.
§Safety
The pointer must be a valid Metal vertex attribute descriptor array object.
Sourcepub fn object(&self, index: UInteger) -> Option<VertexAttributeDescriptor>
pub fn object(&self, index: UInteger) -> Option<VertexAttributeDescriptor>
Get the descriptor at the specified index.
C++ equivalent: VertexAttributeDescriptor* object(NS::UInteger index)
Sourcepub fn set_object(
&self,
attribute_desc: &VertexAttributeDescriptor,
index: UInteger,
)
pub fn set_object( &self, attribute_desc: &VertexAttributeDescriptor, index: UInteger, )
Set the descriptor at the specified index.
C++ equivalent: void setObject(const MTL::VertexAttributeDescriptor* attributeDesc, NS::UInteger index)
Trait Implementations§
Source§impl Referencing for VertexAttributeDescriptorArray
impl Referencing for VertexAttributeDescriptorArray
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 VertexAttributeDescriptorArray
impl Sync for VertexAttributeDescriptorArray
Auto Trait Implementations§
impl Freeze for VertexAttributeDescriptorArray
impl RefUnwindSafe for VertexAttributeDescriptorArray
impl Unpin for VertexAttributeDescriptorArray
impl UnwindSafe for VertexAttributeDescriptorArray
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