Struct seamless::api::RouteInfo[][src]

pub struct RouteInfo {
    pub name: String,
    pub method: String,
    pub description: String,
    pub request_type: ApiBodyInfo,
    pub response_type: ApiBodyInfo,
}
Expand description

Information about a single route.

Fields

name: String

The name/path that the http::Request needs to contain in order to match this route.

method: String

The HTTP method expected in order for a http::Request to match this route, as a string.

description: String

The description of the route as set by RouteBuilder::description()

request_type: ApiBodyInfo

The shape of the data expected to be provided as part of the http::Request for this route. This doesn’t care about the wire format that the data is provided in, though the type information is somewhat related to what the possible types that can be sent and received via JSON.

Types can use the crate::ApiBody macro, or implement crate::api::ApiBody manually in order to describe the shape and documentation that they should hand back.

response_type: ApiBodyInfo

The shape of the data that is returned from this API route.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Serialize this value into the given Serde serializer. Read more

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 resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

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.