MCPcopy Create free account
hub / github.com/SeaQL/sea-orm / from_request

Method from_request

sea-orm-rocket/lib/src/database.rs:261–266  ·  view source on GitHub ↗
(req: &'r Request<'_>)

Source from the content-addressed store, hash-verified

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
269impl<D: Database> Sentinel for Connection<'_, D> {

Callers

nothing calls this directly

Calls 4

ConnectionClass · 0.85
borrowMethod · 0.80
ErrorEnum · 0.70
fetchFunction · 0.50

Tested by

no test coverage detected