lambda_extension/
error.rs1pub type Error = lambda_runtime_api_client::BoxError;
3
4#[derive(Clone, Debug, PartialEq, Eq)]
6pub struct ExtensionError {
7 err: String,
8}
9
10impl ExtensionError {
11 pub(crate) fn boxed<T: Into<String>>(str: T) -> Box<ExtensionError> {
12 Box::new(ExtensionError { err: str.into() })
13 }
14}
15
16impl std::fmt::Display for ExtensionError {
17 #[inline]
18 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
19 self.err.fmt(f)
20 }
21}
22
23impl std::error::Error for ExtensionError {}