pub struct Thread(/* private fields */);Available on crate feature
thread only.Expand description
Implementations§
Source§impl Thread
impl Thread
Sourcepub fn from_raw(raw: *mut c_void) -> Self
pub fn from_raw(raw: *mut c_void) -> Self
Convert to Self from a raw pointer that was returned from
Thread::to_raw.
Sourcepub unsafe fn from_raw_unchecked(raw: *mut c_void) -> Self
pub unsafe fn from_raw_unchecked(raw: *mut c_void) -> Self
Sourcepub fn from_raw_non_null(raw: NonNull<c_void>) -> Self
pub fn from_raw_non_null(raw: NonNull<c_void>) -> Self
Convert to Self from a raw non-null pointer that was returned from
Thread::to_raw_non_null.
Sourcepub fn to_raw(self) -> *mut c_void
pub fn to_raw(self) -> *mut c_void
Convert to a raw pointer from a Self.
This value is guaranteed to uniquely identify a thread, while it is running. After a thread has exited, this value may be reused by new threads.
Sourcepub fn to_raw_non_null(self) -> NonNull<c_void>
pub fn to_raw_non_null(self) -> NonNull<c_void>
Convert to a raw non-null pointer from a Self.
This value is guaranteed to uniquely identify a thread, while it is running. After a thread has exited, this value may be reused by new threads.
Trait Implementations§
impl Copy for Thread
impl Eq for Thread
impl StructuralPartialEq for Thread
Auto Trait Implementations§
impl Freeze for Thread
impl !RefUnwindSafe for Thread
impl !Send for Thread
impl !Sync for Thread
impl Unpin for Thread
impl !UnwindSafe for Thread
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