pub struct CommandBufferDescriptor(/* private fields */);Expand description
A descriptor for configuring command buffer creation.
C++ equivalent: MTL::CommandBufferDescriptor
Implementations§
Source§impl CommandBufferDescriptor
impl CommandBufferDescriptor
Sourcepub unsafe fn from_raw(ptr: *mut c_void) -> Option<Self>
pub unsafe fn from_raw(ptr: *mut c_void) -> Option<Self>
Create a new CommandBufferDescriptor from a raw pointer.
§Safety
The pointer must be a valid Metal command buffer descriptor object.
Sourcepub fn new() -> Option<Self>
pub fn new() -> Option<Self>
Create a new command buffer descriptor.
C++ equivalent: CommandBufferDescriptor::alloc()->init()
Sourcepub fn error_options(&self) -> CommandBufferErrorOption
pub fn error_options(&self) -> CommandBufferErrorOption
Get the error options for the command buffer.
C++ equivalent: CommandBufferErrorOption errorOptions() const
Sourcepub fn set_error_options(&self, error_options: CommandBufferErrorOption)
pub fn set_error_options(&self, error_options: CommandBufferErrorOption)
Set the error options for the command buffer.
C++ equivalent: void setErrorOptions(CommandBufferErrorOption errorOptions)
Sourcepub fn retained_references(&self) -> bool
pub fn retained_references(&self) -> bool
Check if the command buffer retains references to resources.
C++ equivalent: bool retainedReferences() const
Sourcepub fn set_retained_references(&self, retained_references: bool)
pub fn set_retained_references(&self, retained_references: bool)
Set whether the command buffer retains references to resources.
C++ equivalent: void setRetainedReferences(bool retainedReferences)
Sourcepub fn log_state(&self) -> *mut c_void
pub fn log_state(&self) -> *mut c_void
Get the log state for the command buffer.
C++ equivalent: LogState* logState() const
Returns a raw pointer to the log state object.
Sourcepub unsafe fn set_log_state(&self, log_state: *const c_void)
pub unsafe fn set_log_state(&self, log_state: *const c_void)
Set the log state for the command buffer.
C++ equivalent: void setLogState(const LogState* logState)
§Safety
The log_state pointer must be valid or null.