actix-type-util 0.1.0

Crate with some useful types for working with actix-web
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use actix_web::body::BoxBody;
use actix_web::{HttpRequest, HttpResponse, Responder};

/// An empty response
pub struct Empty;

impl Responder for Empty {
    type Body = BoxBody;

    fn respond_to(self, _: &HttpRequest) -> HttpResponse<Self::Body> {
        HttpResponse::Ok().finish()
    }
}