union State [src]

Fields

noneEnd of connection signals the end of the stream.
content_length: u64As a debugging utility, counts down to zero as bytes are written.
chunk_len: usizeEach chunk is wrapped in a header and trailer. This length is the the number of bytes to be written before the next header. This includes +2 for the \r\n trailer and is zero for the beginning of the stream.
endCleanly finished stream; connection can be reused.

Members

Source

pub const State = union(enum) { /// End of connection signals the end of the stream. none, /// As a debugging utility, counts down to zero as bytes are written. content_length: u64, /// Each chunk is wrapped in a header and trailer. /// This length is the the number of bytes to be written before the /// next header. This includes +2 for the `\r\n` trailer and is zero /// for the beginning of the stream. chunk_len: usize, /// Cleanly finished stream; connection can be reused. end, pub const init_chunked: State = .{ .chunk_len = 0 }; }