1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-09-02 01:31:57 +02:00

hellper method for json body

This commit is contained in:
Nikolay Kim
2017-11-27 10:39:47 -08:00
parent 42716d3252
commit b5a4f6f855
2 changed files with 43 additions and 4 deletions

View File

@@ -6,7 +6,7 @@ use route::Frame;
/// Represents various types of http message body.
#[derive(Debug)]
#[derive(Debug, PartialEq)]
pub enum Body {
/// Empty response. `Content-Length` header is set to `0`
Empty,
@@ -23,7 +23,7 @@ pub enum Body {
/// Represents various types of binary body.
/// `Content-Length` header is set to length of the body.
#[derive(Debug)]
#[derive(Debug, PartialEq)]
pub enum Binary {
/// Bytes body
Bytes(Bytes),