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()
Auto Trait Implementations§
impl<T> !Freeze for InstantiationError<T>
impl<T> RefUnwindSafe for InstantiationError<T>where
T: RefUnwindSafe,
impl<T> Send for InstantiationError<T>where
T: Send,
impl<T> Sync for InstantiationError<T>where
T: Sync,
impl<T> Unpin for InstantiationError<T>where
T: Unpin,
impl<T> UnsafeUnpin for InstantiationError<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for InstantiationError<T>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<T> ErasedDestructor for Twhere
T: 'static,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more