pub struct AttributeDescriptor(/* private fields */);Expand description
Describes an attribute in a stage input/output descriptor.
C++ equivalent: MTL::AttributeDescriptor
Implementations§
Source§impl AttributeDescriptor
impl AttributeDescriptor
Sourcepub fn new() -> Option<Self>
pub fn new() -> Option<Self>
Create a new attribute descriptor.
C++ equivalent: AttributeDescriptor::alloc()->init()
Sourcepub fn format(&self) -> AttributeFormat
pub fn format(&self) -> AttributeFormat
Get the format.
C++ equivalent: AttributeFormat format() const
Sourcepub fn set_format(&self, format: AttributeFormat)
pub fn set_format(&self, format: AttributeFormat)
Set the format.
C++ equivalent: void setFormat(AttributeFormat)
Sourcepub fn set_offset(&self, offset: UInteger)
pub fn set_offset(&self, offset: UInteger)
Set the offset.
C++ equivalent: void setOffset(NS::UInteger)
Sourcepub fn buffer_index(&self) -> UInteger
pub fn buffer_index(&self) -> UInteger
Get the buffer index.
C++ equivalent: NS::UInteger bufferIndex() const
Sourcepub fn set_buffer_index(&self, buffer_index: UInteger)
pub fn set_buffer_index(&self, buffer_index: UInteger)
Set the buffer index.
C++ equivalent: void setBufferIndex(NS::UInteger)
Trait Implementations§
Source§impl Clone for AttributeDescriptor
impl Clone for AttributeDescriptor
Source§impl Default for AttributeDescriptor
impl Default for AttributeDescriptor
Source§impl Drop for AttributeDescriptor
impl Drop for AttributeDescriptor
Source§impl Referencing for AttributeDescriptor
impl Referencing for AttributeDescriptor
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 AttributeDescriptor
impl Sync for AttributeDescriptor
Auto Trait Implementations§
impl Freeze for AttributeDescriptor
impl RefUnwindSafe for AttributeDescriptor
impl Unpin for AttributeDescriptor
impl UnwindSafe for AttributeDescriptor
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