#`anytype` for Writer interfaces
1 messages · Page 1 of 1 (latest)
not sure what you mean but there's std.io.AnyWriter if you want a type-erased writer, like std.io.AnyReader
or potentially std.io.GenericWriter if you just want to give it a function and an error set
writer: std.io.AnyWriter,
pub fn init(writer: anytype) Self {
return .{
.writer = writer,
};
}
im trying to make it work for any type of writer basically
writer.any()