(req: &'r Request<'_>)
| 259 | type Error = Option<<D::Pool as Pool>::Error>; |
| 260 | |
| 261 | async fn from_request(req: &'r Request<'_>) -> Outcome<Self, Self::Error> { |
| 262 | match D::fetch(req.rocket()) { |
| 263 | Some(pool) => Outcome::Success(Connection(pool.borrow())), |
| 264 | None => Outcome::Error((Status::InternalServerError, None)), |
| 265 | } |
| 266 | } |
| 267 | } |
| 268 | |
| 269 | impl<D: Database> Sentinel for Connection<'_, D> { |
nothing calls this directly
no test coverage detected