Available on crate feature
component-model-async only.Expand description
Provides utilities useful for dispatching incoming HTTP requests
wasi:http/handler guest instances.
Structs§
- Expiration
Error - Returned when the guest failed to produce a response before the expiration
returned by
HandlerState::on_request_startelapsed. - Instance
- Represents the combination of a store and instance with which to handle requests.
- Instantiation
Error - This error is returned if, when handling the request, a new worker and associated instance needed to be created, but instantiation failed, e.g. due to reaching a pooling allocator limit or running out of memory. In this case, the caller may be able to recover and retry (e.g. after waiting for existing instances to be dropped and/or freeing memory used by caches, etc.). Otherwise, it will probably need to return an HTTP 500 error.
- Proxy
Handler - Represents the state of a web server.
- Trap
OrPanic Error - A worker trapped or panicked and failed to produce a result.
Enums§
- Error
Code - Represents either a
wasi:http/types@0.2.xorwasi:http/types@0.3.xerror-code. - Prepared
- Representation of a “prepared” call for a guest, used to extract the
GuestTaskIdbefore actually executing any handlers. - Proxy
- Represents either a
wasi:http/incoming-handler@0.2.xorwasi:http/handler@0.3.xinstance. - Proxy
Pre - Represents either a
wasi:http/incoming-handler@0.2.xorwasi:http/handler@0.3.xpre-instance. - Should
Accept - Indicates whether a worker should accept new requests.
- ViewFn
- Represents either a p2 or p3
WasiHttpCtxViewgetter. - Worker
Status - Represents the status of a
ProxyHandlerworker task.
Traits§
- Handler
State - Represents the application-specific state of a web server.
- Worker
Expiration - Represents the application-specific state of a
ProxyHandlerworker. - Worker
State - Represents the application-specific state of a
ProxyHandlerworker.