This is an example of the type that is needed by the read and write functions. It can have any fields but it must at least have these functions.
Note that std.net.Stream
conforms to this interface.
This declaration serves as documentation only.
Functions
fn readv(this: anytype, iovecs: []std.os.iovec) ReadError!usize
Returns the number of bytes read. The number read may be less than the buffer s…
Returns the number of bytes read. The number read may be less than the buffer space provided. End-of-stream is indicated by a return value of 0.
The
iovecs
parameter is mutable because so that function may to mutate the fields in order to handle partial reads from the underlying stream layer.fn writev(this: anytype, iovecs: []const std.os.iovec_const) WriteError!usize
Returns the number of bytes read, which may be less than the buffer space provi…
Returns the number of bytes read, which may be less than the buffer space provided. A short read does not indicate end-of-stream.
fn writevAll(this: anytype, iovecs: []std.os.iovec_const) WriteError!usize
Returns the number of bytes read, which may be less than the buffer space provi…
Returns the number of bytes read, which may be less than the buffer space provided, indicating end-of-stream. The
iovecs
parameter is mutable in case this function needs to mutate the fields in order to handle partial writes from the underlying layer.