wasm-nats-producer-client/gen/wasi/io/poll/poll.wit.go

59 lines
1.3 KiB
Go
Raw Permalink Normal View History

2024-12-14 01:15:08 +00:00
// Code generated by wit-bindgen-go. DO NOT EDIT.
// Package poll represents the imported interface "wasi:io/poll@0.2.0".
package poll
import (
"github.com/bytecodealliance/wasm-tools-go/cm"
)
// Pollable represents the imported resource "wasi:io/poll@0.2.0#pollable".
//
// resource pollable
type Pollable cm.Resource
// ResourceDrop represents the imported resource-drop for resource "pollable".
//
// Drops a resource handle.
//
//go:nosplit
func (self Pollable) ResourceDrop() {
self0 := cm.Reinterpret[uint32](self)
wasmimport_PollableResourceDrop((uint32)(self0))
return
}
// Block represents the imported method "block".
//
// block: func()
//
//go:nosplit
func (self Pollable) Block() {
self0 := cm.Reinterpret[uint32](self)
wasmimport_PollableBlock((uint32)(self0))
return
}
// Ready represents the imported method "ready".
//
// ready: func() -> bool
//
//go:nosplit
func (self Pollable) Ready() (result bool) {
self0 := cm.Reinterpret[uint32](self)
result0 := wasmimport_PollableReady((uint32)(self0))
result = cm.U32ToBool((uint32)(result0))
return
}
// Poll represents the imported function "poll".
//
// poll: func(in: list<borrow<pollable>>) -> list<u32>
//
//go:nosplit
func Poll(in cm.List[Pollable]) (result cm.List[uint32]) {
in0, in1 := cm.LowerList(in)
wasmimport_Poll((*Pollable)(in0), (uint32)(in1), &result)
return
}