pub struct ContextStack;
Expand description
Type used to represent the thread-local context stack.
Implementations§
Source§impl 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 Freeze for ContextStack
impl RefUnwindSafe for ContextStack
impl Send for ContextStack
impl Sync for ContextStack
impl Unpin for ContextStack
impl UnwindSafe for ContextStack
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