MCPcopy Create free account
hub / github.com/HFQR/xitca-web / handler

Function handler

http/src/util/service/handler.rs:354–368  ·  view source on GitHub ↗
(
        method: &Method,
        addr: &SocketAddr,
        uri: &Uri,
        headers: &HeaderMap,
        (_, ext): (&Request<RequestExt<()>>, &Extensions),
    )

Source from the content-addressed store, hash-verified

352 use super::*;
353
354 async fn handler(
355 method: &Method,
356 addr: &SocketAddr,
357 uri: &Uri,
358 headers: &HeaderMap,
359 (_, ext): (&Request<RequestExt<()>>, &Extensions),
360 ) -> StatusCode {
361 assert_eq!(method, Method::GET);
362 assert_eq!(*addr, unspecified_socket_addr());
363 assert_eq!(uri.path(), "/");
364 assert!(headers.is_empty());
365 assert!(ext.is_empty());
366
367 StatusCode::MULTI_STATUS
368 }
369
370 impl Responder<Request<RequestExt<()>>> for StatusCode {
371 type Response = Response<()>;

Callers 1

router_nestFunction · 0.70

Calls

no outgoing calls

Tested by 1

router_nestFunction · 0.56