pub struct JSONResponse;
Expand description

JSONResponse

Helpful tool for converting a serde_json json string into a response.

It will take in the response code, and create a response string with the headers required.

See the examples for usage

Implementations

This function takes the response code and data (the json) to write, and returns a string that can be used as a response.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.