pub trait LayoutCalculator {
    type TargetDataLayoutRef: Borrow<TargetDataLayout>;

    fn delay_bug(&self, txt: &str);
    fn current_data_layout(&self) -> Self::TargetDataLayoutRef;

    fn scalar_pair<V>(&self, a: Scalar, b: Scalar) -> LayoutS<V>
    where
        V: Idx
, { ... } fn univariant<'a, V, F>(
        &self,
        dl: &TargetDataLayout,
        fields: &[F],
        repr: &ReprOptions,
        kind: StructKind
    ) -> Option<LayoutS<V>>
    where
        V: Idx,
        F: Deref<Target = &'a LayoutS<V>> + Debug
, { ... } fn layout_of_never_type<V>(&self) -> LayoutS<V>
    where
        V: Idx
, { ... } fn layout_of_struct_or_enum<'a, V, F>(
        &self,
        repr: &ReprOptions,
        variants: &IndexVec<V, Vec<F, Global>>,
        is_enum: bool,
        is_unsafe_cell: bool,
        scalar_valid_range: (Bound<u128>, Bound<u128>),
        discr_range_of_repr: impl Fn(i128, i128) -> (Integer, bool),
        discriminants: impl Iterator<Item = (V, i128)>,
        niche_optimize_enum: bool,
        always_sized: bool
    ) -> Option<LayoutS<V>>
    where
        V: Idx,
        F: Deref<Target = &'a LayoutS<V>> + Debug
, { ... } fn layout_of_union<'a, V, F>(
        &self,
        repr: &ReprOptions,
        variants: &IndexVec<V, Vec<F, Global>>
    ) -> Option<LayoutS<V>>
    where
        V: Idx,
        F: Deref<Target = &'a LayoutS<V>> + Debug
, { ... } }

Required Associated Types§

Required Methods§

Provided Methods§

Implementors§