pub struct TensorGuard<'a> { /* private fields */ }Expand description
A borrowed view of completed resident storage. Forgetting this guard does not release its tensor or grant access to pending commands. The shared borrow prevents safe destruction while the guard remains usable.
Implementations§
Source§impl TensorGuard<'_>
impl TensorGuard<'_>
Sourcepub unsafe fn buffer_descriptor(&self) -> Result<BufferDescriptor>
pub unsafe fn buffer_descriptor(&self) -> Result<BufferDescriptor>
Exposes a descriptor for explicitly synchronized external interoperability.
§Safety
External use must not mutate storage while any Rust command or tensor uses it. The caller synchronizes queues and restores the recorded access state before subsequent Rust use, and never destroys this borrowed buffer.
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for TensorGuard<'a>
impl<'a> !Send for TensorGuard<'a>
impl<'a> !Sync for TensorGuard<'a>
impl<'a> !UnwindSafe for TensorGuard<'a>
impl<'a> Freeze for TensorGuard<'a>
impl<'a> Unpin for TensorGuard<'a>
impl<'a> UnsafeUnpin for TensorGuard<'a>
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