pub trait LayoutOf<'tcx>: LayoutOfHelpers<'tcx> {
    // Provided methods
    fn layout_of(&self, ty: Ty<'tcx>) -> Self::LayoutOfResult { ... }
    fn spanned_layout_of(
        &self,
        ty: Ty<'tcx>,
        span: Span
    ) -> Self::LayoutOfResult { ... }
}
Expand description

Blanket extension trait for contexts that can compute layouts of types.

Provided Methods§

source

fn layout_of(&self, ty: Ty<'tcx>) -> Self::LayoutOfResult

Computes the layout of a type. Note that this implicitly executes in “reveal all” mode, and will normalize the input type.

source

fn spanned_layout_of(&self, ty: Ty<'tcx>, span: Span) -> Self::LayoutOfResult

Computes the layout of a type, at span. Note that this implicitly executes in “reveal all” mode, and will normalize the input type.

Implementors§

source§

impl<'tcx, C: LayoutOfHelpers<'tcx>> LayoutOf<'tcx> for C