struct

HTTP2::Connection::FieldSection

Inherits Struct < Value < Object

One fully decompressed field section and its opening-frame metadata.

Constructors

new(block : FieldBlock, fields : Array(DecodedHeaderField), decoded_size : UInt64, parsed_response : HTTPSemantics::ResponseSection | Nil = nil, parsed_trailers : Headers | Nil = nil)
Source
new(section : FieldSection, parsed_response : HTTPSemantics::ResponseSection | Nil = nil, parsed_trailers : Headers | Nil = nil)

Builds a copy of section with a validator's parse result attached. FieldSection is a struct that flows through the stream event channel, so the delivered event has to be built fresh here rather than mutated in place — every getter above is read-only, so there is nothing on the original to mutate anyway.

Source

Instance methods

continuation_count
Source
decoded_size
Source
end_stream?
Source
fields
Source
kind
Source
parsed_response

The connection-side ResponseValidator's already-parsed result for this section, attached (see the second initialize below) by Connection#transition_and_deliver once validation completes — parsed_response for a response's leading field section, parsed_trailers for its trailer section, never both. Both stay nil when no validator ran (server mode, or validation disabled) or for a PUSH_PROMISE section, which is never routed through the validator at all; the consumer (Client#await_response / its trailer counterpart) falls back to parsing fields itself in that case. Safe to read from a fiber other than the one that attached it: HTTPSemantics::ResponseSection is an immutable record, and the attached Headers is handed over only after HTTPSemantics.validate_trailers has finished building it and never mutated afterward — the validator that built it discards its own reference, and this struct exposes it via a read-only getter with no mutator, so there is no writer left to race the client's read.

Source
parsed_trailers
Source
priority
Source
promised_stream_id
Source
stream_id
Source