[][src]Struct seamless::router::RouteInfo

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

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: ApiBodyType

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 (be is JSON or other).

If the handler function for the route asks for something of type Json<T>, then the data will be expected to be provided as JSON. However, it is up to the type that implements Body to decide on the expected wire format.

response_type: ApiBodyType

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

Trait Implementations

impl Clone for RouteInfo[src]

impl Debug for RouteInfo[src]

impl Serialize for RouteInfo[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.