//! Server implementation of swagger_client. #![allow(unused_imports)] use futures::{self, Future}; use chrono; use std::collections::HashMap; use swagger; use swagger_client::{Api, ApiError, Context, UploadApiResponse }; use swagger_client::models; #[derive(Copy, Clone)] pub struct Server; impl Api for Server { /// Upload an API fn upload_api(&self, api_and_token: models::ApiAndToken, context: &Context) -> Box + Send> { let context = context.clone(); println!("upload_api({:?}) - X-Span-ID: {:?}", api_and_token, context.x_span_id.unwrap_or(String::from("")).clone()); Box::new(futures::failed("Generic failure".into())) } }