lambda_runtime_errors/
error_ext_impl.rs

1// Generated code, DO NOT MODIFY!
2// This file contains the implementation of the LambdaErrorExt
3// trait for most of the standard library errors as well as the
4// implementation of the From trait for the HandlerError struct
5// to support the same standard library errors.
6
7use crate::{HandlerError, LambdaErrorExt};
8use std::{
9    alloc::LayoutErr,
10    cell::{BorrowError, BorrowMutError},
11    char::{DecodeUtf16Error, ParseCharError},
12    env::{JoinPathsError, VarError},
13    ffi::{FromBytesWithNulError, IntoStringError, NulError},
14    net::AddrParseError,
15    num::{ParseFloatError, ParseIntError},
16    path::StripPrefixError,
17    str::{ParseBoolError, Utf8Error},
18    string::{FromUtf16Error, FromUtf8Error, ParseError},
19    sync::mpsc::{RecvError, RecvTimeoutError, TryRecvError},
20    time::SystemTimeError,
21};
22
23impl LambdaErrorExt for VarError {
24    fn error_type(&self) -> &str {
25        "std::env::VarError"
26    }
27}
28impl LambdaErrorExt for ParseError {
29    fn error_type(&self) -> &str {
30        "std::string::ParseError"
31    }
32}
33impl LambdaErrorExt for RecvTimeoutError {
34    fn error_type(&self) -> &str {
35        "std::sync::mpsc::RecvTimeoutError"
36    }
37}
38impl LambdaErrorExt for TryRecvError {
39    fn error_type(&self) -> &str {
40        "std::sync::mpsc::TryRecvError"
41    }
42}
43impl LambdaErrorExt for LayoutErr {
44    fn error_type(&self) -> &str {
45        "std::alloc::LayoutErr"
46    }
47}
48impl LambdaErrorExt for BorrowError {
49    fn error_type(&self) -> &str {
50        "std::cell::BorrowError"
51    }
52}
53impl LambdaErrorExt for BorrowMutError {
54    fn error_type(&self) -> &str {
55        "std::cell::BorrowMutError"
56    }
57}
58impl LambdaErrorExt for DecodeUtf16Error {
59    fn error_type(&self) -> &str {
60        "std::char::DecodeUtf16Error"
61    }
62}
63impl LambdaErrorExt for ParseCharError {
64    fn error_type(&self) -> &str {
65        "std::char::ParseCharError"
66    }
67}
68impl LambdaErrorExt for JoinPathsError {
69    fn error_type(&self) -> &str {
70        "std::env::JoinPathsError"
71    }
72}
73impl LambdaErrorExt for FromBytesWithNulError {
74    fn error_type(&self) -> &str {
75        "std::ffi::FromBytesWithNulError"
76    }
77}
78impl LambdaErrorExt for IntoStringError {
79    fn error_type(&self) -> &str {
80        "std::ffi::IntoStringError"
81    }
82}
83impl LambdaErrorExt for NulError {
84    fn error_type(&self) -> &str {
85        "std::ffi::NulError"
86    }
87}
88impl LambdaErrorExt for AddrParseError {
89    fn error_type(&self) -> &str {
90        "std::net::AddrParseError"
91    }
92}
93impl LambdaErrorExt for ParseFloatError {
94    fn error_type(&self) -> &str {
95        "std::num::ParseFloatError"
96    }
97}
98impl LambdaErrorExt for ParseIntError {
99    fn error_type(&self) -> &str {
100        "std::num::ParseIntError"
101    }
102}
103impl LambdaErrorExt for StripPrefixError {
104    fn error_type(&self) -> &str {
105        "std::path::StripPrefixError"
106    }
107}
108impl LambdaErrorExt for ParseBoolError {
109    fn error_type(&self) -> &str {
110        "std::str::ParseBoolError"
111    }
112}
113impl LambdaErrorExt for Utf8Error {
114    fn error_type(&self) -> &str {
115        "std::str::Utf8Error"
116    }
117}
118impl LambdaErrorExt for FromUtf16Error {
119    fn error_type(&self) -> &str {
120        "std::string::FromUtf16Error"
121    }
122}
123impl LambdaErrorExt for FromUtf8Error {
124    fn error_type(&self) -> &str {
125        "std::string::FromUtf8Error"
126    }
127}
128impl LambdaErrorExt for RecvError {
129    fn error_type(&self) -> &str {
130        "std::sync::mpsc::RecvError"
131    }
132}
133impl LambdaErrorExt for SystemTimeError {
134    fn error_type(&self) -> &str {
135        "std::time::SystemTimeError"
136    }
137}
138impl From<VarError> for HandlerError {
139    fn from(e: VarError) -> Self {
140        HandlerError::new(e)
141    }
142}
143impl From<ParseError> for HandlerError {
144    fn from(e: ParseError) -> Self {
145        HandlerError::new(e)
146    }
147}
148impl From<RecvTimeoutError> for HandlerError {
149    fn from(e: RecvTimeoutError) -> Self {
150        HandlerError::new(e)
151    }
152}
153impl From<TryRecvError> for HandlerError {
154    fn from(e: TryRecvError) -> Self {
155        HandlerError::new(e)
156    }
157}
158impl From<LayoutErr> for HandlerError {
159    fn from(e: LayoutErr) -> Self {
160        HandlerError::new(e)
161    }
162}
163impl From<BorrowError> for HandlerError {
164    fn from(e: BorrowError) -> Self {
165        HandlerError::new(e)
166    }
167}
168impl From<BorrowMutError> for HandlerError {
169    fn from(e: BorrowMutError) -> Self {
170        HandlerError::new(e)
171    }
172}
173impl From<DecodeUtf16Error> for HandlerError {
174    fn from(e: DecodeUtf16Error) -> Self {
175        HandlerError::new(e)
176    }
177}
178impl From<ParseCharError> for HandlerError {
179    fn from(e: ParseCharError) -> Self {
180        HandlerError::new(e)
181    }
182}
183impl From<JoinPathsError> for HandlerError {
184    fn from(e: JoinPathsError) -> Self {
185        HandlerError::new(e)
186    }
187}
188impl From<FromBytesWithNulError> for HandlerError {
189    fn from(e: FromBytesWithNulError) -> Self {
190        HandlerError::new(e)
191    }
192}
193impl From<IntoStringError> for HandlerError {
194    fn from(e: IntoStringError) -> Self {
195        HandlerError::new(e)
196    }
197}
198impl From<NulError> for HandlerError {
199    fn from(e: NulError) -> Self {
200        HandlerError::new(e)
201    }
202}
203impl From<AddrParseError> for HandlerError {
204    fn from(e: AddrParseError) -> Self {
205        HandlerError::new(e)
206    }
207}
208impl From<ParseFloatError> for HandlerError {
209    fn from(e: ParseFloatError) -> Self {
210        HandlerError::new(e)
211    }
212}
213impl From<ParseIntError> for HandlerError {
214    fn from(e: ParseIntError) -> Self {
215        HandlerError::new(e)
216    }
217}
218impl From<StripPrefixError> for HandlerError {
219    fn from(e: StripPrefixError) -> Self {
220        HandlerError::new(e)
221    }
222}
223impl From<ParseBoolError> for HandlerError {
224    fn from(e: ParseBoolError) -> Self {
225        HandlerError::new(e)
226    }
227}
228impl From<Utf8Error> for HandlerError {
229    fn from(e: Utf8Error) -> Self {
230        HandlerError::new(e)
231    }
232}
233impl From<FromUtf16Error> for HandlerError {
234    fn from(e: FromUtf16Error) -> Self {
235        HandlerError::new(e)
236    }
237}
238impl From<FromUtf8Error> for HandlerError {
239    fn from(e: FromUtf8Error) -> Self {
240        HandlerError::new(e)
241    }
242}
243impl From<RecvError> for HandlerError {
244    fn from(e: RecvError) -> Self {
245        HandlerError::new(e)
246    }
247}
248impl From<SystemTimeError> for HandlerError {
249    fn from(e: SystemTimeError) -> Self {
250        HandlerError::new(e)
251    }
252}