| author | |
| committer | |
| log | 22926d4037ab1b331bb7d1b219e0b8ba03e4c05a |
| tree | 0d72cb55de16bade4e27a7517a0f186ac8b8b09d |
| parent | e6270ad653d1443554cda9c5a020d56a59baa68a |
| signature |
2 files changed, 14 insertions(+), 0 deletions(-)
nio.zig+2| ... | ... | @@ -301,3 +301,5 @@ pub const BufferedReader = @import("./buffered_reader.zig").BufferedReader; |
| 301 | 301 | pub const BufferedWriter = @import("./buffered_writer.zig").BufferedWriter; |
| 302 | 302 | |
| 303 | 303 | pub const CountingWriter = @import("./counting_writer.zig").CountingWriter; |
| 304 | ||
| 305 | pub const NullWriter = @import("./null_writer.zig").NullWriter; |
null_writer.zig created+12| ... | ... | @@ -0,0 +1,12 @@ |
| 1 | const std = @import("std"); | |
| 2 | const extras = @import("extras"); | |
| 3 | const nio = @import("./nio.zig"); | |
| 4 | ||
| 5 | pub const NullWriter = struct { | |
| 6 | pub const WriteError = error{}; | |
| 7 | pub usingnamespace nio.Writable(@This(), ._var); | |
| 8 | pub fn write(self: NullWriter, bytes: []const u8) WriteError!usize { | |
| 9 | _ = self; | |
| 10 | return bytes.len; | |
| 11 | } | |
| 12 | }; |