#[derive(Clone, PartialEq, ::prost::Message)] pub struct IdRequest {} #[derive(Clone, PartialEq, ::prost::Message)] pub struct IdReply { #[prost(string, tag = "1")] pub id: ::prost::alloc::string::String, } #[doc = r" Generated client implementations."] pub mod clawflake_client { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::*; #[derive(Debug, Clone)] pub struct ClawflakeClient { inner: tonic::client::Grpc, } impl ClawflakeClient { #[doc = r" Attempt to create a new client by connecting to a given endpoint."] pub async fn connect(dst: D) -> Result where D: std::convert::TryInto, D::Error: Into, { let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; Ok(Self::new(conn)) } } impl ClawflakeClient where T: tonic::client::GrpcService, T::ResponseBody: Body + Send + Sync + 'static, T::Error: Into, ::Error: Into + Send, { pub fn new(inner: T) -> Self { let inner = tonic::client::Grpc::new(inner); Self { inner } } pub fn with_interceptor( inner: T, interceptor: F, ) -> ClawflakeClient> where F: FnMut(tonic::Request<()>) -> Result, tonic::Status>, T: tonic::codegen::Service< http::Request, Response = http::Response< >::ResponseBody, >, >, >>::Error: Into + Send + Sync, { ClawflakeClient::new(InterceptedService::new(inner, interceptor)) } #[doc = r" Compress requests with `gzip`."] #[doc = r""] #[doc = r" This requires the server to support it otherwise it might respond with an"] #[doc = r" error."] pub fn send_gzip(mut self) -> Self { self.inner = self.inner.send_gzip(); self } #[doc = r" Enable decompressing responses with `gzip`."] pub fn accept_gzip(mut self) -> Self { self.inner = self.inner.accept_gzip(); self } pub async fn get_id( &mut self, request: impl tonic::IntoRequest, ) -> Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, format!("Service was not ready: {}", e.into()), ) })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/clawflake.Clawflake/GetID"); self.inner.unary(request.into_request(), path, codec).await } } }