pub struct HostFunction(/* private fields */);Expand description
CUDA host callback function pointer.
This is a borrowed function pointer value, not an owned CUDA resource.
Implementations§
Source§impl HostFunction
impl HostFunction
Sourcepub const unsafe fn new(raw: CUhostFn) -> Self
pub const unsafe fn new(raw: CUhostFn) -> Self
Wraps a raw CUDA host callback function pointer.
§Safety
raw must be a callback function pointer with the ABI and lifetime
required by CUDA for every operation that uses the returned handle.
Sourcepub const unsafe fn from_raw(raw: CUhostFn) -> Self
pub const unsafe fn from_raw(raw: CUhostFn) -> Self
Wraps a raw CUDA host callback function pointer.
§Safety
raw must be a callback function pointer with the ABI and lifetime
required by CUDA for every operation that uses the returned handle.
pub const fn as_raw(self) -> CUhostFn
Trait Implementations§
Source§impl Clone for HostFunction
impl Clone for HostFunction
Source§fn clone(&self) -> HostFunction
fn clone(&self) -> HostFunction
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for HostFunction
Source§impl Debug for HostFunction
impl Debug for HostFunction
Source§impl From<HostFunction> for CUhostFn
impl From<HostFunction> for CUhostFn
Source§fn from(value: HostFunction) -> Self
fn from(value: HostFunction) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for HostFunction
impl RefUnwindSafe for HostFunction
impl Send for HostFunction
impl Sync for HostFunction
impl Unpin for HostFunction
impl UnsafeUnpin for HostFunction
impl UnwindSafe for HostFunction
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