2020-11-15 21:54:47 +01:00
|
|
|
module io
|
|
|
|
|
|
|
|
// Writer represents a stream of data that can be wrote to
|
|
|
|
pub interface Writer {
|
2021-10-11 14:41:31 +02:00
|
|
|
mut:
|
2022-04-15 14:35:35 +02:00
|
|
|
write(buf []u8) ?int
|
2020-11-15 21:54:47 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
// RandomWriter represents a stream of data that can be wrote to
|
|
|
|
// at a random pos
|
|
|
|
pub interface RandomWriter {
|
2022-04-15 14:35:35 +02:00
|
|
|
write_to(pos u64, buf []u8) ?int
|
2020-11-15 21:54:47 +01:00
|
|
|
}
|