std.utf.encode accepts at most a char[4] array, then returns a size_t to let you know how many elements were filled.
Let's say you have a char[4] in a struct, and you want to store how much was encoded, would you use another 12 bytes (8 for the size_t, 4 for alignment) to store the "valid elements" in the struct to hold a number from 1 to 4?
It should be backwards compatible with any code that uses a size_t.