diff --git a/imports.md b/imports.md index f494ad3..9b9a73d 100644 --- a/imports.md +++ b/imports.md @@ -2,12 +2,12 @@
wasi:io/error@0.2.2
wasi:sockets/network@0.2.2
wasi:sockets/instance-network@0.2.2
wasi:io/poll@0.2.2
wasi:sockets/udp@0.2.2
wasi:sockets/udp-create-socket@0.2.2
wasi:io/error@0.2.2
wasi:io/streams@0.2.2
wasi:clocks/monotonic-clock@0.2.2
wasi:sockets/tcp@0.2.2
resource 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
+offer functions to "downcast" this error into more specific types. For example,
+errors returned from streams derived from filesystem types can be described using
+the filesystem's own error-code type. This is done using the function
+wasi:filesystem/types/filesystem-error-code
, which takes a borrow<error>
+parameter and returns an option<wasi:filesystem/types/error-code>
.
error
into a more
+concrete type is open.[method]error.to-debug-string: func
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.
+self
: borrow<error
>resource network
type error
An opaque resource that represents access to (a subset of) the network. This enables context-based security for networking. There is no need for this to map 1:1 to a physical network interface.
@@ -209,6 +245,25 @@ supported size.ipv4
: ipv4-socket-address
ipv6
: ipv6-socket-address
network-error-code: func
Attempts to extract a network-related error-code
from the stream
+error
provided.
Stream operations which return stream-error::last-operation-failed
+have a payload with more information about the operation that failed.
+This payload can be passed through to this function to see if there's
+network-related information about the error to return.
Note that this function is fallible because not all stream-related +errors are network-related errors.
+err
: borrow<error
>error-code
>This interface provides a value-export of the default network handle..
[method]udp-socket.subscribe: func
Create a pollable
which will resolve once the socket is ready for I/O.
Note: this function is here for WASI Preview2 only. +
Note: this function is here for WASI 0.2 only.
It's planned to be removed when future
is natively supported in Preview3.
error(would-block)
.
[method]incoming-datagram-stream.subscribe: func
Create a pollable
which will resolve once the stream is ready to receive again.
Note: this function is here for WASI Preview2 only. +
Note: this function is here for WASI 0.2 only.
It's planned to be removed when future
is natively supported in Preview3.
check-send
was not called or datagrams
contains
[method]outgoing-datagram-stream.subscribe: func
Create a pollable
which will resolve once the stream is ready to send again.
Note: this function is here for WASI Preview2 only. +
Note: this function is here for WASI 0.2 only.
It's planned to be removed when future
is natively supported in Preview3.
udp-socket
>, error-code
>resource 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
-offer functions to "downcast" this error into more specific types. For example,
-errors returned from streams derived from filesystem types can be described using
-the filesystem's own error-code type. This is done using the function
-wasi:filesystem/types/filesystem-error-code
, which takes a borrow<error>
-parameter and returns an option<wasi:filesystem/types/error-code>
.
error
into a more
-concrete type is open.[method]error.to-debug-string: func
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.
-self
: borrow<error
>WASI I/O is an I/O abstraction API which is currently focused on providing stream types.
@@ -1705,7 +1727,7 @@ in progress at the time of callingsubscribe
(if any). Theoreticall
(re)used for the remainder of the socket's lifetime.
See https://github.com/WebAssembly/wasi-sockets/blob/main/TcpSocketOperationalSemantics.md#pollable-readiness for more information.
-Note: this function is here for WASI Preview2 only. +
Note: this function is here for WASI 0.2 only.
It's planned to be removed when future
is natively supported in Preview3.
none
.
[method]resolve-address-stream.subscribe: func
Create a pollable
which will resolve once the stream is ready for I/O.
Note: this function is here for WASI Preview2 only. +
Note: this function is here for WASI 0.2 only.
It's planned to be removed when future
is natively supported in Preview3.