pub struct TlsHandle(/* private fields */);Expand description
Opaque handle to a runtime-owned TLS allocation.
Implementations§
Source§impl TlsHandle
impl TlsHandle
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::resource::TlsHandle;
let _handle = TlsHandle::from_raw(1);Trait Implementations§
impl Copy for TlsHandle
impl Eq for TlsHandle
impl StructuralPartialEq for TlsHandle
Auto Trait Implementations§
impl Freeze for TlsHandle
impl RefUnwindSafe for TlsHandle
impl Send for TlsHandle
impl Sync for TlsHandle
impl Unpin for TlsHandle
impl UnsafeUnpin for TlsHandle
impl UnwindSafe for TlsHandle
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