Implementing a `std.io.Reader`

Oh man I got that reader working and now I have no idea how to use it.

I have read

but now I want to pass this reader into a function.

Am I restricted to using anytype?

pub fn packFromECatReader(comptime T: type, reader: anytype) !T {
    var bytes: [@divExact(@bitSizeOf(T), 8)]u8 = undefined;
    try reader.readNoEof(&bytes);
    return packFromECat(T, bytes);
}

This is so brutal that I lose all the type information.