Enum rustc_hir::hir::GenericParamKind
source · pub enum GenericParamKind<'hir> {
Lifetime {
kind: LifetimeParamKind,
},
Type {
default: Option<&'hir Ty<'hir>>,
synthetic: bool,
},
Const {
ty: &'hir Ty<'hir>,
default: Option<AnonConst>,
},
}
Variants
Lifetime
Fields
kind: LifetimeParamKind
A lifetime definition (e.g., 'a: 'b + 'c + 'd
).
Type
Const
Fields
ty: &'hir Ty<'hir>
Trait Implementations
sourceimpl<'hir> Debug for GenericParamKind<'hir>
impl<'hir> Debug for GenericParamKind<'hir>
sourceimpl<'hir, __CTX> HashStable<__CTX> for GenericParamKind<'hir>where
__CTX: HashStableContext,
impl<'hir, __CTX> HashStable<__CTX> for GenericParamKind<'hir>where
__CTX: HashStableContext,
fn hash_stable(&self, __hcx: &mut __CTX, __hasher: &mut StableHasher)
Auto Trait Implementations
impl<'hir> RefUnwindSafe for GenericParamKind<'hir>
impl<'hir> !Send for GenericParamKind<'hir>
impl<'hir> !Sync for GenericParamKind<'hir>
impl<'hir> Unpin for GenericParamKind<'hir>
impl<'hir> UnwindSafe for GenericParamKind<'hir>
Blanket Implementations
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: 32 bytes
Size for each variant:
Lifetime
: 1 byteType
: 15 bytesConst
: 31 bytes