pub struct UserObject { /* private fields */ }Expand description
A refcounted user object.
Implementations§
Source§impl UserObject
impl UserObject
Sourcepub fn new<F>(destroy: F, initial_refcount: u32) -> Result<Self>
pub fn new<F>(destroy: F, initial_refcount: u32) -> Result<Self>
Create a user object whose destructor is destroy.
initial_refcount must be >= 1.
pub fn retain(&self, count: u32) -> Result<()>
pub fn release(&self, count: u32) -> Result<()>
pub fn as_raw(&self) -> cudaUserObject_t
Trait Implementations§
Source§impl Debug for UserObject
impl Debug for UserObject
Source§impl Drop for UserObject
impl Drop for UserObject
impl Send for UserObject
impl Sync for UserObject
Auto Trait Implementations§
impl Freeze for UserObject
impl RefUnwindSafe for UserObject
impl Unpin for UserObject
impl UnsafeUnpin for UserObject
impl UnwindSafe for UserObject
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