1 package cm
2 3 // Future represents the Component Model [future] type.
4 // A future is a special case of stream. In non-error cases,
5 // a future delivers exactly one value before being automatically closed.
6 //
7 // [future]: https://github.com/WebAssembly/component-model/blob/main/design/mvp/Explainer.md#asynchronous-value-types
8 type Future[T any] struct {
9 _ HostLayout
10 future[T]
11 }
12 13 type future[T any] uint32
14 15 // TODO: implement methods on type future
16