Fields, timeout, and incoming handler signature changes #66
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR includes a number of changes that we've discussed independently, all bundled up into one:
request-options
record has been turned into a resource, which allows for two new capabilities: embedders can clearly indicate when timeouts are not supported by returningNone
from a setter; the spec can evolve without breaking older guests, as new methods can be added without breaking compatibility.response-outparam.set
method has had its result type removed. In general the intent is that any validation of the status code and headers should occur beforeset
is called, and that validation was the only need for the result return type.future-trailers.get
method now returns anoption<trailers>
value on success, which allows for the presence of trailers in hte request to be clearly indicated. Previously the absence of trailers was indicated by returning an emptyfields
, and now it's indicated by returning anone
value.fields.set
andfields.append
methods have had their return values modified to indicate potential failure, which is allowed to happen in the cases outlined by theheader-error
variant. Additionally, as we now can raise errors for header names and values, the constructor has been modified to no longer accept a list of key/value pairs. Thefields.from-list
method was added to allow for this use-case, and returns a result that can indicate if there was a problem with one of the header name/value entries.