pub struct CounterSampleBufferDescriptor(/* private fields */);Expand description
Descriptor for creating a counter sample buffer.
C++ equivalent: MTL::CounterSampleBufferDescriptor
Implementations§
Source§impl CounterSampleBufferDescriptor
impl CounterSampleBufferDescriptor
Sourcepub fn alloc() -> Option<Self>
pub fn alloc() -> Option<Self>
Allocate a new counter sample buffer descriptor.
C++ equivalent: static CounterSampleBufferDescriptor* alloc()
Sourcepub fn init(&self) -> Option<Self>
pub fn init(&self) -> Option<Self>
Initialize an allocated counter sample buffer descriptor.
C++ equivalent: CounterSampleBufferDescriptor* init()
Sourcepub unsafe fn from_raw(ptr: *mut c_void) -> Option<Self>
pub unsafe fn from_raw(ptr: *mut c_void) -> Option<Self>
Create from a raw pointer.
§Safety
The pointer must be a valid Metal counter sample buffer descriptor.
Sourcepub fn counter_set(&self) -> Option<CounterSet>
pub fn counter_set(&self) -> Option<CounterSet>
Get the counter set to sample.
C++ equivalent: CounterSet* counterSet() const
Sourcepub fn set_counter_set(&self, counter_set: &CounterSet)
pub fn set_counter_set(&self, counter_set: &CounterSet)
Set the counter set to sample.
C++ equivalent: void setCounterSet(const CounterSet*)
Sourcepub fn label(&self) -> Option<String>
pub fn label(&self) -> Option<String>
Get the label for this descriptor.
C++ equivalent: NS::String* label() const
Sourcepub fn set_label(&self, label: &str)
pub fn set_label(&self, label: &str)
Set the label for this descriptor.
C++ equivalent: void setLabel(const NS::String*)
Sourcepub fn sample_count(&self) -> UInteger
pub fn sample_count(&self) -> UInteger
Get the number of samples to store.
C++ equivalent: NS::UInteger sampleCount() const
Sourcepub fn set_sample_count(&self, count: UInteger)
pub fn set_sample_count(&self, count: UInteger)
Set the number of samples to store.
C++ equivalent: void setSampleCount(NS::UInteger)
Sourcepub fn storage_mode(&self) -> StorageMode
pub fn storage_mode(&self) -> StorageMode
Get the storage mode for the sample buffer.
C++ equivalent: StorageMode storageMode() const
Sourcepub fn set_storage_mode(&self, mode: StorageMode)
pub fn set_storage_mode(&self, mode: StorageMode)
Set the storage mode for the sample buffer.
C++ equivalent: void setStorageMode(StorageMode)