Function trillium_api::api[][src]

pub fn api<F, Fut, BodyType>(handler_fn: F) -> ApiHandler<F, BodyType> where
    BodyType: DeserializeOwned + Send + Sync + 'static,
    F: Fn(Conn, BodyType) -> Fut + Send + Sync + 'static,
    Fut: Future<Output = Conn> + Send + 'static, 
Expand description

Convenience function to build a trillium api handler. This is an alias for ApiHandler::new.