pub struct InstantiationError<T> {
pub request_id: T,
pub request: Mutex<Request>,
pub error: Arc<Error>,
}component-model-async only.Expand description
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.
Fields§
§request_id: TThe ID of the request which was originally configured,
request: Mutex<Request>The original request passed to ProxyHandler::handle.
This is wrapped in a Mutex to satisfy the Send + Sync bounds
required by wasmtime::Error.
error: Arc<Error>The original instantiation error.
This is wrapped in an Arc because a single instantiation error may
affect multiple requests, and each caller will be given a clone.
Trait Implementations§
Source§impl<T> Debug for InstantiationError<T>
impl<T> Debug for InstantiationError<T>
Source§impl<T> Display for InstantiationError<T>
impl<T> Display for InstantiationError<T>
Source§impl<T> Error for InstantiationError<T>
impl<T> Error for InstantiationError<T>
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()