Skip to content

Commit 3ffd6b1

Browse files
committed
Change future-trailers.get to return successfully at most once.
1 parent 2befff6 commit 3ffd6b1

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

wit/types.wit

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -437,16 +437,20 @@ interface types {
437437
/// The outer `option` represents future readiness. Users can wait on this
438438
/// `option` to become `some` using the `subscribe` method.
439439
///
440-
/// The `result` represents that either the HTTP Request or Response body,
441-
/// as well as any trailers, were received successfully, or that an error
442-
/// occured receiving them. The optional `trailers` indicates whether or not
443-
/// trailers were present in the body.
440+
/// The outer `result` is used to retrieve the trailers or error at most
441+
/// once. It will be success on the first call in which the outer option
442+
/// is `some`, and error on subsequent calls.
443+
///
444+
/// The inner `result` represents that either the HTTP Request or Response
445+
/// body, as well as any trailers, were received successfully, or that an
446+
/// error occured receiving them. The optional `trailers` indicates whether
447+
/// or not trailers were present in the body.
444448
///
445449
/// When some `trailers` are returned by this method, the `trailers`
446450
/// resource is immutable, and a child. Use of the `set`, `append`, or
447451
/// `delete` methods will return an error, and the resource must be
448452
/// dropped before the parent `future-trailers` is dropped.
449-
get: func() -> option<result<option<trailers>, error-code>>;
453+
get: func() -> option<result<result<option<trailers>, error-code>>>;
450454
}
451455

452456
/// Represents an outgoing HTTP Response.

0 commit comments

Comments
 (0)