It is probably my OOP / old age, but I would find this API easier to deal with if it were wrapped in a type that had a documented API
Something like
struct EncodingMask(i32);
impl EncodingMask {
fn new(val: i32) -> Self {
...
}
fn as_i32(&self) -> i32 {
self.0
}
}
// then you can implement From impls to/from i32 as well as a no allocation iterator
I am happy to help hack this out if you like the idea
Originally posted by @alamb in #8587 (comment)