|
|
|
|
|
by ribasushi
2171 days ago
|
|
A "maybe" type is logically incompatible with "subatomic I/O". When a sized-read() syscall results in a short read AND a raised error. The only sensible thing to do is to return both. I am not familiar with Rust, but looking around the docs on Read [https://doc.rust-lang.org/std/io/trait.Read.html#errors] I see: > If an error is returned then it must be guaranteed that no bytes were read. Could someone elaborate how a system can satisfy this guarantee, seems impossible...? |
|