Suppose we have some intermediate data of the form (usize, usize, usize, usize, usize, usize). which represents:
x.0 = start of index into Vec A
x.1 = end of index into Vec A
x.2 = index of particular element in Vec A
x.3 = index of elem in Vec A
x.4 = index of elem in Vec B
x.5 = index of elem in Vec B
now I would much rather prefer to use:
struct {
a_start: usize,
a_end: usize,
a_min: usize,
a_max: usize,
b_min: usize,
b_max: usize
}
but the problem here is that we end up polluting the crate/module namespace with all these "one-off-Structs"
Question: does Rust have anything like "named tuples" or "anonymous structs" ? I want to be able to specify a name (rather than a numeric index) for the fields, but I don't want all these one-off-Structs.