pub struct ActiveScope;Expand description
Currently active scope.
Implementations§
Source§impl ActiveScope
impl ActiveScope
Sourcepub unsafe fn set(scope: &Scope)
pub unsafe fn set(scope: &Scope)
Sets the active scope pointer to the given scope.
§Safety
The caller must ensure that the provided scope reference is valid for
the duration in which it is set as the active scope, and that no data
races or aliasing violations occur.
Sourcepub unsafe fn set_pinned(scope: &Scope, pin: &CpuPin<'_>)
pub unsafe fn set_pinned(scope: &Scope, pin: &CpuPin<'_>)
Sets the active scope under an existing CPU pin.
§Safety
scope must remain alive until a later pinned replacement or reset.
Sourcepub fn set_global()
pub fn set_global()
Set the active scope to the global scope.
Sourcepub fn set_global_pinned(pin: &CpuPin<'_>)
pub fn set_global_pinned(pin: &CpuPin<'_>)
Sets the active scope to global under an existing CPU pin.
Sourcepub fn is_global_pinned(pin: &CpuPin<'_>) -> bool
pub fn is_global_pinned(pin: &CpuPin<'_>) -> bool
Returns whether the active scope is global under an existing pin.
Auto Trait Implementations§
impl Freeze for ActiveScope
impl RefUnwindSafe for ActiveScope
impl Send for ActiveScope
impl Sync for ActiveScope
impl Unpin for ActiveScope
impl UnsafeUnpin for ActiveScope
impl UnwindSafe for ActiveScope
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