Zig 0.17.0-dev (Split by item)

Shortcut keys
?
Show these tips
S
Focus search field
Esc
Clear focus & close tips
U
Jump to source code
↑
Move up in search results
↓
Move down in search results
↵
Go to active search result
This is an example of documentation generated by ZigDoc, an alternative to Zig's built-in Auto Doc feature. See also examples in other modes/formats. The project being documented here (as the example) is the Zig standard library. Public Union

State

Public Union
std.http.BodyWriter.State
pub const State = union(enum)

Fields

none: none

End of connection signals the end of the stream.

content_length: u64

As a debugging utility, counts down to zero as bytes are written.

chunk_len: usize

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.

end: end

Cleanly finished stream; connection can be reused.

Values

File

http.zig:761
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
    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 };
    }