pub struct MetalOwnedTextureFrameHandle { /* private fields */ }Expand description
RAII guard for an acquired Metal session-owned texture frame.
Releasing the guard ends the borrow of the backend Metal texture and device.
Implementations§
Source§impl MetalOwnedTextureFrameHandle
impl MetalOwnedTextureFrameHandle
Sourcepub fn frame(&self) -> Result<&MetalOwnedTextureFrame>
pub fn frame(&self) -> Result<&MetalOwnedTextureFrame>
Returns copied metadata for this acquired frame.
pub fn is_closed(&self) -> bool
Sourcepub unsafe fn texture(&self) -> Result<FrameNativePointer<'_>>
pub unsafe fn texture(&self) -> Result<FrameNativePointer<'_>>
Returns the borrowed Metal texture pointer for backend interop.
§Safety
The returned pointer is valid only while this frame handle remains open. The caller must not store or use it after frame release and must satisfy Metal synchronization and thread-affinity requirements.
Sourcepub unsafe fn device(&self) -> Result<FrameNativePointer<'_>>
pub unsafe fn device(&self) -> Result<FrameNativePointer<'_>>
Returns the borrowed Metal device pointer for backend interop.
§Safety
The returned pointer has the same lifetime and synchronization
requirements as MetalOwnedTextureFrameHandle::texture.
Sourcepub fn close(self) -> Result<(), HandleOperationError<Self>>
pub fn close(self) -> Result<(), HandleOperationError<Self>>
Explicitly releases this frame.
Trait Implementations§
Source§impl Debug for MetalOwnedTextureFrameHandle
impl Debug for MetalOwnedTextureFrameHandle
Auto Trait Implementations§
impl !Freeze for MetalOwnedTextureFrameHandle
impl !RefUnwindSafe for MetalOwnedTextureFrameHandle
impl !Send for MetalOwnedTextureFrameHandle
impl !Sync for MetalOwnedTextureFrameHandle
impl Unpin for MetalOwnedTextureFrameHandle
impl UnsafeUnpin for MetalOwnedTextureFrameHandle
impl !UnwindSafe for MetalOwnedTextureFrameHandle
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