pub struct ContextStack;
Expand description
Type used to represent the thread-local context stack.
Implementations
sourceimpl ContextStack
impl ContextStack
sourcepub fn pop() -> CudaResult<UnownedContext>
pub fn pop() -> CudaResult<UnownedContext>
sourcepub fn push<C: ContextHandle>(ctx: &C) -> CudaResult<()>
pub fn push<C: ContextHandle>(ctx: &C) -> CudaResult<()>
Push the given context to the top of the stack
Example
let unowned = ContextStack::pop()?;
ContextStack::push(&unowned)?;
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for ContextStack
impl Send for ContextStack
impl Sync for ContextStack
impl Unpin for ContextStack
impl UnwindSafe for ContextStack
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more