// @generated by Thrift for thrift/compiler/test/fixtures/inheritance/src/module.thrift // This file is probably not the place you want to edit! //! Client implementation for each service in `module`. #![recursion_limit = "100000000"] #![allow(non_camel_case_types, non_snake_case, non_upper_case_globals, unused_crate_dependencies, unused_imports, clippy::all)] #[doc(inline)] pub use :: as types; pub mod errors; pub(crate) use crate as client; pub(crate) use ::::services; pub trait MyRoot: ::std::marker::Send { fn do_root( &self, ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<(), crate::errors::my_root::DoRootError>>; } pub trait MyRootExt: MyRoot where T: ::fbthrift::Transport, { fn do_root_with_rpc_opts( &self, rpc_options: T::RpcOptions, ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<(), crate::errors::my_root::DoRootError>>; fn transport(&self) -> &T; } #[allow(deprecated)] impl<'a, S> MyRoot for S where S: ::std::convert::AsRef, S: ::std::marker::Send, { fn do_root( &self, ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<(), crate::errors::my_root::DoRootError>> { self.as_ref().do_root( ) } } #[allow(deprecated)] impl<'a, S, T> MyRootExt for S where S: ::std::convert::AsRef + ::std::convert::AsRef + 'a>, S: ::std::marker::Send + ::fbthrift::help::GetTransport, T: ::fbthrift::Transport, { fn do_root_with_rpc_opts( &self, rpc_options: T::RpcOptions, ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<(), crate::errors::my_root::DoRootError>> { >>::as_ref(self).do_root_with_rpc_opts( rpc_options, ) } fn transport(&self) -> &T { ::fbthrift::help::GetTransport::transport(self) } } /// Client definitions for `MyRoot`. pub struct MyRootImpl { transport: T, _phantom: ::std::marker::PhantomData (P, S)>, } impl MyRootImpl where P: ::fbthrift::Protocol, T: ::fbthrift::Transport, P::Frame: ::fbthrift::Framing>, ::fbthrift::ProtocolEncoded

: ::fbthrift::BufMutExt>, P::Deserializer: ::std::marker::Send, S: ::fbthrift::help::Spawner, { pub fn new( transport: T, ) -> Self { Self { transport, _phantom: ::std::marker::PhantomData, } } pub fn transport(&self) -> &T { ::fbthrift::help::GetTransport::transport(self) } fn _do_root_impl( &self, rpc_options: T::RpcOptions, ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<(), crate::errors::my_root::DoRootError>> { use ::tracing::Instrument as _; use ::futures::FutureExt as _; const SERVICE_NAME: &::std::ffi::CStr = c"MyRoot"; const SERVICE_METHOD_NAME: &::std::ffi::CStr = c"MyRoot.do_root"; let args = self::Args_MyRoot_do_root { _phantom: ::std::marker::PhantomData, }; let transport = self.transport(); // need to do call setup outside of async block because T: Transport isn't Send let request_env = match ::fbthrift::help::serialize_request_envelope::("do_root", &args) { ::std::result::Result::Ok(res) => res, ::std::result::Result::Err(err) => return ::futures::future::err(err.into()).boxed(), }; let call = transport .call(SERVICE_NAME, SERVICE_METHOD_NAME, request_env, rpc_options) .instrument(::tracing::trace_span!("call", method = "MyRoot.do_root")); async move { let reply_env = call.await?; let de = P::deserializer(reply_env); let res = ::fbthrift::help::async_deserialize_response_envelope::(de).await?; let res = match res { ::std::result::Result::Ok(res) => res, ::std::result::Result::Err(aexn) => { ::std::result::Result::Err(crate::errors::my_root::DoRootError::ApplicationException(aexn)) } }; res } .instrument(::tracing::info_span!("stream", method = "MyRoot.do_root")) .boxed() } } impl ::fbthrift::help::GetTransport for MyRootImpl where T: ::fbthrift::Transport, { fn transport(&self) -> &T { &self.transport } } struct Args_MyRoot_do_root<'a> { _phantom: ::std::marker::PhantomData<&'a ()>, } impl<'a, P: ::fbthrift::ProtocolWriter> ::fbthrift::Serialize

for self::Args_MyRoot_do_root<'a> { #[inline] #[::tracing::instrument(skip_all, level = "trace", name = "serialize_args", fields(method = "MyRoot.do_root"))] fn write(&self, p: &mut P) { p.write_struct_begin("args"); p.write_field_stop(); p.write_struct_end(); } } impl MyRoot for MyRootImpl where P: ::fbthrift::Protocol, T: ::fbthrift::Transport, P::Frame: ::fbthrift::Framing>, ::fbthrift::ProtocolEncoded

: ::fbthrift::BufMutExt>, P::Deserializer: ::std::marker::Send, S: ::fbthrift::help::Spawner, { fn do_root( &self, ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<(), crate::errors::my_root::DoRootError>> { let rpc_options = T::RpcOptions::default(); self._do_root_impl( rpc_options, ) } } impl MyRootExt for MyRootImpl where P: ::fbthrift::Protocol, T: ::fbthrift::Transport, P::Frame: ::fbthrift::Framing>, ::fbthrift::ProtocolEncoded

: ::fbthrift::BufMutExt>, P::Deserializer: ::std::marker::Send, S: ::fbthrift::help::Spawner, { fn do_root_with_rpc_opts( &self, rpc_options: T::RpcOptions, ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<(), crate::errors::my_root::DoRootError>> { self._do_root_impl( rpc_options, ) } fn transport(&self) -> &T { self.transport() } } #[derive(Clone)] pub struct make_MyRoot; /// To be called by user directly setting up a client. Avoids /// needing ClientFactory trait in scope, avoids unidiomatic /// make_Trait name. /// /// ``` /// # const _: &str = stringify! { /// use bgs::client::BuckGraphService; /// /// let protocol = BinaryProtocol::new(); /// let transport = HttpClient::new(); /// let client = ::new(protocol, transport); /// # }; /// ``` impl dyn MyRoot { pub fn new( protocol: P, transport: T, ) -> ::std::sync::Arc where P: ::fbthrift::Protocol, T: ::fbthrift::Transport, P::Deserializer: ::std::marker::Send, { let spawner = ::fbthrift::help::NoopSpawner; Self::with_spawner(protocol, transport, spawner) } pub fn with_spawner( protocol: P, transport: T, spawner: S, ) -> ::std::sync::Arc where P: ::fbthrift::Protocol, T: ::fbthrift::Transport, P::Deserializer: ::std::marker::Send, S: ::fbthrift::help::Spawner, { let _ = protocol; let _ = spawner; ::std::sync::Arc::new(MyRootImpl::::new(transport)) } } impl dyn MyRootExt where T: ::fbthrift::Transport, { pub fn new

( protocol: P, transport: T, ) -> ::std::sync::Arc + ::std::marker::Send + ::std::marker::Sync + 'static> where P: ::fbthrift::Protocol, P::Deserializer: ::std::marker::Send, { let spawner = ::fbthrift::help::NoopSpawner; Self::with_spawner(protocol, transport, spawner) } pub fn with_spawner( protocol: P, transport: T, spawner: S, ) -> ::std::sync::Arc + ::std::marker::Send + ::std::marker::Sync + 'static> where P: ::fbthrift::Protocol, P::Deserializer: ::std::marker::Send, S: ::fbthrift::help::Spawner, { let _ = protocol; let _ = spawner; ::std::sync::Arc::new(MyRootImpl::::new(transport)) } } pub type MyRootDynClient = ::Api; pub type MyRootClient = ::std::sync::Arc; /// The same thing, but to be called from generic contexts where we are /// working with a type parameter `C: ClientFactory` to produce clients. impl ::fbthrift::ClientFactory for make_MyRoot { type Api = dyn MyRoot + ::std::marker::Send + ::std::marker::Sync + 'static; fn with_spawner(protocol: P, transport: T, spawner: S) -> ::std::sync::Arc where P: ::fbthrift::Protocol, T: ::fbthrift::Transport, P::Deserializer: ::std::marker::Send, S: ::fbthrift::help::Spawner, { ::with_spawner(protocol, transport, spawner) } } pub trait MyNode: crate::client::MyRoot + ::std::marker::Send { fn do_mid( &self, ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<(), crate::errors::my_node::DoMidError>>; } pub trait MyNodeExt: MyNode + crate::client::MyRootExt where T: ::fbthrift::Transport, { fn do_mid_with_rpc_opts( &self, rpc_options: T::RpcOptions, ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<(), crate::errors::my_node::DoMidError>>; } #[allow(deprecated)] impl<'a, S> MyNode for S where S: ::std::convert::AsRef, S: crate::client::MyRoot, S: ::std::marker::Send, { fn do_mid( &self, ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<(), crate::errors::my_node::DoMidError>> { self.as_ref().do_mid( ) } } #[allow(deprecated)] impl<'a, S, T> MyNodeExt for S where S: ::std::convert::AsRef + ::std::convert::AsRef + 'a>, S: crate::client::MyRoot + crate::client::MyRootExt, S: ::std::marker::Send + ::fbthrift::help::GetTransport, T: ::fbthrift::Transport, { fn do_mid_with_rpc_opts( &self, rpc_options: T::RpcOptions, ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<(), crate::errors::my_node::DoMidError>> { >>::as_ref(self).do_mid_with_rpc_opts( rpc_options, ) } } /// Client definitions for `MyNode`. pub struct MyNodeImpl { parent: crate::client::MyRootImpl, } impl MyNodeImpl where P: ::fbthrift::Protocol, T: ::fbthrift::Transport, P::Frame: ::fbthrift::Framing>, ::fbthrift::ProtocolEncoded

: ::fbthrift::BufMutExt>, P::Deserializer: ::std::marker::Send, S: ::fbthrift::help::Spawner, { pub fn new( transport: T, ) -> Self { let parent = crate::client::MyRootImpl::::new(transport); Self { parent } } pub fn transport(&self) -> &T { ::fbthrift::help::GetTransport::transport(self) } fn _do_mid_impl( &self, rpc_options: T::RpcOptions, ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<(), crate::errors::my_node::DoMidError>> { use ::tracing::Instrument as _; use ::futures::FutureExt as _; const SERVICE_NAME: &::std::ffi::CStr = c"MyNode"; const SERVICE_METHOD_NAME: &::std::ffi::CStr = c"MyNode.do_mid"; let args = self::Args_MyNode_do_mid { _phantom: ::std::marker::PhantomData, }; let transport = self.transport(); // need to do call setup outside of async block because T: Transport isn't Send let request_env = match ::fbthrift::help::serialize_request_envelope::("do_mid", &args) { ::std::result::Result::Ok(res) => res, ::std::result::Result::Err(err) => return ::futures::future::err(err.into()).boxed(), }; let call = transport .call(SERVICE_NAME, SERVICE_METHOD_NAME, request_env, rpc_options) .instrument(::tracing::trace_span!("call", method = "MyNode.do_mid")); async move { let reply_env = call.await?; let de = P::deserializer(reply_env); let res = ::fbthrift::help::async_deserialize_response_envelope::(de).await?; let res = match res { ::std::result::Result::Ok(res) => res, ::std::result::Result::Err(aexn) => { ::std::result::Result::Err(crate::errors::my_node::DoMidError::ApplicationException(aexn)) } }; res } .instrument(::tracing::info_span!("stream", method = "MyNode.do_mid")) .boxed() } } impl ::fbthrift::help::GetTransport for MyNodeImpl where T: ::fbthrift::Transport, { fn transport(&self) -> &T { self.parent.transport() } } #[allow(deprecated)] impl<'a, P, T, S> ::std::convert::AsRef for MyNodeImpl where P: ::fbthrift::Protocol, T: ::fbthrift::Transport, P::Frame: ::fbthrift::Framing>, ::fbthrift::ProtocolEncoded

: ::fbthrift::BufMutExt>, P::Deserializer: ::std::marker::Send, S: ::fbthrift::help::Spawner, { fn as_ref(&self) -> &(dyn crate::client::MyRoot + 'a) { &self.parent } } #[allow(deprecated)] impl<'a, P, T, S> ::std::convert::AsRef + 'a> for MyNodeImpl where P: ::fbthrift::Protocol, T: ::fbthrift::Transport, P::Frame: ::fbthrift::Framing>, ::fbthrift::ProtocolEncoded

: ::fbthrift::BufMutExt>, P::Deserializer: ::std::marker::Send, S: ::fbthrift::help::Spawner, { fn as_ref(&self) -> &(dyn crate::client::MyRootExt + 'a) { &self.parent } } struct Args_MyNode_do_mid<'a> { _phantom: ::std::marker::PhantomData<&'a ()>, } impl<'a, P: ::fbthrift::ProtocolWriter> ::fbthrift::Serialize

for self::Args_MyNode_do_mid<'a> { #[inline] #[::tracing::instrument(skip_all, level = "trace", name = "serialize_args", fields(method = "MyNode.do_mid"))] fn write(&self, p: &mut P) { p.write_struct_begin("args"); p.write_field_stop(); p.write_struct_end(); } } impl MyNode for MyNodeImpl where P: ::fbthrift::Protocol, T: ::fbthrift::Transport, P::Frame: ::fbthrift::Framing>, ::fbthrift::ProtocolEncoded

: ::fbthrift::BufMutExt>, P::Deserializer: ::std::marker::Send, S: ::fbthrift::help::Spawner, { fn do_mid( &self, ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<(), crate::errors::my_node::DoMidError>> { let rpc_options = T::RpcOptions::default(); self._do_mid_impl( rpc_options, ) } } impl MyNodeExt for MyNodeImpl where P: ::fbthrift::Protocol, T: ::fbthrift::Transport, P::Frame: ::fbthrift::Framing>, ::fbthrift::ProtocolEncoded

: ::fbthrift::BufMutExt>, P::Deserializer: ::std::marker::Send, S: ::fbthrift::help::Spawner, { fn do_mid_with_rpc_opts( &self, rpc_options: T::RpcOptions, ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<(), crate::errors::my_node::DoMidError>> { self._do_mid_impl( rpc_options, ) } } #[derive(Clone)] pub struct make_MyNode; /// To be called by user directly setting up a client. Avoids /// needing ClientFactory trait in scope, avoids unidiomatic /// make_Trait name. /// /// ``` /// # const _: &str = stringify! { /// use bgs::client::BuckGraphService; /// /// let protocol = BinaryProtocol::new(); /// let transport = HttpClient::new(); /// let client = ::new(protocol, transport); /// # }; /// ``` impl dyn MyNode { pub fn new( protocol: P, transport: T, ) -> ::std::sync::Arc where P: ::fbthrift::Protocol, T: ::fbthrift::Transport, P::Deserializer: ::std::marker::Send, { let spawner = ::fbthrift::help::NoopSpawner; Self::with_spawner(protocol, transport, spawner) } pub fn with_spawner( protocol: P, transport: T, spawner: S, ) -> ::std::sync::Arc where P: ::fbthrift::Protocol, T: ::fbthrift::Transport, P::Deserializer: ::std::marker::Send, S: ::fbthrift::help::Spawner, { let _ = protocol; let _ = spawner; ::std::sync::Arc::new(MyNodeImpl::::new(transport)) } } impl dyn MyNodeExt where T: ::fbthrift::Transport, { pub fn new

( protocol: P, transport: T, ) -> ::std::sync::Arc + ::std::marker::Send + ::std::marker::Sync + 'static> where P: ::fbthrift::Protocol, P::Deserializer: ::std::marker::Send, { let spawner = ::fbthrift::help::NoopSpawner; Self::with_spawner(protocol, transport, spawner) } pub fn with_spawner( protocol: P, transport: T, spawner: S, ) -> ::std::sync::Arc + ::std::marker::Send + ::std::marker::Sync + 'static> where P: ::fbthrift::Protocol, P::Deserializer: ::std::marker::Send, S: ::fbthrift::help::Spawner, { let _ = protocol; let _ = spawner; ::std::sync::Arc::new(MyNodeImpl::::new(transport)) } } pub type MyNodeDynClient = ::Api; pub type MyNodeClient = ::std::sync::Arc; /// The same thing, but to be called from generic contexts where we are /// working with a type parameter `C: ClientFactory` to produce clients. impl ::fbthrift::ClientFactory for make_MyNode { type Api = dyn MyNode + ::std::marker::Send + ::std::marker::Sync + 'static; fn with_spawner(protocol: P, transport: T, spawner: S) -> ::std::sync::Arc where P: ::fbthrift::Protocol, T: ::fbthrift::Transport, P::Deserializer: ::std::marker::Send, S: ::fbthrift::help::Spawner, { ::with_spawner(protocol, transport, spawner) } } pub trait MyLeaf: crate::client::MyNode + ::std::marker::Send { fn do_leaf( &self, ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<(), crate::errors::my_leaf::DoLeafError>>; } pub trait MyLeafExt: MyLeaf + crate::client::MyNodeExt where T: ::fbthrift::Transport, { fn do_leaf_with_rpc_opts( &self, rpc_options: T::RpcOptions, ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<(), crate::errors::my_leaf::DoLeafError>>; } #[allow(deprecated)] impl<'a, S> MyLeaf for S where S: ::std::convert::AsRef, S: crate::client::MyNode, S: crate::client::MyRoot, S: ::std::marker::Send, { fn do_leaf( &self, ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<(), crate::errors::my_leaf::DoLeafError>> { self.as_ref().do_leaf( ) } } #[allow(deprecated)] impl<'a, S, T> MyLeafExt for S where S: ::std::convert::AsRef + ::std::convert::AsRef + 'a>, S: crate::client::MyNode + crate::client::MyNodeExt, S: crate::client::MyRoot + crate::client::MyRootExt, S: ::std::marker::Send + ::fbthrift::help::GetTransport, T: ::fbthrift::Transport, { fn do_leaf_with_rpc_opts( &self, rpc_options: T::RpcOptions, ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<(), crate::errors::my_leaf::DoLeafError>> { >>::as_ref(self).do_leaf_with_rpc_opts( rpc_options, ) } } /// Client definitions for `MyLeaf`. pub struct MyLeafImpl { parent: crate::client::MyNodeImpl, } impl MyLeafImpl where P: ::fbthrift::Protocol, T: ::fbthrift::Transport, P::Frame: ::fbthrift::Framing>, ::fbthrift::ProtocolEncoded

: ::fbthrift::BufMutExt>, P::Deserializer: ::std::marker::Send, S: ::fbthrift::help::Spawner, { pub fn new( transport: T, ) -> Self { let parent = crate::client::MyNodeImpl::::new(transport); Self { parent } } pub fn transport(&self) -> &T { ::fbthrift::help::GetTransport::transport(self) } fn _do_leaf_impl( &self, rpc_options: T::RpcOptions, ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<(), crate::errors::my_leaf::DoLeafError>> { use ::tracing::Instrument as _; use ::futures::FutureExt as _; const SERVICE_NAME: &::std::ffi::CStr = c"MyLeaf"; const SERVICE_METHOD_NAME: &::std::ffi::CStr = c"MyLeaf.do_leaf"; let args = self::Args_MyLeaf_do_leaf { _phantom: ::std::marker::PhantomData, }; let transport = self.transport(); // need to do call setup outside of async block because T: Transport isn't Send let request_env = match ::fbthrift::help::serialize_request_envelope::("do_leaf", &args) { ::std::result::Result::Ok(res) => res, ::std::result::Result::Err(err) => return ::futures::future::err(err.into()).boxed(), }; let call = transport .call(SERVICE_NAME, SERVICE_METHOD_NAME, request_env, rpc_options) .instrument(::tracing::trace_span!("call", method = "MyLeaf.do_leaf")); async move { let reply_env = call.await?; let de = P::deserializer(reply_env); let res = ::fbthrift::help::async_deserialize_response_envelope::(de).await?; let res = match res { ::std::result::Result::Ok(res) => res, ::std::result::Result::Err(aexn) => { ::std::result::Result::Err(crate::errors::my_leaf::DoLeafError::ApplicationException(aexn)) } }; res } .instrument(::tracing::info_span!("stream", method = "MyLeaf.do_leaf")) .boxed() } } impl ::fbthrift::help::GetTransport for MyLeafImpl where T: ::fbthrift::Transport, { fn transport(&self) -> &T { self.parent.transport() } } #[allow(deprecated)] impl<'a, P, T, S> ::std::convert::AsRef for MyLeafImpl where P: ::fbthrift::Protocol, T: ::fbthrift::Transport, P::Frame: ::fbthrift::Framing>, ::fbthrift::ProtocolEncoded

: ::fbthrift::BufMutExt>, P::Deserializer: ::std::marker::Send, S: ::fbthrift::help::Spawner, { fn as_ref(&self) -> &(dyn crate::client::MyNode + 'a) { &self.parent } } #[allow(deprecated)] impl<'a, P, T, S> ::std::convert::AsRef + 'a> for MyLeafImpl where P: ::fbthrift::Protocol, T: ::fbthrift::Transport, P::Frame: ::fbthrift::Framing>, ::fbthrift::ProtocolEncoded

: ::fbthrift::BufMutExt>, P::Deserializer: ::std::marker::Send, S: ::fbthrift::help::Spawner, { fn as_ref(&self) -> &(dyn crate::client::MyNodeExt + 'a) { &self.parent } } #[allow(deprecated)] impl<'a, P, T, S> ::std::convert::AsRef for MyLeafImpl where P: ::fbthrift::Protocol, T: ::fbthrift::Transport, P::Frame: ::fbthrift::Framing>, ::fbthrift::ProtocolEncoded

: ::fbthrift::BufMutExt>, P::Deserializer: ::std::marker::Send, S: ::fbthrift::help::Spawner, { fn as_ref(&self) -> &(dyn crate::client::MyRoot + 'a) { self.parent.as_ref() } } #[allow(deprecated)] impl<'a, P, T, S> ::std::convert::AsRef + 'a> for MyLeafImpl where P: ::fbthrift::Protocol, T: ::fbthrift::Transport, P::Frame: ::fbthrift::Framing>, ::fbthrift::ProtocolEncoded

: ::fbthrift::BufMutExt>, P::Deserializer: ::std::marker::Send, S: ::fbthrift::help::Spawner, { fn as_ref(&self) -> &(dyn crate::client::MyRootExt + 'a) { self.parent.as_ref() } } struct Args_MyLeaf_do_leaf<'a> { _phantom: ::std::marker::PhantomData<&'a ()>, } impl<'a, P: ::fbthrift::ProtocolWriter> ::fbthrift::Serialize

for self::Args_MyLeaf_do_leaf<'a> { #[inline] #[::tracing::instrument(skip_all, level = "trace", name = "serialize_args", fields(method = "MyLeaf.do_leaf"))] fn write(&self, p: &mut P) { p.write_struct_begin("args"); p.write_field_stop(); p.write_struct_end(); } } impl MyLeaf for MyLeafImpl where P: ::fbthrift::Protocol, T: ::fbthrift::Transport, P::Frame: ::fbthrift::Framing>, ::fbthrift::ProtocolEncoded

: ::fbthrift::BufMutExt>, P::Deserializer: ::std::marker::Send, S: ::fbthrift::help::Spawner, { fn do_leaf( &self, ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<(), crate::errors::my_leaf::DoLeafError>> { let rpc_options = T::RpcOptions::default(); self._do_leaf_impl( rpc_options, ) } } impl MyLeafExt for MyLeafImpl where P: ::fbthrift::Protocol, T: ::fbthrift::Transport, P::Frame: ::fbthrift::Framing>, ::fbthrift::ProtocolEncoded

: ::fbthrift::BufMutExt>, P::Deserializer: ::std::marker::Send, S: ::fbthrift::help::Spawner, { fn do_leaf_with_rpc_opts( &self, rpc_options: T::RpcOptions, ) -> ::futures::future::BoxFuture<'static, ::std::result::Result<(), crate::errors::my_leaf::DoLeafError>> { self._do_leaf_impl( rpc_options, ) } } #[derive(Clone)] pub struct make_MyLeaf; /// To be called by user directly setting up a client. Avoids /// needing ClientFactory trait in scope, avoids unidiomatic /// make_Trait name. /// /// ``` /// # const _: &str = stringify! { /// use bgs::client::BuckGraphService; /// /// let protocol = BinaryProtocol::new(); /// let transport = HttpClient::new(); /// let client = ::new(protocol, transport); /// # }; /// ``` impl dyn MyLeaf { pub fn new( protocol: P, transport: T, ) -> ::std::sync::Arc where P: ::fbthrift::Protocol, T: ::fbthrift::Transport, P::Deserializer: ::std::marker::Send, { let spawner = ::fbthrift::help::NoopSpawner; Self::with_spawner(protocol, transport, spawner) } pub fn with_spawner( protocol: P, transport: T, spawner: S, ) -> ::std::sync::Arc where P: ::fbthrift::Protocol, T: ::fbthrift::Transport, P::Deserializer: ::std::marker::Send, S: ::fbthrift::help::Spawner, { let _ = protocol; let _ = spawner; ::std::sync::Arc::new(MyLeafImpl::::new(transport)) } } impl dyn MyLeafExt where T: ::fbthrift::Transport, { pub fn new

( protocol: P, transport: T, ) -> ::std::sync::Arc + ::std::marker::Send + ::std::marker::Sync + 'static> where P: ::fbthrift::Protocol, P::Deserializer: ::std::marker::Send, { let spawner = ::fbthrift::help::NoopSpawner; Self::with_spawner(protocol, transport, spawner) } pub fn with_spawner( protocol: P, transport: T, spawner: S, ) -> ::std::sync::Arc + ::std::marker::Send + ::std::marker::Sync + 'static> where P: ::fbthrift::Protocol, P::Deserializer: ::std::marker::Send, S: ::fbthrift::help::Spawner, { let _ = protocol; let _ = spawner; ::std::sync::Arc::new(MyLeafImpl::::new(transport)) } } pub type MyLeafDynClient = ::Api; pub type MyLeafClient = ::std::sync::Arc; /// The same thing, but to be called from generic contexts where we are /// working with a type parameter `C: ClientFactory` to produce clients. impl ::fbthrift::ClientFactory for make_MyLeaf { type Api = dyn MyLeaf + ::std::marker::Send + ::std::marker::Sync + 'static; fn with_spawner(protocol: P, transport: T, spawner: S) -> ::std::sync::Arc where P: ::fbthrift::Protocol, T: ::fbthrift::Transport, P::Deserializer: ::std::marker::Send, S: ::fbthrift::help::Spawner, { ::with_spawner(protocol, transport, spawner) } }