Files
openide/platform/eel
Ilya.Kazakevich a52e828b61 Eel: Introduce ReadResult to reuse it all over the system.
Files, sockets, and process pipes all support reading. Read's result is either `EOF` or some bytes written to a buffer provided to `read`. APIs usually return a number of bytes read with `-1` means EOF, but this information is redundant as it can always be deduced from `ByteBuffer` position.

As we do not need this number, we introduce enum which is simpler (and faster) than sealed class and also removes possible inconsistency between number of bytes and buffer position advance.

GitOrigin-RevId: cffb7b5121f05c40aec186019ee7c3b0fe400d16
2024-12-06 20:52:12 +00:00
..