[docs]@custom_type(future_to_hugr,copyable=False,droppable=False,params=_future_params)classFuture(Generic[T]):# type: ignore[misc]"""A value of type `T` that is computed asynchronously."""
[docs]@hugr_op(future_op("Read"))@no_type_checkdefread(self:"Future[T]"@owned)->T:"""Reads a value from a future, consuming it."""
[docs]@hugr_op(future_op("Dup"))@no_type_checkdefcopy(self:"Future[T]")->"Future[T]":"""Duplicate a future."""
[docs]@hugr_op(future_op("Free"))@no_type_checkdefdiscard(self:"Future[T]"@owned)->None:"""Discards a future without reading it."""