Skip to main content

Crate fetchlet_web

Crate fetchlet_web 

Source
Expand description

Host implementations of Web APIs for fetchlet guests.

The guest runtime calls these as host operations: a name, a JSON message and byte-store handles. They depend on no JavaScript engine, so QuickJS, Boa and V8 share one implementation of each API.

Structs§

Decompressor
The streaming decompressor of DecompressionStream, for host code such as an HTTP client that decodes a Content-Encoding.
Invocation
The current invocation: its Web API state and its byte store.
WebLimits
Caller budgets for Web API operations. Each is unlimited when None; the embedder owns the values and documents them with its other limits.
WebState
Web API state that belongs to one invocation, such as open compression streams. The embedder creates it when an invocation begins and drops it when the invocation ends, which releases everything it holds.

Enums§

CompressionFormat
A compression format of Decompressor, as the Compression Standard names them.
Error
A failed Web API operation. Embedders map each kind onto their own guest-visible error codes.

Constants§

PROTOCOL_VERSION
The version of the operation names and messages. The guest runtime uses host implementations only when it was built for the same version.

Traits§

ByteHandles
The embedder’s byte store for the current invocation, which carries binary data between the guest and the host by handle.

Functions§

capabilities
The Web APIs this build implements, reported by the web.capabilities operation so the guest runtime installs only those globals.
dispatch
Run a Web API operation, or return None when operation is not one, so the embedder can route its own operations.

Type Aliases§

Result