From c0ad5f80c13fc66240a17e59dfff559c6967aac7 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Wed, 18 Sep 2019 20:05:39 -0700 Subject: rust codegen (with rustfix, compiles 2018 edition) --- rust/fatcat-openapi/examples/server_lib/server.rs | 206 ++++++++++++---------- 1 file changed, 109 insertions(+), 97 deletions(-) (limited to 'rust/fatcat-openapi/examples/server_lib/server.rs') diff --git a/rust/fatcat-openapi/examples/server_lib/server.rs b/rust/fatcat-openapi/examples/server_lib/server.rs index 966381e4..838bd63d 100644 --- a/rust/fatcat-openapi/examples/server_lib/server.rs +++ b/rust/fatcat-openapi/examples/server_lib/server.rs @@ -9,8 +9,8 @@ use std::collections::HashMap; use swagger; -use fatcat::models; -use fatcat::{ +use fatcat_openapi::models; +use fatcat_openapi::{ AcceptEditgroupResponse, Api, ApiError, AuthCheckResponse, AuthOidcResponse, Context, CreateAuthTokenResponse, CreateContainerAutoBatchResponse, CreateContainerResponse, CreateCreatorAutoBatchResponse, CreateCreatorResponse, CreateEditgroupAnnotationResponse, CreateEditgroupResponse, CreateFileAutoBatchResponse, CreateFileResponse, CreateFilesetAutoBatchResponse, CreateFilesetResponse, CreateReleaseAutoBatchResponse, CreateReleaseResponse, CreateWebcaptureAutoBatchResponse, CreateWebcaptureResponse, CreateWorkAutoBatchResponse, CreateWorkResponse, @@ -31,19 +31,19 @@ use fatcat::{ pub struct Server; impl Api for Server { - fn auth_check(&self, role: Option, context: &Context) -> Box + Send> { + fn auth_check(&self, role: Option, context: &Context) -> Box + Send> { let context = context.clone(); println!("auth_check({:?}) - X-Span-ID: {:?}", role, context.x_span_id.unwrap_or(String::from("")).clone()); Box::new(futures::failed("Generic failure".into())) } - fn auth_oidc(&self, oidc_params: models::AuthOidc, context: &Context) -> Box + Send> { + fn auth_oidc(&self, oidc_params: models::AuthOidc, context: &Context) -> Box + Send> { let context = context.clone(); println!("auth_oidc({:?}) - X-Span-ID: {:?}", oidc_params, context.x_span_id.unwrap_or(String::from("")).clone()); Box::new(futures::failed("Generic failure".into())) } - fn create_auth_token(&self, editor_id: String, duration_seconds: Option, context: &Context) -> Box + Send> { + fn create_auth_token(&self, editor_id: String, duration_seconds: Option, context: &Context) -> Box + Send> { let context = context.clone(); println!( "create_auth_token(\"{}\", {:?}) - X-Span-ID: {:?}", @@ -54,19 +54,19 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn get_changelog(&self, limit: Option, context: &Context) -> Box + Send> { + fn get_changelog(&self, limit: Option, context: &Context) -> Box + Send> { let context = context.clone(); println!("get_changelog({:?}) - X-Span-ID: {:?}", limit, context.x_span_id.unwrap_or(String::from("")).clone()); Box::new(futures::failed("Generic failure".into())) } - fn get_changelog_entry(&self, index: i64, context: &Context) -> Box + Send> { + fn get_changelog_entry(&self, index: i64, context: &Context) -> Box + Send> { let context = context.clone(); println!("get_changelog_entry({}) - X-Span-ID: {:?}", index, context.x_span_id.unwrap_or(String::from("")).clone()); Box::new(futures::failed("Generic failure".into())) } - fn create_container(&self, editgroup_id: String, entity: models::ContainerEntity, context: &Context) -> Box + Send> { + fn create_container(&self, editgroup_id: String, entity: models::ContainerEntity, context: &Context) -> Box + Send> { let context = context.clone(); println!( "create_container(\"{}\", {:?}) - X-Span-ID: {:?}", @@ -77,7 +77,7 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn create_container_auto_batch(&self, auto_batch: models::ContainerAutoBatch, context: &Context) -> Box + Send> { + fn create_container_auto_batch(&self, auto_batch: models::ContainerAutoBatch, context: &Context) -> Box + Send> { let context = context.clone(); println!( "create_container_auto_batch({:?}) - X-Span-ID: {:?}", @@ -87,7 +87,7 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn delete_container(&self, editgroup_id: String, ident: String, context: &Context) -> Box + Send> { + fn delete_container(&self, editgroup_id: String, ident: String, context: &Context) -> Box + Send> { let context = context.clone(); println!( "delete_container(\"{}\", \"{}\") - X-Span-ID: {:?}", @@ -98,7 +98,7 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn delete_container_edit(&self, editgroup_id: String, edit_id: String, context: &Context) -> Box + Send> { + fn delete_container_edit(&self, editgroup_id: String, edit_id: String, context: &Context) -> Box + Send> { let context = context.clone(); println!( "delete_container_edit(\"{}\", \"{}\") - X-Span-ID: {:?}", @@ -109,7 +109,7 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn get_container(&self, ident: String, expand: Option, hide: Option, context: &Context) -> Box + Send> { + fn get_container(&self, ident: String, expand: Option, hide: Option, context: &Context) -> Box + Send> { let context = context.clone(); println!( "get_container(\"{}\", {:?}, {:?}) - X-Span-ID: {:?}", @@ -121,13 +121,13 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn get_container_edit(&self, edit_id: String, context: &Context) -> Box + Send> { + fn get_container_edit(&self, edit_id: String, context: &Context) -> Box + Send> { let context = context.clone(); println!("get_container_edit(\"{}\") - X-Span-ID: {:?}", edit_id, context.x_span_id.unwrap_or(String::from("")).clone()); Box::new(futures::failed("Generic failure".into())) } - fn get_container_history(&self, ident: String, limit: Option, context: &Context) -> Box + Send> { + fn get_container_history(&self, ident: String, limit: Option, context: &Context) -> Box + Send> { let context = context.clone(); println!( "get_container_history(\"{}\", {:?}) - X-Span-ID: {:?}", @@ -138,13 +138,13 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn get_container_redirects(&self, ident: String, context: &Context) -> Box + Send> { + fn get_container_redirects(&self, ident: String, context: &Context) -> Box + Send> { let context = context.clone(); println!("get_container_redirects(\"{}\") - X-Span-ID: {:?}", ident, context.x_span_id.unwrap_or(String::from("")).clone()); Box::new(futures::failed("Generic failure".into())) } - fn get_container_revision(&self, rev_id: String, expand: Option, hide: Option, context: &Context) -> Box + Send> { + fn get_container_revision(&self, rev_id: String, expand: Option, hide: Option, context: &Context) -> Box + Send> { let context = context.clone(); println!( "get_container_revision(\"{}\", {:?}, {:?}) - X-Span-ID: {:?}", @@ -163,7 +163,7 @@ impl Api for Server { expand: Option, hide: Option, context: &Context, - ) -> Box + Send> { + ) -> Box + Send> { let context = context.clone(); println!( "lookup_container({:?}, {:?}, {:?}, {:?}) - X-Span-ID: {:?}", @@ -176,7 +176,7 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn update_container(&self, editgroup_id: String, ident: String, entity: models::ContainerEntity, context: &Context) -> Box + Send> { + fn update_container(&self, editgroup_id: String, ident: String, entity: models::ContainerEntity, context: &Context) -> Box + Send> { let context = context.clone(); println!( "update_container(\"{}\", \"{}\", {:?}) - X-Span-ID: {:?}", @@ -188,7 +188,7 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn create_creator(&self, editgroup_id: String, entity: models::CreatorEntity, context: &Context) -> Box + Send> { + fn create_creator(&self, editgroup_id: String, entity: models::CreatorEntity, context: &Context) -> Box + Send> { let context = context.clone(); println!( "create_creator(\"{}\", {:?}) - X-Span-ID: {:?}", @@ -199,7 +199,7 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn create_creator_auto_batch(&self, auto_batch: models::CreatorAutoBatch, context: &Context) -> Box + Send> { + fn create_creator_auto_batch(&self, auto_batch: models::CreatorAutoBatch, context: &Context) -> Box + Send> { let context = context.clone(); println!( "create_creator_auto_batch({:?}) - X-Span-ID: {:?}", @@ -209,7 +209,7 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn delete_creator(&self, editgroup_id: String, ident: String, context: &Context) -> Box + Send> { + fn delete_creator(&self, editgroup_id: String, ident: String, context: &Context) -> Box + Send> { let context = context.clone(); println!( "delete_creator(\"{}\", \"{}\") - X-Span-ID: {:?}", @@ -220,7 +220,7 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn delete_creator_edit(&self, editgroup_id: String, edit_id: String, context: &Context) -> Box + Send> { + fn delete_creator_edit(&self, editgroup_id: String, edit_id: String, context: &Context) -> Box + Send> { let context = context.clone(); println!( "delete_creator_edit(\"{}\", \"{}\") - X-Span-ID: {:?}", @@ -231,7 +231,7 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn get_creator(&self, ident: String, expand: Option, hide: Option, context: &Context) -> Box + Send> { + fn get_creator(&self, ident: String, expand: Option, hide: Option, context: &Context) -> Box + Send> { let context = context.clone(); println!( "get_creator(\"{}\", {:?}, {:?}) - X-Span-ID: {:?}", @@ -243,13 +243,13 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn get_creator_edit(&self, edit_id: String, context: &Context) -> Box + Send> { + fn get_creator_edit(&self, edit_id: String, context: &Context) -> Box + Send> { let context = context.clone(); println!("get_creator_edit(\"{}\") - X-Span-ID: {:?}", edit_id, context.x_span_id.unwrap_or(String::from("")).clone()); Box::new(futures::failed("Generic failure".into())) } - fn get_creator_history(&self, ident: String, limit: Option, context: &Context) -> Box + Send> { + fn get_creator_history(&self, ident: String, limit: Option, context: &Context) -> Box + Send> { let context = context.clone(); println!( "get_creator_history(\"{}\", {:?}) - X-Span-ID: {:?}", @@ -260,13 +260,13 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn get_creator_redirects(&self, ident: String, context: &Context) -> Box + Send> { + fn get_creator_redirects(&self, ident: String, context: &Context) -> Box + Send> { let context = context.clone(); println!("get_creator_redirects(\"{}\") - X-Span-ID: {:?}", ident, context.x_span_id.unwrap_or(String::from("")).clone()); Box::new(futures::failed("Generic failure".into())) } - fn get_creator_releases(&self, ident: String, hide: Option, context: &Context) -> Box + Send> { + fn get_creator_releases(&self, ident: String, hide: Option, context: &Context) -> Box + Send> { let context = context.clone(); println!( "get_creator_releases(\"{}\", {:?}) - X-Span-ID: {:?}", @@ -277,7 +277,7 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn get_creator_revision(&self, rev_id: String, expand: Option, hide: Option, context: &Context) -> Box + Send> { + fn get_creator_revision(&self, rev_id: String, expand: Option, hide: Option, context: &Context) -> Box + Send> { let context = context.clone(); println!( "get_creator_revision(\"{}\", {:?}, {:?}) - X-Span-ID: {:?}", @@ -296,7 +296,7 @@ impl Api for Server { expand: Option, hide: Option, context: &Context, - ) -> Box + Send> { + ) -> Box + Send> { let context = context.clone(); println!( "lookup_creator({:?}, {:?}, {:?}, {:?}) - X-Span-ID: {:?}", @@ -309,7 +309,7 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn update_creator(&self, editgroup_id: String, ident: String, entity: models::CreatorEntity, context: &Context) -> Box + Send> { + fn update_creator(&self, editgroup_id: String, ident: String, entity: models::CreatorEntity, context: &Context) -> Box + Send> { let context = context.clone(); println!( "update_creator(\"{}\", \"{}\", {:?}) - X-Span-ID: {:?}", @@ -321,13 +321,13 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn accept_editgroup(&self, editgroup_id: String, context: &Context) -> Box + Send> { + fn accept_editgroup(&self, editgroup_id: String, context: &Context) -> Box + Send> { let context = context.clone(); println!("accept_editgroup(\"{}\") - X-Span-ID: {:?}", editgroup_id, context.x_span_id.unwrap_or(String::from("")).clone()); Box::new(futures::failed("Generic failure".into())) } - fn create_editgroup(&self, editgroup: models::Editgroup, context: &Context) -> Box + Send> { + fn create_editgroup(&self, editgroup: models::Editgroup, context: &Context) -> Box + Send> { let context = context.clone(); println!("create_editgroup({:?}) - X-Span-ID: {:?}", editgroup, context.x_span_id.unwrap_or(String::from("")).clone()); Box::new(futures::failed("Generic failure".into())) @@ -338,7 +338,7 @@ impl Api for Server { editgroup_id: String, annotation: models::EditgroupAnnotation, context: &Context, - ) -> Box + Send> { + ) -> Box + Send> { let context = context.clone(); println!( "create_editgroup_annotation(\"{}\", {:?}) - X-Span-ID: {:?}", @@ -349,13 +349,13 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn get_editgroup(&self, editgroup_id: String, context: &Context) -> Box + Send> { + fn get_editgroup(&self, editgroup_id: String, context: &Context) -> Box + Send> { let context = context.clone(); println!("get_editgroup(\"{}\") - X-Span-ID: {:?}", editgroup_id, context.x_span_id.unwrap_or(String::from("")).clone()); Box::new(futures::failed("Generic failure".into())) } - fn get_editgroup_annotations(&self, editgroup_id: String, expand: Option, context: &Context) -> Box + Send> { + fn get_editgroup_annotations(&self, editgroup_id: String, expand: Option, context: &Context) -> Box + Send> { let context = context.clone(); println!( "get_editgroup_annotations(\"{}\", {:?}) - X-Span-ID: {:?}", @@ -373,7 +373,7 @@ impl Api for Server { before: Option>, since: Option>, context: &Context, - ) -> Box + Send> { + ) -> Box + Send> { let context = context.clone(); println!( "get_editgroups_reviewable({:?}, {:?}, {:?}, {:?}) - X-Span-ID: {:?}", @@ -386,7 +386,13 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn update_editgroup(&self, editgroup_id: String, editgroup: models::Editgroup, submit: Option, context: &Context) -> Box + Send> { + fn update_editgroup( + &self, + editgroup_id: String, + editgroup: models::Editgroup, + submit: Option, + context: &Context, + ) -> Box + Send> { let context = context.clone(); println!( "update_editgroup(\"{}\", {:?}, {:?}) - X-Span-ID: {:?}", @@ -398,7 +404,7 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn get_editor(&self, editor_id: String, context: &Context) -> Box + Send> { + fn get_editor(&self, editor_id: String, context: &Context) -> Box + Send> { let context = context.clone(); println!("get_editor(\"{}\") - X-Span-ID: {:?}", editor_id, context.x_span_id.unwrap_or(String::from("")).clone()); Box::new(futures::failed("Generic failure".into())) @@ -411,7 +417,7 @@ impl Api for Server { before: Option>, since: Option>, context: &Context, - ) -> Box + Send> { + ) -> Box + Send> { let context = context.clone(); println!( "get_editor_annotations(\"{}\", {:?}, {:?}, {:?}) - X-Span-ID: {:?}", @@ -431,7 +437,7 @@ impl Api for Server { before: Option>, since: Option>, context: &Context, - ) -> Box + Send> { + ) -> Box + Send> { let context = context.clone(); println!( "get_editor_editgroups(\"{}\", {:?}, {:?}, {:?}) - X-Span-ID: {:?}", @@ -444,7 +450,7 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn update_editor(&self, editor_id: String, editor: models::Editor, context: &Context) -> Box + Send> { + fn update_editor(&self, editor_id: String, editor: models::Editor, context: &Context) -> Box + Send> { let context = context.clone(); println!( "update_editor(\"{}\", {:?}) - X-Span-ID: {:?}", @@ -455,7 +461,7 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn create_file(&self, editgroup_id: String, entity: models::FileEntity, context: &Context) -> Box + Send> { + fn create_file(&self, editgroup_id: String, entity: models::FileEntity, context: &Context) -> Box + Send> { let context = context.clone(); println!( "create_file(\"{}\", {:?}) - X-Span-ID: {:?}", @@ -466,7 +472,7 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn create_file_auto_batch(&self, auto_batch: models::FileAutoBatch, context: &Context) -> Box + Send> { + fn create_file_auto_batch(&self, auto_batch: models::FileAutoBatch, context: &Context) -> Box + Send> { let context = context.clone(); println!( "create_file_auto_batch({:?}) - X-Span-ID: {:?}", @@ -476,7 +482,7 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn delete_file(&self, editgroup_id: String, ident: String, context: &Context) -> Box + Send> { + fn delete_file(&self, editgroup_id: String, ident: String, context: &Context) -> Box + Send> { let context = context.clone(); println!( "delete_file(\"{}\", \"{}\") - X-Span-ID: {:?}", @@ -487,7 +493,7 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn delete_file_edit(&self, editgroup_id: String, edit_id: String, context: &Context) -> Box + Send> { + fn delete_file_edit(&self, editgroup_id: String, edit_id: String, context: &Context) -> Box + Send> { let context = context.clone(); println!( "delete_file_edit(\"{}\", \"{}\") - X-Span-ID: {:?}", @@ -498,7 +504,7 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn get_file(&self, ident: String, expand: Option, hide: Option, context: &Context) -> Box + Send> { + fn get_file(&self, ident: String, expand: Option, hide: Option, context: &Context) -> Box + Send> { let context = context.clone(); println!( "get_file(\"{}\", {:?}, {:?}) - X-Span-ID: {:?}", @@ -510,13 +516,13 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn get_file_edit(&self, edit_id: String, context: &Context) -> Box + Send> { + fn get_file_edit(&self, edit_id: String, context: &Context) -> Box + Send> { let context = context.clone(); println!("get_file_edit(\"{}\") - X-Span-ID: {:?}", edit_id, context.x_span_id.unwrap_or(String::from("")).clone()); Box::new(futures::failed("Generic failure".into())) } - fn get_file_history(&self, ident: String, limit: Option, context: &Context) -> Box + Send> { + fn get_file_history(&self, ident: String, limit: Option, context: &Context) -> Box + Send> { let context = context.clone(); println!( "get_file_history(\"{}\", {:?}) - X-Span-ID: {:?}", @@ -527,13 +533,13 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn get_file_redirects(&self, ident: String, context: &Context) -> Box + Send> { + fn get_file_redirects(&self, ident: String, context: &Context) -> Box + Send> { let context = context.clone(); println!("get_file_redirects(\"{}\") - X-Span-ID: {:?}", ident, context.x_span_id.unwrap_or(String::from("")).clone()); Box::new(futures::failed("Generic failure".into())) } - fn get_file_revision(&self, rev_id: String, expand: Option, hide: Option, context: &Context) -> Box + Send> { + fn get_file_revision(&self, rev_id: String, expand: Option, hide: Option, context: &Context) -> Box + Send> { let context = context.clone(); println!( "get_file_revision(\"{}\", {:?}, {:?}) - X-Span-ID: {:?}", @@ -553,7 +559,7 @@ impl Api for Server { expand: Option, hide: Option, context: &Context, - ) -> Box + Send> { + ) -> Box + Send> { let context = context.clone(); println!( "lookup_file({:?}, {:?}, {:?}, {:?}, {:?}) - X-Span-ID: {:?}", @@ -567,7 +573,7 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn update_file(&self, editgroup_id: String, ident: String, entity: models::FileEntity, context: &Context) -> Box + Send> { + fn update_file(&self, editgroup_id: String, ident: String, entity: models::FileEntity, context: &Context) -> Box + Send> { let context = context.clone(); println!( "update_file(\"{}\", \"{}\", {:?}) - X-Span-ID: {:?}", @@ -579,7 +585,7 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn create_fileset(&self, editgroup_id: String, entity: models::FilesetEntity, context: &Context) -> Box + Send> { + fn create_fileset(&self, editgroup_id: String, entity: models::FilesetEntity, context: &Context) -> Box + Send> { let context = context.clone(); println!( "create_fileset(\"{}\", {:?}) - X-Span-ID: {:?}", @@ -590,7 +596,7 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn create_fileset_auto_batch(&self, auto_batch: models::FilesetAutoBatch, context: &Context) -> Box + Send> { + fn create_fileset_auto_batch(&self, auto_batch: models::FilesetAutoBatch, context: &Context) -> Box + Send> { let context = context.clone(); println!( "create_fileset_auto_batch({:?}) - X-Span-ID: {:?}", @@ -600,7 +606,7 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn delete_fileset(&self, editgroup_id: String, ident: String, context: &Context) -> Box + Send> { + fn delete_fileset(&self, editgroup_id: String, ident: String, context: &Context) -> Box + Send> { let context = context.clone(); println!( "delete_fileset(\"{}\", \"{}\") - X-Span-ID: {:?}", @@ -611,7 +617,7 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn delete_fileset_edit(&self, editgroup_id: String, edit_id: String, context: &Context) -> Box + Send> { + fn delete_fileset_edit(&self, editgroup_id: String, edit_id: String, context: &Context) -> Box + Send> { let context = context.clone(); println!( "delete_fileset_edit(\"{}\", \"{}\") - X-Span-ID: {:?}", @@ -622,7 +628,7 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn get_fileset(&self, ident: String, expand: Option, hide: Option, context: &Context) -> Box + Send> { + fn get_fileset(&self, ident: String, expand: Option, hide: Option, context: &Context) -> Box + Send> { let context = context.clone(); println!( "get_fileset(\"{}\", {:?}, {:?}) - X-Span-ID: {:?}", @@ -634,13 +640,13 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn get_fileset_edit(&self, edit_id: String, context: &Context) -> Box + Send> { + fn get_fileset_edit(&self, edit_id: String, context: &Context) -> Box + Send> { let context = context.clone(); println!("get_fileset_edit(\"{}\") - X-Span-ID: {:?}", edit_id, context.x_span_id.unwrap_or(String::from("")).clone()); Box::new(futures::failed("Generic failure".into())) } - fn get_fileset_history(&self, ident: String, limit: Option, context: &Context) -> Box + Send> { + fn get_fileset_history(&self, ident: String, limit: Option, context: &Context) -> Box + Send> { let context = context.clone(); println!( "get_fileset_history(\"{}\", {:?}) - X-Span-ID: {:?}", @@ -651,13 +657,13 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn get_fileset_redirects(&self, ident: String, context: &Context) -> Box + Send> { + fn get_fileset_redirects(&self, ident: String, context: &Context) -> Box + Send> { let context = context.clone(); println!("get_fileset_redirects(\"{}\") - X-Span-ID: {:?}", ident, context.x_span_id.unwrap_or(String::from("")).clone()); Box::new(futures::failed("Generic failure".into())) } - fn get_fileset_revision(&self, rev_id: String, expand: Option, hide: Option, context: &Context) -> Box + Send> { + fn get_fileset_revision(&self, rev_id: String, expand: Option, hide: Option, context: &Context) -> Box + Send> { let context = context.clone(); println!( "get_fileset_revision(\"{}\", {:?}, {:?}) - X-Span-ID: {:?}", @@ -669,7 +675,7 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn update_fileset(&self, editgroup_id: String, ident: String, entity: models::FilesetEntity, context: &Context) -> Box + Send> { + fn update_fileset(&self, editgroup_id: String, ident: String, entity: models::FilesetEntity, context: &Context) -> Box + Send> { let context = context.clone(); println!( "update_fileset(\"{}\", \"{}\", {:?}) - X-Span-ID: {:?}", @@ -681,7 +687,7 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn create_release(&self, editgroup_id: String, entity: models::ReleaseEntity, context: &Context) -> Box + Send> { + fn create_release(&self, editgroup_id: String, entity: models::ReleaseEntity, context: &Context) -> Box + Send> { let context = context.clone(); println!( "create_release(\"{}\", {:?}) - X-Span-ID: {:?}", @@ -692,7 +698,7 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn create_release_auto_batch(&self, auto_batch: models::ReleaseAutoBatch, context: &Context) -> Box + Send> { + fn create_release_auto_batch(&self, auto_batch: models::ReleaseAutoBatch, context: &Context) -> Box + Send> { let context = context.clone(); println!( "create_release_auto_batch({:?}) - X-Span-ID: {:?}", @@ -702,7 +708,7 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn delete_release(&self, editgroup_id: String, ident: String, context: &Context) -> Box + Send> { + fn delete_release(&self, editgroup_id: String, ident: String, context: &Context) -> Box + Send> { let context = context.clone(); println!( "delete_release(\"{}\", \"{}\") - X-Span-ID: {:?}", @@ -713,7 +719,7 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn delete_release_edit(&self, editgroup_id: String, edit_id: String, context: &Context) -> Box + Send> { + fn delete_release_edit(&self, editgroup_id: String, edit_id: String, context: &Context) -> Box + Send> { let context = context.clone(); println!( "delete_release_edit(\"{}\", \"{}\") - X-Span-ID: {:?}", @@ -724,7 +730,7 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn get_release(&self, ident: String, expand: Option, hide: Option, context: &Context) -> Box + Send> { + fn get_release(&self, ident: String, expand: Option, hide: Option, context: &Context) -> Box + Send> { let context = context.clone(); println!( "get_release(\"{}\", {:?}, {:?}) - X-Span-ID: {:?}", @@ -736,13 +742,13 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn get_release_edit(&self, edit_id: String, context: &Context) -> Box + Send> { + fn get_release_edit(&self, edit_id: String, context: &Context) -> Box + Send> { let context = context.clone(); println!("get_release_edit(\"{}\") - X-Span-ID: {:?}", edit_id, context.x_span_id.unwrap_or(String::from("")).clone()); Box::new(futures::failed("Generic failure".into())) } - fn get_release_files(&self, ident: String, hide: Option, context: &Context) -> Box + Send> { + fn get_release_files(&self, ident: String, hide: Option, context: &Context) -> Box + Send> { let context = context.clone(); println!( "get_release_files(\"{}\", {:?}) - X-Span-ID: {:?}", @@ -753,7 +759,7 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn get_release_filesets(&self, ident: String, hide: Option, context: &Context) -> Box + Send> { + fn get_release_filesets(&self, ident: String, hide: Option, context: &Context) -> Box + Send> { let context = context.clone(); println!( "get_release_filesets(\"{}\", {:?}) - X-Span-ID: {:?}", @@ -764,7 +770,7 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn get_release_history(&self, ident: String, limit: Option, context: &Context) -> Box + Send> { + fn get_release_history(&self, ident: String, limit: Option, context: &Context) -> Box + Send> { let context = context.clone(); println!( "get_release_history(\"{}\", {:?}) - X-Span-ID: {:?}", @@ -775,13 +781,13 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn get_release_redirects(&self, ident: String, context: &Context) -> Box + Send> { + fn get_release_redirects(&self, ident: String, context: &Context) -> Box + Send> { let context = context.clone(); println!("get_release_redirects(\"{}\") - X-Span-ID: {:?}", ident, context.x_span_id.unwrap_or(String::from("")).clone()); Box::new(futures::failed("Generic failure".into())) } - fn get_release_revision(&self, rev_id: String, expand: Option, hide: Option, context: &Context) -> Box + Send> { + fn get_release_revision(&self, rev_id: String, expand: Option, hide: Option, context: &Context) -> Box + Send> { let context = context.clone(); println!( "get_release_revision(\"{}\", {:?}, {:?}) - X-Span-ID: {:?}", @@ -793,7 +799,7 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn get_release_webcaptures(&self, ident: String, hide: Option, context: &Context) -> Box + Send> { + fn get_release_webcaptures(&self, ident: String, hide: Option, context: &Context) -> Box + Send> { let context = context.clone(); println!( "get_release_webcaptures(\"{}\", {:?}) - X-Span-ID: {:?}", @@ -819,7 +825,7 @@ impl Api for Server { expand: Option, hide: Option, context: &Context, - ) -> Box + Send> { + ) -> Box + Send> { let context = context.clone(); println!( "lookup_release({:?}, {:?}, {:?}, {:?}, {:?}, {:?}, {:?}, {:?}, {:?}, {:?}, {:?}, {:?}) - X-Span-ID: {:?}", @@ -840,7 +846,7 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn update_release(&self, editgroup_id: String, ident: String, entity: models::ReleaseEntity, context: &Context) -> Box + Send> { + fn update_release(&self, editgroup_id: String, ident: String, entity: models::ReleaseEntity, context: &Context) -> Box + Send> { let context = context.clone(); println!( "update_release(\"{}\", \"{}\", {:?}) - X-Span-ID: {:?}", @@ -852,7 +858,7 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn create_webcapture(&self, editgroup_id: String, entity: models::WebcaptureEntity, context: &Context) -> Box + Send> { + fn create_webcapture(&self, editgroup_id: String, entity: models::WebcaptureEntity, context: &Context) -> Box + Send> { let context = context.clone(); println!( "create_webcapture(\"{}\", {:?}) - X-Span-ID: {:?}", @@ -863,7 +869,7 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn create_webcapture_auto_batch(&self, auto_batch: models::WebcaptureAutoBatch, context: &Context) -> Box + Send> { + fn create_webcapture_auto_batch(&self, auto_batch: models::WebcaptureAutoBatch, context: &Context) -> Box + Send> { let context = context.clone(); println!( "create_webcapture_auto_batch({:?}) - X-Span-ID: {:?}", @@ -873,7 +879,7 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn delete_webcapture(&self, editgroup_id: String, ident: String, context: &Context) -> Box + Send> { + fn delete_webcapture(&self, editgroup_id: String, ident: String, context: &Context) -> Box + Send> { let context = context.clone(); println!( "delete_webcapture(\"{}\", \"{}\") - X-Span-ID: {:?}", @@ -884,7 +890,7 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn delete_webcapture_edit(&self, editgroup_id: String, edit_id: String, context: &Context) -> Box + Send> { + fn delete_webcapture_edit(&self, editgroup_id: String, edit_id: String, context: &Context) -> Box + Send> { let context = context.clone(); println!( "delete_webcapture_edit(\"{}\", \"{}\") - X-Span-ID: {:?}", @@ -895,7 +901,7 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn get_webcapture(&self, ident: String, expand: Option, hide: Option, context: &Context) -> Box + Send> { + fn get_webcapture(&self, ident: String, expand: Option, hide: Option, context: &Context) -> Box + Send> { let context = context.clone(); println!( "get_webcapture(\"{}\", {:?}, {:?}) - X-Span-ID: {:?}", @@ -907,13 +913,13 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn get_webcapture_edit(&self, edit_id: String, context: &Context) -> Box + Send> { + fn get_webcapture_edit(&self, edit_id: String, context: &Context) -> Box + Send> { let context = context.clone(); println!("get_webcapture_edit(\"{}\") - X-Span-ID: {:?}", edit_id, context.x_span_id.unwrap_or(String::from("")).clone()); Box::new(futures::failed("Generic failure".into())) } - fn get_webcapture_history(&self, ident: String, limit: Option, context: &Context) -> Box + Send> { + fn get_webcapture_history(&self, ident: String, limit: Option, context: &Context) -> Box + Send> { let context = context.clone(); println!( "get_webcapture_history(\"{}\", {:?}) - X-Span-ID: {:?}", @@ -924,13 +930,19 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn get_webcapture_redirects(&self, ident: String, context: &Context) -> Box + Send> { + fn get_webcapture_redirects(&self, ident: String, context: &Context) -> Box + Send> { let context = context.clone(); println!("get_webcapture_redirects(\"{}\") - X-Span-ID: {:?}", ident, context.x_span_id.unwrap_or(String::from("")).clone()); Box::new(futures::failed("Generic failure".into())) } - fn get_webcapture_revision(&self, rev_id: String, expand: Option, hide: Option, context: &Context) -> Box + Send> { + fn get_webcapture_revision( + &self, + rev_id: String, + expand: Option, + hide: Option, + context: &Context, + ) -> Box + Send> { let context = context.clone(); println!( "get_webcapture_revision(\"{}\", {:?}, {:?}) - X-Span-ID: {:?}", @@ -942,7 +954,7 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn update_webcapture(&self, editgroup_id: String, ident: String, entity: models::WebcaptureEntity, context: &Context) -> Box + Send> { + fn update_webcapture(&self, editgroup_id: String, ident: String, entity: models::WebcaptureEntity, context: &Context) -> Box + Send> { let context = context.clone(); println!( "update_webcapture(\"{}\", \"{}\", {:?}) - X-Span-ID: {:?}", @@ -954,7 +966,7 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn create_work(&self, editgroup_id: String, entity: models::WorkEntity, context: &Context) -> Box + Send> { + fn create_work(&self, editgroup_id: String, entity: models::WorkEntity, context: &Context) -> Box + Send> { let context = context.clone(); println!( "create_work(\"{}\", {:?}) - X-Span-ID: {:?}", @@ -965,7 +977,7 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn create_work_auto_batch(&self, auto_batch: models::WorkAutoBatch, context: &Context) -> Box + Send> { + fn create_work_auto_batch(&self, auto_batch: models::WorkAutoBatch, context: &Context) -> Box + Send> { let context = context.clone(); println!( "create_work_auto_batch({:?}) - X-Span-ID: {:?}", @@ -975,7 +987,7 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn delete_work(&self, editgroup_id: String, ident: String, context: &Context) -> Box + Send> { + fn delete_work(&self, editgroup_id: String, ident: String, context: &Context) -> Box + Send> { let context = context.clone(); println!( "delete_work(\"{}\", \"{}\") - X-Span-ID: {:?}", @@ -986,7 +998,7 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn delete_work_edit(&self, editgroup_id: String, edit_id: String, context: &Context) -> Box + Send> { + fn delete_work_edit(&self, editgroup_id: String, edit_id: String, context: &Context) -> Box + Send> { let context = context.clone(); println!( "delete_work_edit(\"{}\", \"{}\") - X-Span-ID: {:?}", @@ -997,7 +1009,7 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn get_work(&self, ident: String, expand: Option, hide: Option, context: &Context) -> Box + Send> { + fn get_work(&self, ident: String, expand: Option, hide: Option, context: &Context) -> Box + Send> { let context = context.clone(); println!( "get_work(\"{}\", {:?}, {:?}) - X-Span-ID: {:?}", @@ -1009,13 +1021,13 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn get_work_edit(&self, edit_id: String, context: &Context) -> Box + Send> { + fn get_work_edit(&self, edit_id: String, context: &Context) -> Box + Send> { let context = context.clone(); println!("get_work_edit(\"{}\") - X-Span-ID: {:?}", edit_id, context.x_span_id.unwrap_or(String::from("")).clone()); Box::new(futures::failed("Generic failure".into())) } - fn get_work_history(&self, ident: String, limit: Option, context: &Context) -> Box + Send> { + fn get_work_history(&self, ident: String, limit: Option, context: &Context) -> Box + Send> { let context = context.clone(); println!( "get_work_history(\"{}\", {:?}) - X-Span-ID: {:?}", @@ -1026,13 +1038,13 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn get_work_redirects(&self, ident: String, context: &Context) -> Box + Send> { + fn get_work_redirects(&self, ident: String, context: &Context) -> Box + Send> { let context = context.clone(); println!("get_work_redirects(\"{}\") - X-Span-ID: {:?}", ident, context.x_span_id.unwrap_or(String::from("")).clone()); Box::new(futures::failed("Generic failure".into())) } - fn get_work_releases(&self, ident: String, hide: Option, context: &Context) -> Box + Send> { + fn get_work_releases(&self, ident: String, hide: Option, context: &Context) -> Box + Send> { let context = context.clone(); println!( "get_work_releases(\"{}\", {:?}) - X-Span-ID: {:?}", @@ -1043,7 +1055,7 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn get_work_revision(&self, rev_id: String, expand: Option, hide: Option, context: &Context) -> Box + Send> { + fn get_work_revision(&self, rev_id: String, expand: Option, hide: Option, context: &Context) -> Box + Send> { let context = context.clone(); println!( "get_work_revision(\"{}\", {:?}, {:?}) - X-Span-ID: {:?}", @@ -1055,7 +1067,7 @@ impl Api for Server { Box::new(futures::failed("Generic failure".into())) } - fn update_work(&self, editgroup_id: String, ident: String, entity: models::WorkEntity, context: &Context) -> Box + Send> { + fn update_work(&self, editgroup_id: String, ident: String, entity: models::WorkEntity, context: &Context) -> Box + Send> { let context = context.clone(); println!( "update_work(\"{}\", \"{}\", {:?}) - X-Span-ID: {:?}", -- cgit v1.2.3