pub struct HalResponse {
    pub hal: Hal,
    pub status_code: StatusCode,
    pub headers: HeaderMap,
}
Expand description

Representation of a HAL or HAL-FORMS response that can be returned to a client.

Fields§

§hal: Hal§status_code: StatusCode§headers: HeaderMap

Implementations§

Add a new link to a HAL document.

Add a new link to a HAL document.

Add a new embedded HAL document to the HAL document.

Add a new embedded HAL document to the HAL document.

Add a new action template to the HAL-FORMS document.

Add a new action template to the HAL-FORMS document.

Specify the status code of the HTTP response.

Specify an HTTP Header to include in the response.

Parameters
  • header - The header to include.

Trait Implementations§

The resulting type after dereferencing.
Dereferences the value.

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

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

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.