pub struct ThreadResources { /* private fields */ }Expand description
Runtime-owned resources whose lifetime follows one thread.
Implementations§
Source§impl ThreadResources
impl ThreadResources
Sourcepub const unsafe fn new(
context: ExecutionContextHandle,
stack: StackHandle,
tls: TlsHandle,
address_space: AddressSpaceToken,
) -> Self
pub const unsafe fn new( context: ExecutionContextHandle, stack: StackHandle, tls: TlsHandle, address_space: AddressSpaceToken, ) -> Self
Creates a complete runtime resource bundle from uniquely owned handles.
§Safety
Every non-empty handle must be live, belong to the currently installed
crate::runtime::TaskRuntime, and have its unique destruction right
transferred into this bundle. The caller must not construct another
owning bundle from the same scalar handles.
Sourcepub const fn context(&self) -> ExecutionContextHandle
pub const fn context(&self) -> ExecutionContextHandle
Returns the execution context.
Sourcepub const fn stack(&self) -> StackHandle
pub const fn stack(&self) -> StackHandle
Returns the guarded stack allocation.
Sourcepub const fn address_space(&self) -> AddressSpaceHandle
pub const fn address_space(&self) -> AddressSpaceHandle
Returns the address-space handle.
Trait Implementations§
Source§impl Debug for ThreadResources
impl Debug for ThreadResources
impl Eq for ThreadResources
Source§impl PartialEq for ThreadResources
impl PartialEq for ThreadResources
impl StructuralPartialEq for ThreadResources
Auto Trait Implementations§
impl Freeze for ThreadResources
impl RefUnwindSafe for ThreadResources
impl Send for ThreadResources
impl Sync for ThreadResources
impl Unpin for ThreadResources
impl UnsafeUnpin for ThreadResources
impl UnwindSafe for ThreadResources
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