pub struct CommandAllocator(/* private fields */);Expand description
Memory allocator for MTL4 command buffer recording.
C++ equivalent: MTL4::CommandAllocator
CommandAllocator manages memory for command buffer recording in Metal 4. It provides explicit control over memory allocation for GPU commands.
Implementations§
Source§impl CommandAllocator
impl CommandAllocator
Sourcepub unsafe fn from_raw(ptr: *mut c_void) -> Option<Self>
pub unsafe fn from_raw(ptr: *mut c_void) -> Option<Self>
Create a CommandAllocator from a raw pointer.
Sourcepub fn device(&self) -> Option<Device>
pub fn device(&self) -> Option<Device>
Get the device that created this allocator.
C++ equivalent: MTL::Device* device() const
Sourcepub fn allocated_size(&self) -> u64
pub fn allocated_size(&self) -> u64
Get the current allocated size.
C++ equivalent: uint64_t allocatedSize()
Trait Implementations§
Source§impl Clone for CommandAllocator
impl Clone for CommandAllocator
Source§impl Debug for CommandAllocator
impl Debug for CommandAllocator
Source§impl Drop for CommandAllocator
impl Drop for CommandAllocator
Source§impl Referencing for CommandAllocator
impl Referencing for CommandAllocator
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 CommandAllocator
impl Sync for CommandAllocator
Auto Trait Implementations§
impl Freeze for CommandAllocator
impl RefUnwindSafe for CommandAllocator
impl Unpin for CommandAllocator
impl UnwindSafe for CommandAllocator
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