| ... | ... | @@ -3,6 +3,7 @@ |
| 3 | 3 | const std = @import("std"); |
| 4 | 4 | const nio = @import("./nio.zig"); |
| 5 | 5 | const builtin = @import("builtin"); |
| 6 | const extras = @import("extras"); |
| 6 | 7 | |
| 7 | 8 | const sys = switch (builtin.target.os.tag) { |
| 8 | 9 | .linux => @import("sys-linux"), |
| ... | ... | @@ -23,6 +24,10 @@ pub fn HashWriter(comptime Hash: type) type { |
| 23 | 24 | }; |
| 24 | 25 | } |
| 25 | 26 | |
| 27 | pub fn from(hasher: anytype) HashWriter(extras.Pointee(@TypeOf(hasher))) { |
| 28 | return .init(hasher); |
| 29 | } |
| 30 | |
| 26 | 31 | const W = nio.Writable(@This(), ._const); |
| 27 | 32 | pub const writeAll = W.writeAll; |
| 28 | 33 | pub const writevAll = W.writevAll; |