Service pipeline

rust dev.to

In the previous post, we described what a Service is and how to define it. Let's check an example: async fn endpoint(req: HttpRequest) -> ResultHttpResponse, Error> { // Load operation from the request let oper = load_operation(req).await?; // Execute it using our engine let result = execute(oper).await?; // Convert the result into an HTTP response Ok(into_response(result).await?) } This is structurally a sequence of fallible async transformations. The natural

Read Full Tutorial open_in_new
arrow_back Back to Tutorials