Deserializes a `Request` from a `Read` impl providing JSON events. # Example ```rust,no_run use lambda_http::request::from_reader; use std::fs::File; use std::error::Error; fn main() -> Result<(), Box > { let request = from_reader( File::open("path/to/request.json")? )?; Ok(println!("{:#?}", request)) } ```
(rdr: R)
| 503 | /// } |
| 504 | /// ``` |
| 505 | pub fn from_reader<R>(rdr: R) -> Result<crate::Request, JsonError> |
| 506 | where |
| 507 | R: Read, |
| 508 | { |
| 509 | serde_json::from_reader(rdr).map(LambdaRequest::into) |
| 510 | } |
| 511 | |
| 512 | /// Deserializes a `Request` from a string of JSON text. |
| 513 | /// |
no outgoing calls