This repository has been archived by the owner on Oct 13, 2024. It is now read-only.
forked from bytecodealliance/go-modules
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patherror.wit.go
50 lines (44 loc) · 1.69 KB
/
error.wit.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
// This file is generated by hand, as part of designing wit-bindgen-go. PLEASE EDIT.
package error
import (
_ "unsafe"
"github.com/ydnar/wasm-tools-go/cm"
)
// Error represents the resource "wasi:io/error.error".
//
// A resource which represents some error information.
//
// The only method provided by this resource is `to-debug-string`,
// which provides some human-readable information about the error.
//
// In the `wasi:io` package, this resource is returned through the
// `wasi:io/streams/stream-error` type.
//
// To provide more specific error information, other interfaces may
// provide functions to further "downcast" this error into more specific
// error information. For example, `error`s returned in streams derived
// from filesystem types to be described using the filesystem's own
// error-code type, using the function
// `wasi:filesystem/types/filesystem-error-code`, which takes a parameter
// `borrow<error>` and returns
// `option<wasi:filesystem/types/error-code>`.
//
// The set of functions which can "downcast" an `error` into a more
// concrete type is open.
type Error cm.Resource
// ToDebugString represents the method "wasi:io/error.error#to-debug-string".
//
// Returns a string that is suitable to assist humans in debugging
// this error.
//
// WARNING: The returned string should not be consumed mechanically!
// It may change across platforms, hosts, or other implementation
// details. Parsing this string is a major platform-compatibility
// hazard.
func (self Error) ToDebugString() string {
var ret string
self.to_debug_string(&ret)
return ret
}
//go:wasmimport wasi:io/[email protected] [method]error.to-debug-string
func (self Error) to_debug_string(ret *string)