pub struct PreemptGuardToken(/* private fields */);Expand description
Token returned by the nested task-preemption guard service.
Implementations§
Source§impl PreemptGuardToken
impl PreemptGuardToken
Sourcepub const unsafe fn from_raw(raw: usize) -> Self
pub const unsafe fn from_raw(raw: usize) -> Self
Creates a handle from the runtime-owned opaque value.
§Safety
A non-zero raw value must identify a live runtime-owned object
or resource of this exact handle type. The caller must uphold all
provenance, lifetime, pinning, aliasing, and ownership invariants
required by operations that consume or dereference the handle.
Use Self::NONE for the absent-handle sentinel.
ⓘ
use ax_task::runtime::cpu::PreemptGuardToken;
let _handle = PreemptGuardToken::from_raw(1);Trait Implementations§
Source§impl Clone for PreemptGuardToken
impl Clone for PreemptGuardToken
Source§fn clone(&self) -> PreemptGuardToken
fn clone(&self) -> PreemptGuardToken
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 PreemptGuardToken
Source§impl Debug for PreemptGuardToken
impl Debug for PreemptGuardToken
impl Eq for PreemptGuardToken
Source§impl Hash for PreemptGuardToken
impl Hash for PreemptGuardToken
Source§impl PartialEq for PreemptGuardToken
impl PartialEq for PreemptGuardToken
impl StructuralPartialEq for PreemptGuardToken
Auto Trait Implementations§
impl Freeze for PreemptGuardToken
impl RefUnwindSafe for PreemptGuardToken
impl Send for PreemptGuardToken
impl Sync for PreemptGuardToken
impl Unpin for PreemptGuardToken
impl UnsafeUnpin for PreemptGuardToken
impl UnwindSafe for PreemptGuardToken
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