Trait HttpService
trait HttpService<ReqBody>: sealed::Sealed<ReqBody>
An asynchronous function from Request to Response.
Associated Types
type ResBody: TraitBound { trait_: Path { path: "Body", id: Id(59), args: None }, generic_params: [], modifier: None }The
Bodybody of thehttp::Response.type Error: TraitBound { trait_: Path { path: "Into", id: Id(28), args: Some(AngleBracketed { args: [Type(ResolvedPath(Path { path: "Box", id: Id(263), args: Some(AngleBracketed { args: [Type(DynTrait(DynTrait { traits: [PolyTrait { trait_: Path { path: "StdError", id: Id(128), args: None }, generic_params: [] }, PolyTrait { trait_: Path { path: "Send", id: Id(5), args: None }, generic_params: [] }, PolyTrait { trait_: Path { path: "Sync", id: Id(7), args: None }, generic_params: [] }], lifetime: None }))], constraints: [] }) }))], constraints: [] }) }, generic_params: [], modifier: None }The error type that can occur within this
Service.Note: Returning an
Errorto a hyper server will cause the connection to be abruptly aborted. In most cases, it is better to return aResponsewith a 4xx or 5xx status code.type Future: TraitBound { trait_: Path { path: "Future", id: Id(268), args: Some(AngleBracketed { args: [], constraints: [AssocItemConstraint { name: "Output", args: None, binding: Equality(Type(ResolvedPath(Path { path: "Result", id: Id(34), args: Some(AngleBracketed { args: [Type(ResolvedPath(Path { path: "Response", id: Id(398), args: Some(AngleBracketed { args: [Type(QualifiedPath { name: "ResBody", args: None, self_type: Generic("Self"), trait_: Some(Path { path: "", id: Id(399), args: None }) })], constraints: [] }) })), Type(QualifiedPath { name: "Error", args: None, self_type: Generic("Self"), trait_: Some(Path { path: "", id: Id(399), args: None }) })], constraints: [] }) }))) }] }) }, generic_params: [], modifier: None }The
Futurereturned by thisService.
Implementors
impl<T, B1, B2> HttpService for T