trait PerByteTracking<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> {
// Required methods
fn excludes(bx: &mut Bx, ty: Ty<'tcx>) -> bool;
fn contains(bx: &mut Bx, ty: Ty<'tcx>) -> bool;
// Provided methods
fn visit_layout(
bx: &mut Bx,
offset: Size,
ranges: &mut RangeSet<Size>,
layout: TyAndLayout<'tcx>,
imprecise: bool,
) { ... }
fn collect(
bx: &mut Bx,
layout: TyAndLayout<'tcx>,
imprecise: bool,
) -> Vec<(Size, Size)> { ... }
}Expand description
A visitor trait for collecting the ranges within a layout that satisfy a given predicate.
Required Methods§
Provided Methods§
Sourcefn visit_layout(
bx: &mut Bx,
offset: Size,
ranges: &mut RangeSet<Size>,
layout: TyAndLayout<'tcx>,
imprecise: bool,
)
fn visit_layout( bx: &mut Bx, offset: Size, ranges: &mut RangeSet<Size>, layout: TyAndLayout<'tcx>, imprecise: bool, )
Traverses through the layout of a type to find each range satisfying the predicate.
If imprecise is true, then the entire size of the type will be included,
even if only one of its fields satisfies the predicate.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".