//! Main library entry point for openapi_client implementation. mod server; mod errors { error_chain!{} } pub use self::errors::*; use std::io; use std::clone::Clone; use std::marker::PhantomData; use hyper; use openapi_client; use swagger::{Has, XSpanIdString}; pub struct NewService{ marker: PhantomData } impl NewService{ pub fn new() -> Self { NewService{marker:PhantomData} } } impl hyper::server::NewService for NewService where C: Has + Clone + 'static { type Request = (hyper::Request, C); type Response = hyper::Response; type Error = hyper::Error; type Instance = openapi_client::server::Service, C>; /// Instantiate a new server. fn new_service(&self) -> io::Result { Ok(openapi_client::server::Service::new(server::Server::new())) } }