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
No metadata attached, ie pointer to sized type or foreign type
A trait object
Slice
OfProjection(&'tcx ProjectionTy<'tcx>)
The unsize info of this projection
Tuple Fields of OfProjection
0: &'tcx ProjectionTy<'tcx>
The unsize info of this opaque ty
OfParam(&'tcx ParamTy)
The unsize info of this parameter
Tuple Fields of OfParam
0: &'tcx ParamTy
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<'tcx>
impl<'tcx> !Send for PointerKind<'tcx>
impl<'tcx> !Sync for PointerKind<'tcx>
impl<'tcx> Unpin for PointerKind<'tcx>
impl<'tcx> !UnwindSafe for PointerKind<'tcx>
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