Struct ResumeTy

pub struct ResumeTy(pub(in ::future) NonNull<Context<'static>>);

This type is needed because:

a) Coroutines cannot implement for<'a, 'b> Coroutine<&'a mut Context<'b>>, so we need to pass a raw pointer (see https://github.com/rust-lang/rust/issues/68923). b) Raw pointers and NonNull aren't Send or Sync, so that would make every single future non-Send/Sync as well, and we don't want that.

It also simplifies the HIR lowering of .await.

Fields

0: NonNull<Context<'static>>

Trait Implementations

impl Clone for ResumeTy

fn clone(&self) -> ResumeTy

impl Copy for ResumeTy

impl Debug for ResumeTy

fn fmt(&self, f: &mut Formatter<'_>) -> Result

impl Send for ResumeTy

impl Sync for ResumeTy

impl TrivialClone for ResumeTy