//! Main library entry point for timezynk_bridge_models 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 timezynk_bridge_models; 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 = timezynk_bridge_models::server::Service, C>; /// Instantiate a new server. fn new_service(&self) -> io::Result { Ok(timezynk_bridge_models::server::Service::new(server::Server::new())) } }