Skip to content

Commit a81c61f

Browse files
authored
Merge pull request #111 from dicej/fields-get-and-delete
[0.3.0-draft] add `fields.get-and-delete`
2 parents 13dad38 + 3846d2f commit a81c61f

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

wit-0.3.0-draft/types.wit

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,14 @@ interface types {
198198
/// Fails with `header-error.immutable` if the `fields` are immutable.
199199
delete: func(name: field-key) -> result<_, header-error>;
200200

201+
/// Delete all values for a key. Does nothing if no values for the key
202+
/// exist.
203+
///
204+
/// Returns all values previously corresponding to the key, if any.
205+
///
206+
/// Fails with `header-error.immutable` if the `fields` are immutable.
207+
get-and-delete: func(name: field-key) -> result<list<field-value>, header-error>;
208+
201209
/// Append a value for a key. Does not change or delete any existing
202210
/// values for that key.
203211
///

0 commit comments

Comments
 (0)