pub struct CoroutineHeader { /* private fields */ }Expand description
Pinned header addressed directly by the coroutine’s custom raw waker.
All fields touched outside the owner thread are atomic or immutable. The future itself follows this header in a private allocation and is inaccessible to raw waker operations.
Implementations§
Source§impl CoroutineHeader
impl CoroutineHeader
Sourcepub const fn id(&self) -> CoroutineId
pub const fn id(&self) -> CoroutineId
Returns this allocation’s generation-bearing identity.
Sourcepub const fn owner_thread(&self) -> ThreadId
pub const fn owner_thread(&self) -> ThreadId
Returns the owner thread embedded in every waker for this coroutine.
Trait Implementations§
impl Send for CoroutineHeader
impl Sync for CoroutineHeader
Auto Trait Implementations§
impl !Freeze for CoroutineHeader
impl !RefUnwindSafe for CoroutineHeader
impl !Unpin for CoroutineHeader
impl !UnsafeUnpin for CoroutineHeader
impl !UnwindSafe for CoroutineHeader
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