pub struct Attribute(/* private fields */);Expand description
Function argument attribute reflection information.
C++ equivalent: MTL::Attribute
Contains information about a function argument attribute.
Implementations§
Source§impl Attribute
impl Attribute
Sourcepub fn alloc() -> Option<Self>
pub fn alloc() -> Option<Self>
Allocate a new attribute.
C++ equivalent: static Attribute* alloc()
Sourcepub fn init(&self) -> Option<Self>
pub fn init(&self) -> Option<Self>
Initialize an allocated attribute.
C++ equivalent: Attribute* init()
Sourcepub fn name(&self) -> Option<String>
pub fn name(&self) -> Option<String>
Get the attribute name.
C++ equivalent: NS::String* name() const
Sourcepub fn attribute_index(&self) -> UInteger
pub fn attribute_index(&self) -> UInteger
Get the attribute index.
C++ equivalent: NS::UInteger attributeIndex() const
Sourcepub fn attribute_type(&self) -> DataType
pub fn attribute_type(&self) -> DataType
Get the attribute data type.
C++ equivalent: DataType attributeType() const
Sourcepub fn is_active(&self) -> bool
pub fn is_active(&self) -> bool
Check if the attribute is active.
C++ equivalent: bool isActive() const
Sourcepub fn is_patch_data(&self) -> bool
pub fn is_patch_data(&self) -> bool
Check if this is patch data.
C++ equivalent: bool isPatchData() const
Sourcepub fn is_patch_control_point_data(&self) -> bool
pub fn is_patch_control_point_data(&self) -> bool
Check if this is patch control point data.
C++ equivalent: bool isPatchControlPointData() const
Trait Implementations§
Source§impl Referencing for Attribute
impl Referencing for Attribute
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 Attribute
impl Sync for Attribute
Auto Trait Implementations§
impl Freeze for Attribute
impl RefUnwindSafe for Attribute
impl Unpin for Attribute
impl UnwindSafe for Attribute
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