Enum rustc_hir::hir::AsyncGeneratorKind
source · [−]pub enum AsyncGeneratorKind {
Block,
Closure,
Fn,
}
Expand description
In the case of a generator created as part of an async construct, which kind of async construct caused it to be created?
This helps error messages but is also used to drive coercions in type-checking (see #60424).
Variants
Block
An explicit async
block written by the user.
Closure
An explicit async
closure written by the user.
Fn
The async
block generated as the body of an async function.
Implementations
Trait Implementations
sourceimpl Clone for AsyncGeneratorKind
impl Clone for AsyncGeneratorKind
sourcefn clone(&self) -> AsyncGeneratorKind
fn clone(&self) -> AsyncGeneratorKind
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for AsyncGeneratorKind
impl Debug for AsyncGeneratorKind
sourceimpl<__D: Decoder> Decodable<__D> for AsyncGeneratorKind
impl<__D: Decoder> Decodable<__D> for AsyncGeneratorKind
sourceimpl Display for AsyncGeneratorKind
impl Display for AsyncGeneratorKind
sourceimpl<__E: Encoder> Encodable<__E> for AsyncGeneratorKind
impl<__E: Encoder> Encodable<__E> for AsyncGeneratorKind
sourceimpl Hash for AsyncGeneratorKind
impl Hash for AsyncGeneratorKind
sourceimpl<__CTX> HashStable<__CTX> for AsyncGeneratorKindwhere
__CTX: HashStableContext,
impl<__CTX> HashStable<__CTX> for AsyncGeneratorKindwhere
__CTX: HashStableContext,
fn hash_stable(&self, __hcx: &mut __CTX, __hasher: &mut StableHasher)
sourceimpl PartialEq<AsyncGeneratorKind> for AsyncGeneratorKind
impl PartialEq<AsyncGeneratorKind> for AsyncGeneratorKind
sourcefn eq(&self, other: &AsyncGeneratorKind) -> bool
fn eq(&self, other: &AsyncGeneratorKind) -> bool
sourceimpl PartialOrd<AsyncGeneratorKind> for AsyncGeneratorKind
impl PartialOrd<AsyncGeneratorKind> for AsyncGeneratorKind
sourcefn partial_cmp(&self, other: &AsyncGeneratorKind) -> Option<Ordering>
fn partial_cmp(&self, other: &AsyncGeneratorKind) -> Option<Ordering>
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy for AsyncGeneratorKind
impl Eq for AsyncGeneratorKind
impl StructuralEq for AsyncGeneratorKind
impl StructuralPartialEq for AsyncGeneratorKind
Auto Trait Implementations
impl RefUnwindSafe for AsyncGeneratorKind
impl Send for AsyncGeneratorKind
impl Sync for AsyncGeneratorKind
impl Unpin for AsyncGeneratorKind
impl UnwindSafe for AsyncGeneratorKind
Blanket Implementations
sourceimpl<'tcx, T> ArenaAllocatable<'tcx, IsCopy> for Twhere
T: Copy,
impl<'tcx, T> ArenaAllocatable<'tcx, IsCopy> for Twhere
T: Copy,
fn allocate_on(self, arena: &'a Arena<'tcx>) -> &'a mut T
fn allocate_from_iter(
arena: &'a Arena<'tcx>,
iter: impl IntoIterator<Item = T>
) -> &'a mut [T]ⓘNotable traits for &[u8]impl Read for &[u8]impl Write for &mut [u8]
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Layout
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference’s “Type Layout” chapter for details on type layout guarantees.
Size: 1 byte
Size for each variant:
Block
: 0 bytesClosure
: 0 bytesFn
: 0 bytes