| 1 | module io |
| 2 | |
| 3 | // Writer is the interface that wraps the `write` method, which |
| 4 | // writes `buf.len` bytes to the underlying data stream. |
| 5 | pub interface Writer { |
| 6 | mut: |
| 7 | write(buf []u8) !int |
| 8 | } |
| 9 | |
| 10 | // RandomWriter is the interface that wraps the `write_to` method, |
| 11 | // which writes `buf.len` bytes to the underlying data stream at a random `pos`. |
| 12 | pub interface RandomWriter { |
| 13 | write_to(pos u64, buf []u8) !int |
| 14 | } |
| 15 |