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,
}

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

impl Clone for RouteInfo[src]

impl Debug for RouteInfo[src]

impl PartialEq<RouteInfo> for RouteInfo[src]

impl Serialize for RouteInfo[src]

impl StructuralPartialEq 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.