Skip to content

Commit

Permalink
fix: move incoming value ownership on consumption
Browse files Browse the repository at this point in the history
Signed-off-by: Roman Volosatovs <[email protected]>
  • Loading branch information
rvolosatovs committed Feb 12, 2024
1 parent 7f749c8 commit 4170216
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions wit/types.wit
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,14 @@ interface types {
resource incoming-value {
/// Consumes the value synchronously and returns the value as a list of bytes.
/// If any other error occurs, it returns an `Err(error)`.
incoming-value-consume-sync: func() -> result<incoming-value-sync-body, error>;
incoming-value-consume-sync: static func(this: incoming-value) -> result<incoming-value-sync-body, error>;
/// Consumes the value asynchronously and returns the value as an `input-stream`.
/// If any other error occurs, it returns an `Err(error)`.
incoming-value-consume-async: func() -> result<incoming-value-async-body, error>;
incoming-value-consume-async: static func(this: incoming-value) -> result<incoming-value-async-body, error>;
/// The size of the value in bytes.
/// If the size is unknown or unavailable, this function returns an `Err(error)`.
incoming-value-size: func() -> result<u64, error>;
}
type incoming-value-async-body = input-stream;
type incoming-value-sync-body = list<u8>;
}
}

0 comments on commit 4170216

Please sign in to comment.