[−][src]Enum rustc_typeck::check::cast::PointerKind

pub(in check::cast) enum PointerKind<'tcx> {
    Thin,
    Vtable(Option<DefId>),
    Length,
    OfProjection(&'tcx ProjectionTy<'tcx>),
    OfOpaque(DefId, SubstsRef<'tcx>),
    OfParam(&'tcx ParamTy),
}

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>)

The unsize info of this projection

OfOpaque(DefId, SubstsRef<'tcx>)

The unsize info of this opaque ty

OfParam(&'tcx ParamTy)

The unsize info of this parameter

Trait Implementations

impl<'tcx> Clone for PointerKind<'tcx>[src]

impl<'tcx> Copy for PointerKind<'tcx>[src]

impl<'tcx> Eq for PointerKind<'tcx>[src]

impl<'tcx> PartialEq<PointerKind<'tcx>> for PointerKind<'tcx>[src]

impl<'tcx> StructuralEq for PointerKind<'tcx>[src]

impl<'tcx> StructuralPartialEq for PointerKind<'tcx>[src]

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

impl<T> Any for T where
    T: 'static + ?Sized, 
[src]

impl<T> Borrow<T> for T where
    T: ?Sized, 
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized, 
[src]

impl<'a, T> Captures<'a> for T where
    T: ?Sized, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone, 
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> WithConstness for T[src]