Skip to main content

Module response

Module response 

Source
Expand description

Explicit response values.

A handler may return a plain value, which is sent as 200, or one of these results when it needs to control the status code or the headers.

Structs§

LinoResult
A handler result carrying a status code and headers alongside the value.

Enums§

Body
The body of a response: a value to encode, or nothing at all.

Functions§

accepted
A 202 Accepted carrying a value.
created
A 201 Created carrying a value and a Location.
no_content
A 204 No Content.
ok
A 200 OK carrying a value.
raw_response
A response whose body is already encoded, bypassing negotiation.
status
A response with an explicit status code and a value.
status_empty
A response with an explicit status code and no body.