Enum rustc_typeck::check::cast::PointerKind [−][src]
enum PointerKind<'tcx> {
Thin,
Vtable(Option<DefId>),
Length,
OfProjection(&'tcx ProjectionTy<'tcx>),
OfOpaque(DefId, SubstsRef<'tcx>),
OfParam(&'tcx ParamTy),
}Expand description
The kind of pointer and associated metadata (thin, length or vtable) - we only allow casts between fat pointers if their metadata have the same kind.
Variants
Thin
No metadata attached, ie pointer to sized type or foreign type
Vtable(Option<DefId>)
A trait object
Length
Slice
OfProjection(&'tcx ProjectionTy<'tcx>)
Tuple Fields
0: &'tcx ProjectionTy<'tcx>The unsize info of this projection
OfOpaque(DefId, SubstsRef<'tcx>)
The unsize info of this opaque ty
OfParam(&'tcx ParamTy)
Tuple Fields
0: &'tcx ParamTyThe unsize info of this parameter
Trait Implementations
This method tests for self and other values to be equal, and is used
by ==. Read more
This method tests for !=.
Auto Trait Implementations
impl<'tcx> !RefUnwindSafe for PointerKind
impl<'tcx> !Send for PointerKind
impl<'tcx> !Sync for PointerKind
impl<'tcx> Unpin for PointerKind
impl<'tcx> !UnwindSafe for PointerKind
Blanket Implementations
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: 24 bytes
Size for each variant:
Thin: 0 bytesVtable: 8 bytesLength: 0 bytesOfProjection: 12 bytesOfOpaque: 20 bytesOfParam: 12 bytes
