pub struct CuHandle<T: ArrayLike>(/* private fields */);
Expand description
A shareable handle to an Array coming from a pool (either host or device).
Implementations§
Source§impl<T: ArrayLike> CuHandle<T>
impl<T: ArrayLike> CuHandle<T>
Sourcepub fn new_detached(inner: T) -> Self
pub fn new_detached(inner: T) -> Self
Create a new CuHandle not part of a Pool (not for onboard usages, use pools instead)
Sourcepub fn with_inner<R>(&self, f: impl FnOnce(&CuHandleInner<T>) -> R) -> R
pub fn with_inner<R>(&self, f: impl FnOnce(&CuHandleInner<T>) -> R) -> R
Safely access the inner value, applying a closure to it.
Sourcepub fn with_inner_mut<R>(&self, f: impl FnOnce(&mut CuHandleInner<T>) -> R) -> R
pub fn with_inner_mut<R>(&self, f: impl FnOnce(&mut CuHandleInner<T>) -> R) -> R
Mutably access the inner value, applying a closure to it.
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for CuHandle<T>
impl<T> RefUnwindSafe for CuHandle<T>
impl<T> Send for CuHandle<T>
impl<T> Sync for CuHandle<T>
impl<T> Unpin for CuHandle<T>
impl<T> UnwindSafe for CuHandle<T>
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