[][src]Struct seamless::router::Json

pub struct Json<T> {
    pub json: T,
}

If the last argument to the handler is this, we'll assume that the user needs to provide JSON that decodes to T. Notably, T needs to implement ApiBody with the Deserialize option.

Fields

json: T

the type that has been deserialized from JSON.

Trait Implementations

impl<T> ApiBody for Json<T> where
    T: ApiBody
[src]

impl<T> Body for Json<T> where
    T: DeserializeOwned
[src]

type Error = ApiError

The type of the error returned if Self::get_body() fails.

Auto Trait Implementations

impl<T> RefUnwindSafe for Json<T> where
    T: RefUnwindSafe
[src]

impl<T> Send for Json<T> where
    T: Send
[src]

impl<T> Sync for Json<T> where
    T: Sync
[src]

impl<T> Unpin for Json<T> where
    T: Unpin
[src]

impl<T> UnwindSafe for Json<T> where
    T: UnwindSafe
[src]

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