diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e2d92c36..0d58807b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,6 +1,8 @@ name: dapr-rust-sdk on: + schedule: + - cron: '8 8 * * *' push: branches: - main @@ -112,4 +114,4 @@ jobs: - name: cargo publish dapr-macros run: cargo publish --manifest-path dapr-macros/Cargo.toml --token ${{ env.CARGO_TOKEN }} - name: cargo publish dapr - run: cargo publish --token ${{ env.CARGO_TOKEN }} + run: cargo publish --manifest-path dapr/Cargo.toml --token ${{ env.CARGO_TOKEN }} diff --git a/.github/workflows/validate-examples.yml b/.github/workflows/validate-examples.yml index 30d8fd01..9304f54d 100644 --- a/.github/workflows/validate-examples.yml +++ b/.github/workflows/validate-examples.yml @@ -1,6 +1,8 @@ name: validate-examples on: + schedule: + - cron: '8 8 * * *' push: branches: - main diff --git a/Cargo.toml b/Cargo.toml index ba9d6a06..2126e832 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,8 +13,7 @@ resolver = "2" [workspace.dependencies] async-trait = "0.1" -dapr = { version = "0.15.1", path = "./dapr" } -dapr-macros = { version = "0.15.1", path = "./dapr-macros" } +dapr-macros = { version = "0.16.0-rc.2", path = "./dapr-macros" } prost = "0.13.1" prost-build = "0.13.1" @@ -32,7 +31,7 @@ tonic = "0.12.1" tonic-build = "0.12.1" [workspace.package] -version = "0.15.1" +version = "0.16.0-rc.2" authors = [ "Mike Nguyen ", "The Dapr Authors " diff --git a/README.md b/README.md index a70c364a..b7fdac92 100644 --- a/README.md +++ b/README.md @@ -45,7 +45,7 @@ resiliency. Ensure you have Rust version 1.78 or higher installed. If not, install Rust [here](https://www.rust-lang.org/tools/install). -You will also need to install [protoc](https://github.com/protocolbuffers/protobuf#protobuf-compiler-installation). +These crates no longer require protoc unless to recompile the protobuf files. ## How to use @@ -53,7 +53,7 @@ Add the following to your `Cargo.toml` file: ```toml [dependencies] -dapr = "0.15.0" +dapr = "0.16.0-rc.2" ``` Here's a basic example to create a client: @@ -74,7 +74,7 @@ async fn main() -> Result<(), Box> { ## Explore more examples -Browse through more examples to understand the SDK better: [View examples](./examples) +Browse through more examples to understand the SDK better: [View examples](https://github.com/dapr/rust-sdk/tree/main/examples) ## Building @@ -84,8 +84,6 @@ To build the SDK run: cargo build ``` ->Note: The protobuf client generation is built into `cargo build` process so updating the proto files under `dapr/` is enough to update the protobuf client. - ## Developing (Updating .proto files from upstream Dapr) To fetch the latest .proto files from Dapr execute the script `update-protos.sh`: @@ -100,6 +98,8 @@ By default, the script fetches the latest proto updates from the master branch o ./update-protos.sh -v v1.14.0 ``` +You will also need to install [protoc](https://github.com/protocolbuffers/protobuf#protobuf-compiler-installation). + Protos can then be compiled using: ```bash diff --git a/dapr/Cargo.toml b/dapr/Cargo.toml index 031217c3..5692a870 100644 --- a/dapr/Cargo.toml +++ b/dapr/Cargo.toml @@ -6,7 +6,7 @@ edition.workspace = true license.workspace = true repository.workspace = true description = "Rust SDK for dapr" -readme = "../README.md" +readme = "README.md" keywords = ["microservices", "dapr"] rust-version.workspace = true @@ -30,8 +30,8 @@ tokio-util = { workspace = true, features = ["io"] } [dev-dependencies] axum-test = "15.3" once_cell = "1.19" +dapr = { path = "./" } tokio = { workspace = true, features = ["full"] } uuid = { version = "1.10", features = ["v4"] } -dapr = { workspace = true } tokio-test = { workspace = true } tokio-stream = { workspace = true } \ No newline at end of file diff --git a/dapr/README.md b/dapr/README.md new file mode 120000 index 00000000..32d46ee8 --- /dev/null +++ b/dapr/README.md @@ -0,0 +1 @@ +../README.md \ No newline at end of file diff --git a/dapr/src/dapr/dapr.proto.common.v1.rs b/dapr/src/dapr/dapr.proto.common.v1.rs index ef84893c..f6681764 100644 --- a/dapr/src/dapr/dapr.proto.common.v1.rs +++ b/dapr/src/dapr/dapr.proto.common.v1.rs @@ -6,7 +6,6 @@ /// `POST /method/?query1=value1&query2=value2`> /// /// Dapr runtime will parse POST as a verb and extract querystring to quersytring map. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct HttpExtension { /// Required. HTTP verb. @@ -21,7 +20,17 @@ pub mod http_extension { /// Type of HTTP 1.1 Methods /// RFC 7231: /// RFC 5789: - #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] + #[derive( + Clone, + Copy, + Debug, + PartialEq, + Eq, + Hash, + PartialOrd, + Ord, + ::prost::Enumeration + )] #[repr(i32)] pub enum Verb { None = 0, @@ -42,16 +51,16 @@ pub mod http_extension { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - Verb::None => "NONE", - Verb::Get => "GET", - Verb::Head => "HEAD", - Verb::Post => "POST", - Verb::Put => "PUT", - Verb::Delete => "DELETE", - Verb::Connect => "CONNECT", - Verb::Options => "OPTIONS", - Verb::Trace => "TRACE", - Verb::Patch => "PATCH", + Self::None => "NONE", + Self::Get => "GET", + Self::Head => "HEAD", + Self::Post => "POST", + Self::Put => "PUT", + Self::Delete => "DELETE", + Self::Connect => "CONNECT", + Self::Options => "OPTIONS", + Self::Trace => "TRACE", + Self::Patch => "PATCH", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -75,7 +84,6 @@ pub mod http_extension { /// InvokeRequest is the message to invoke a method with the data. /// This message is used in InvokeService of Dapr gRPC Service and OnInvoke /// of AppCallback gRPC service. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct InvokeRequest { /// Required. method is a method name which will be invoked by caller. @@ -102,7 +110,6 @@ pub struct InvokeRequest { /// from app callback. /// This message is used in InvokeService of Dapr gRPC Service and OnInvoke /// of AppCallback gRPC service. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct InvokeResponse { /// Required in unary RPCs. The content body of InvokeService response. @@ -114,7 +121,6 @@ pub struct InvokeResponse { } /// Chunk of data sent in a streaming request or response. /// This is used in requests including InternalInvokeRequestStream. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct StreamPayload { /// Data sent in the chunk. @@ -128,7 +134,6 @@ pub struct StreamPayload { pub seq: u64, } /// StateItem represents state key, value, and additional options to save state. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct StateItem { /// Required. The state key @@ -143,14 +148,15 @@ pub struct StateItem { pub etag: ::core::option::Option, /// The metadata which will be passed to state store component. #[prost(map = "string, string", tag = "4")] - pub metadata: - ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>, + pub metadata: ::std::collections::HashMap< + ::prost::alloc::string::String, + ::prost::alloc::string::String, + >, /// Options for concurrency and consistency to save the state. #[prost(message, optional, tag = "5")] pub options: ::core::option::Option, } /// Etag represents a state item version -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Etag { /// value sets the etag value @@ -158,7 +164,6 @@ pub struct Etag { pub value: ::prost::alloc::string::String, } /// StateOptions configures concurrency and consistency for state operations -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct StateOptions { #[prost(enumeration = "state_options::StateConcurrency", tag = "1")] @@ -169,7 +174,17 @@ pub struct StateOptions { /// Nested message and enum types in `StateOptions`. pub mod state_options { /// Enum describing the supported concurrency for state. - #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] + #[derive( + Clone, + Copy, + Debug, + PartialEq, + Eq, + Hash, + PartialOrd, + Ord, + ::prost::Enumeration + )] #[repr(i32)] pub enum StateConcurrency { ConcurrencyUnspecified = 0, @@ -183,9 +198,9 @@ pub mod state_options { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - StateConcurrency::ConcurrencyUnspecified => "CONCURRENCY_UNSPECIFIED", - StateConcurrency::ConcurrencyFirstWrite => "CONCURRENCY_FIRST_WRITE", - StateConcurrency::ConcurrencyLastWrite => "CONCURRENCY_LAST_WRITE", + Self::ConcurrencyUnspecified => "CONCURRENCY_UNSPECIFIED", + Self::ConcurrencyFirstWrite => "CONCURRENCY_FIRST_WRITE", + Self::ConcurrencyLastWrite => "CONCURRENCY_LAST_WRITE", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -199,7 +214,17 @@ pub mod state_options { } } /// Enum describing the supported consistency for state. - #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] + #[derive( + Clone, + Copy, + Debug, + PartialEq, + Eq, + Hash, + PartialOrd, + Ord, + ::prost::Enumeration + )] #[repr(i32)] pub enum StateConsistency { ConsistencyUnspecified = 0, @@ -213,9 +238,9 @@ pub mod state_options { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - StateConsistency::ConsistencyUnspecified => "CONSISTENCY_UNSPECIFIED", - StateConsistency::ConsistencyEventual => "CONSISTENCY_EVENTUAL", - StateConsistency::ConsistencyStrong => "CONSISTENCY_STRONG", + Self::ConsistencyUnspecified => "CONSISTENCY_UNSPECIFIED", + Self::ConsistencyEventual => "CONSISTENCY_EVENTUAL", + Self::ConsistencyStrong => "CONSISTENCY_STRONG", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -230,7 +255,6 @@ pub mod state_options { } } /// ConfigurationItem represents all the configuration with its name(key). -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ConfigurationItem { /// Required. The value of configuration item. @@ -241,6 +265,8 @@ pub struct ConfigurationItem { pub version: ::prost::alloc::string::String, /// the metadata which will be passed to/from configuration store component. #[prost(map = "string, string", tag = "3")] - pub metadata: - ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>, + pub metadata: ::std::collections::HashMap< + ::prost::alloc::string::String, + ::prost::alloc::string::String, + >, } diff --git a/dapr/src/dapr/dapr.proto.runtime.v1.rs b/dapr/src/dapr/dapr.proto.runtime.v1.rs index 527e1d58..abe99fa5 100644 --- a/dapr/src/dapr/dapr.proto.runtime.v1.rs +++ b/dapr/src/dapr/dapr.proto.runtime.v1.rs @@ -1,5 +1,4 @@ // This file is @generated by prost-build. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct JobEventRequest { /// Job name. @@ -25,12 +24,10 @@ pub struct JobEventRequest { pub http_extension: ::core::option::Option, } /// JobEventResponse is the response from the app when a job is triggered. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct JobEventResponse {} /// TopicEventRequest message is compatible with CloudEvent spec v1.0 /// -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct TopicEventRequest { /// id identifies the event. Producers MUST ensure that source + id @@ -72,20 +69,26 @@ pub struct TopicEventRequest { pub extensions: ::core::option::Option<::prost_types::Struct>, } /// TopicEventResponse is response from app on published message -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct TopicEventResponse { /// The list of output bindings. - #[prost( - enumeration = "topic_event_response::TopicEventResponseStatus", - tag = "1" - )] + #[prost(enumeration = "topic_event_response::TopicEventResponseStatus", tag = "1")] pub status: i32, } /// Nested message and enum types in `TopicEventResponse`. pub mod topic_event_response { /// TopicEventResponseStatus allows apps to have finer control over handling of the message. - #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] + #[derive( + Clone, + Copy, + Debug, + PartialEq, + Eq, + Hash, + PartialOrd, + Ord, + ::prost::Enumeration + )] #[repr(i32)] pub enum TopicEventResponseStatus { /// SUCCESS is the default behavior: message is acknowledged and not retried or logged. @@ -102,9 +105,9 @@ pub mod topic_event_response { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - TopicEventResponseStatus::Success => "SUCCESS", - TopicEventResponseStatus::Retry => "RETRY", - TopicEventResponseStatus::Drop => "DROP", + Self::Success => "SUCCESS", + Self::Retry => "RETRY", + Self::Drop => "DROP", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -119,7 +122,6 @@ pub mod topic_event_response { } } /// TopicEventCERequest message is compatible with CloudEvent spec v1.0 -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct TopicEventCeRequest { /// The unique identifier of this cloud event. @@ -145,7 +147,6 @@ pub struct TopicEventCeRequest { pub extensions: ::core::option::Option<::prost_types::Struct>, } /// TopicEventBulkRequestEntry represents a single message inside a bulk request -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct TopicEventBulkRequestEntry { /// Unique identifier for the message. @@ -156,8 +157,10 @@ pub struct TopicEventBulkRequestEntry { pub content_type: ::prost::alloc::string::String, /// The metadata associated with the event. #[prost(map = "string, string", tag = "5")] - pub metadata: - ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>, + pub metadata: ::std::collections::HashMap< + ::prost::alloc::string::String, + ::prost::alloc::string::String, + >, /// The content of the event. #[prost(oneof = "topic_event_bulk_request_entry::Event", tags = "2, 3")] pub event: ::core::option::Option, @@ -165,7 +168,6 @@ pub struct TopicEventBulkRequestEntry { /// Nested message and enum types in `TopicEventBulkRequestEntry`. pub mod topic_event_bulk_request_entry { /// The content of the event. - #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Event { #[prost(bytes, tag = "2")] @@ -175,7 +177,6 @@ pub mod topic_event_bulk_request_entry { } } /// TopicEventBulkRequest represents request for bulk message -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct TopicEventBulkRequest { /// Unique identifier for the bulk request. @@ -186,8 +187,10 @@ pub struct TopicEventBulkRequest { pub entries: ::prost::alloc::vec::Vec, /// The metadata associated with the this bulk request. #[prost(map = "string, string", tag = "3")] - pub metadata: - ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>, + pub metadata: ::std::collections::HashMap< + ::prost::alloc::string::String, + ::prost::alloc::string::String, + >, /// The pubsub topic which publisher sent to. #[prost(string, tag = "4")] pub topic: ::prost::alloc::string::String, @@ -204,21 +207,16 @@ pub struct TopicEventBulkRequest { } /// TopicEventBulkResponseEntry Represents single response, as part of TopicEventBulkResponse, to be /// sent by subscibed App for the corresponding single message during bulk subscribe -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct TopicEventBulkResponseEntry { /// Unique identifier associated the message. #[prost(string, tag = "1")] pub entry_id: ::prost::alloc::string::String, /// The status of the response. - #[prost( - enumeration = "topic_event_response::TopicEventResponseStatus", - tag = "2" - )] + #[prost(enumeration = "topic_event_response::TopicEventResponseStatus", tag = "2")] pub status: i32, } /// AppBulkResponse is response from app on published message -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct TopicEventBulkResponse { /// The list of all responses for the bulk request. @@ -226,7 +224,6 @@ pub struct TopicEventBulkResponse { pub statuses: ::prost::alloc::vec::Vec, } /// BindingEventRequest represents input bindings event. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct BindingEventRequest { /// Required. The name of the input binding component. @@ -237,12 +234,13 @@ pub struct BindingEventRequest { pub data: ::prost::alloc::vec::Vec, /// The metadata set by the input binging components. #[prost(map = "string, string", tag = "3")] - pub metadata: - ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>, + pub metadata: ::std::collections::HashMap< + ::prost::alloc::string::String, + ::prost::alloc::string::String, + >, } /// BindingEventResponse includes operations to save state or /// send data to output bindings optionally. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct BindingEventResponse { /// The name of state store where states are saved. @@ -259,16 +257,23 @@ pub struct BindingEventResponse { pub data: ::prost::alloc::vec::Vec, /// The concurrency of output bindings to send data to /// "to" output bindings list. The default is SEQUENTIAL. - #[prost( - enumeration = "binding_event_response::BindingEventConcurrency", - tag = "5" - )] + #[prost(enumeration = "binding_event_response::BindingEventConcurrency", tag = "5")] pub concurrency: i32, } /// Nested message and enum types in `BindingEventResponse`. pub mod binding_event_response { /// BindingEventConcurrency is the kind of concurrency - #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] + #[derive( + Clone, + Copy, + Debug, + PartialEq, + Eq, + Hash, + PartialOrd, + Ord, + ::prost::Enumeration + )] #[repr(i32)] pub enum BindingEventConcurrency { /// SEQUENTIAL sends data to output bindings specified in "to" sequentially. @@ -283,8 +288,8 @@ pub mod binding_event_response { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - BindingEventConcurrency::Sequential => "SEQUENTIAL", - BindingEventConcurrency::Parallel => "PARALLEL", + Self::Sequential => "SEQUENTIAL", + Self::Parallel => "PARALLEL", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -298,7 +303,6 @@ pub mod binding_event_response { } } /// ListTopicSubscriptionsResponse is the message including the list of the subscribing topics. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListTopicSubscriptionsResponse { /// The list of topics. @@ -306,7 +310,6 @@ pub struct ListTopicSubscriptionsResponse { pub subscriptions: ::prost::alloc::vec::Vec, } /// TopicSubscription represents topic and metadata. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct TopicSubscription { /// Required. The name of the pubsub containing the topic below to subscribe to. @@ -317,8 +320,10 @@ pub struct TopicSubscription { pub topic: ::prost::alloc::string::String, /// The optional properties used for this topic's subscription e.g. session id #[prost(map = "string, string", tag = "3")] - pub metadata: - ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>, + pub metadata: ::std::collections::HashMap< + ::prost::alloc::string::String, + ::prost::alloc::string::String, + >, /// The optional routing rules to match against. In the gRPC interface, OnTopicEvent /// is still invoked but the matching path is sent in the TopicEventRequest. #[prost(message, optional, tag = "5")] @@ -330,7 +335,6 @@ pub struct TopicSubscription { #[prost(message, optional, tag = "7")] pub bulk_subscribe: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct TopicRoutes { /// The list of rules for this topic. @@ -340,7 +344,6 @@ pub struct TopicRoutes { #[prost(string, tag = "2")] pub default: ::prost::alloc::string::String, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct TopicRule { /// The optional CEL expression used to match the event. @@ -355,7 +358,6 @@ pub struct TopicRule { pub path: ::prost::alloc::string::String, } /// BulkSubscribeConfig is the message to pass settings for bulk subscribe -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct BulkSubscribeConfig { /// Required. Flag to enable/disable bulk subscribe @@ -369,7 +371,6 @@ pub struct BulkSubscribeConfig { pub max_await_duration_ms: i32, } /// ListInputBindingsResponse is the message including the list of input bindings. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ListInputBindingsResponse { /// The list of input bindings. @@ -378,15 +379,19 @@ pub struct ListInputBindingsResponse { } /// HealthCheckResponse is the message with the response to the health check. /// This message is currently empty as used as placeholder. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct HealthCheckResponse {} /// Generated client implementations. pub mod app_callback_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::http::Uri; + #![allow( + unused_variables, + dead_code, + missing_docs, + clippy::wildcard_imports, + clippy::let_unit_value, + )] use tonic::codegen::*; - + use tonic::codegen::http::Uri; /// AppCallback V1 allows user application to interact with Dapr runtime. /// User application needs to implement AppCallback service if it needs to /// receive message from dapr runtime. @@ -409,8 +414,8 @@ pub mod app_callback_client { where T: tonic::client::GrpcService, T::Error: Into, - T::ResponseBody: Body + Send + 'static, - ::Error: Into + Send, + T::ResponseBody: Body + std::marker::Send + 'static, + ::Error: Into + std::marker::Send, { pub fn new(inner: T) -> Self { let inner = tonic::client::Grpc::new(inner); @@ -433,8 +438,9 @@ pub mod app_callback_client { >::ResponseBody, >, >, - >>::Error: - Into + Send + Sync, + , + >>::Error: Into + std::marker::Send + std::marker::Sync, { AppCallbackClient::new(InterceptedService::new(inner, interceptor)) } @@ -472,25 +478,30 @@ pub mod app_callback_client { /// Invokes service method with InvokeRequest. pub async fn on_invoke( &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest< + super::super::super::common::v1::InvokeRequest, + >, ) -> std::result::Result< tonic::Response, tonic::Status, > { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/dapr.proto.runtime.v1.AppCallback/OnInvoke"); + let path = http::uri::PathAndQuery::from_static( + "/dapr.proto.runtime.v1.AppCallback/OnInvoke", + ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "dapr.proto.runtime.v1.AppCallback", - "OnInvoke", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("dapr.proto.runtime.v1.AppCallback", "OnInvoke"), + ); self.inner.unary(req, path, codec).await } /// Lists all topics subscribed by this app. @@ -501,67 +512,83 @@ pub mod app_callback_client { tonic::Response, tonic::Status, > { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/dapr.proto.runtime.v1.AppCallback/ListTopicSubscriptions", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "dapr.proto.runtime.v1.AppCallback", - "ListTopicSubscriptions", - )); + req.extensions_mut() + .insert( + GrpcMethod::new( + "dapr.proto.runtime.v1.AppCallback", + "ListTopicSubscriptions", + ), + ); self.inner.unary(req, path, codec).await } /// Subscribes events from Pubsub pub async fn on_topic_event( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/dapr.proto.runtime.v1.AppCallback/OnTopicEvent", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "dapr.proto.runtime.v1.AppCallback", - "OnTopicEvent", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("dapr.proto.runtime.v1.AppCallback", "OnTopicEvent"), + ); self.inner.unary(req, path, codec).await } /// Lists all input bindings subscribed by this app. pub async fn list_input_bindings( &mut self, request: impl tonic::IntoRequest<()>, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/dapr.proto.runtime.v1.AppCallback/ListInputBindings", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "dapr.proto.runtime.v1.AppCallback", - "ListInputBindings", - )); + req.extensions_mut() + .insert( + GrpcMethod::new( + "dapr.proto.runtime.v1.AppCallback", + "ListInputBindings", + ), + ); self.inner.unary(req, path, codec).await } /// Listens events from the input bindings @@ -571,33 +598,45 @@ pub mod app_callback_client { pub async fn on_binding_event( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/dapr.proto.runtime.v1.AppCallback/OnBindingEvent", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "dapr.proto.runtime.v1.AppCallback", - "OnBindingEvent", - )); + req.extensions_mut() + .insert( + GrpcMethod::new( + "dapr.proto.runtime.v1.AppCallback", + "OnBindingEvent", + ), + ); self.inner.unary(req, path, codec).await } } } /// Generated client implementations. pub mod app_callback_health_check_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::http::Uri; + #![allow( + unused_variables, + dead_code, + missing_docs, + clippy::wildcard_imports, + clippy::let_unit_value, + )] use tonic::codegen::*; - + use tonic::codegen::http::Uri; /// AppCallbackHealthCheck V1 is an optional extension to AppCallback V1 to implement /// the HealthCheck method. #[derive(Debug, Clone)] @@ -619,8 +658,8 @@ pub mod app_callback_health_check_client { where T: tonic::client::GrpcService, T::Error: Into, - T::ResponseBody: Body + Send + 'static, - ::Error: Into + Send, + T::ResponseBody: Body + std::marker::Send + 'static, + ::Error: Into + std::marker::Send, { pub fn new(inner: T) -> Self { let inner = tonic::client::Grpc::new(inner); @@ -643,10 +682,13 @@ pub mod app_callback_health_check_client { >::ResponseBody, >, >, - >>::Error: - Into + Send + Sync, + , + >>::Error: Into + std::marker::Send + std::marker::Sync, { - AppCallbackHealthCheckClient::new(InterceptedService::new(inner, interceptor)) + AppCallbackHealthCheckClient::new( + InterceptedService::new(inner, interceptor), + ) } /// Compress requests with the given encoding. /// @@ -683,33 +725,45 @@ pub mod app_callback_health_check_client { pub async fn health_check( &mut self, request: impl tonic::IntoRequest<()>, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/dapr.proto.runtime.v1.AppCallbackHealthCheck/HealthCheck", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "dapr.proto.runtime.v1.AppCallbackHealthCheck", - "HealthCheck", - )); + req.extensions_mut() + .insert( + GrpcMethod::new( + "dapr.proto.runtime.v1.AppCallbackHealthCheck", + "HealthCheck", + ), + ); self.inner.unary(req, path, codec).await } } } /// Generated client implementations. pub mod app_callback_alpha_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::http::Uri; + #![allow( + unused_variables, + dead_code, + missing_docs, + clippy::wildcard_imports, + clippy::let_unit_value, + )] use tonic::codegen::*; - + use tonic::codegen::http::Uri; /// AppCallbackAlpha V1 is an optional extension to AppCallback V1 to opt /// for Alpha RPCs. #[derive(Debug, Clone)] @@ -731,8 +785,8 @@ pub mod app_callback_alpha_client { where T: tonic::client::GrpcService, T::Error: Into, - T::ResponseBody: Body + Send + 'static, - ::Error: Into + Send, + T::ResponseBody: Body + std::marker::Send + 'static, + ::Error: Into + std::marker::Send, { pub fn new(inner: T) -> Self { let inner = tonic::client::Grpc::new(inner); @@ -755,8 +809,9 @@ pub mod app_callback_alpha_client { >::ResponseBody, >, >, - >>::Error: - Into + Send + Sync, + , + >>::Error: Into + std::marker::Send + std::marker::Sync, { AppCallbackAlphaClient::new(InterceptedService::new(inner, interceptor)) } @@ -795,57 +850,77 @@ pub mod app_callback_alpha_client { pub async fn on_bulk_topic_event_alpha1( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/dapr.proto.runtime.v1.AppCallbackAlpha/OnBulkTopicEventAlpha1", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "dapr.proto.runtime.v1.AppCallbackAlpha", - "OnBulkTopicEventAlpha1", - )); + req.extensions_mut() + .insert( + GrpcMethod::new( + "dapr.proto.runtime.v1.AppCallbackAlpha", + "OnBulkTopicEventAlpha1", + ), + ); self.inner.unary(req, path, codec).await } /// Sends job back to the app's endpoint at trigger time. pub async fn on_job_event_alpha1( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/dapr.proto.runtime.v1.AppCallbackAlpha/OnJobEventAlpha1", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "dapr.proto.runtime.v1.AppCallbackAlpha", - "OnJobEventAlpha1", - )); + req.extensions_mut() + .insert( + GrpcMethod::new( + "dapr.proto.runtime.v1.AppCallbackAlpha", + "OnJobEventAlpha1", + ), + ); self.inner.unary(req, path, codec).await } } } /// Generated server implementations. pub mod app_callback_server { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + #![allow( + unused_variables, + dead_code, + missing_docs, + clippy::wildcard_imports, + clippy::let_unit_value, + )] use tonic::codegen::*; - /// Generated trait containing gRPC methods that should be implemented for use with AppCallbackServer. #[async_trait] - pub trait AppCallback: Send + Sync + 'static { + pub trait AppCallback: std::marker::Send + std::marker::Sync + 'static { /// Invokes service method with InvokeRequest. async fn on_invoke( &self, @@ -866,12 +941,18 @@ pub mod app_callback_server { async fn on_topic_event( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; /// Lists all input bindings subscribed by this app. async fn list_input_bindings( &self, request: tonic::Request<()>, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; /// Listens events from the input bindings /// /// User application can save the states or send the events to the output @@ -879,20 +960,23 @@ pub mod app_callback_server { async fn on_binding_event( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; } /// AppCallback V1 allows user application to interact with Dapr runtime. /// User application needs to implement AppCallback service if it needs to /// receive message from dapr runtime. #[derive(Debug)] - pub struct AppCallbackServer { + pub struct AppCallbackServer { inner: Arc, accept_compression_encodings: EnabledCompressionEncodings, send_compression_encodings: EnabledCompressionEncodings, max_decoding_message_size: Option, max_encoding_message_size: Option, } - impl AppCallbackServer { + impl AppCallbackServer { pub fn new(inner: T) -> Self { Self::from_arc(Arc::new(inner)) } @@ -905,7 +989,10 @@ pub mod app_callback_server { max_encoding_message_size: None, } } - pub fn with_interceptor(inner: T, interceptor: F) -> InterceptedService + pub fn with_interceptor( + inner: T, + interceptor: F, + ) -> InterceptedService where F: tonic::service::Interceptor, { @@ -943,8 +1030,8 @@ pub mod app_callback_server { impl tonic::codegen::Service> for AppCallbackServer where T: AppCallback, - B: Body + Send + 'static, - B::Error: Into + Send + 'static, + B: Body + std::marker::Send + 'static, + B::Error: Into + std::marker::Send + 'static, { type Response = http::Response; type Error = std::convert::Infallible; @@ -960,19 +1047,26 @@ pub mod app_callback_server { "/dapr.proto.runtime.v1.AppCallback/OnInvoke" => { #[allow(non_camel_case_types)] struct OnInvokeSvc(pub Arc); - impl - tonic::server::UnaryService - for OnInvokeSvc - { + impl< + T: AppCallback, + > tonic::server::UnaryService< + super::super::super::common::v1::InvokeRequest, + > for OnInvokeSvc { type Response = super::super::super::common::v1::InvokeResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, - request: tonic::Request, + request: tonic::Request< + super::super::super::common::v1::InvokeRequest, + >, ) -> Self::Future { let inner = Arc::clone(&self.0); - let fut = - async move { ::on_invoke(&inner, request).await }; + let fut = async move { + ::on_invoke(&inner, request).await + }; Box::pin(fut) } } @@ -1001,13 +1095,21 @@ pub mod app_callback_server { "/dapr.proto.runtime.v1.AppCallback/ListTopicSubscriptions" => { #[allow(non_camel_case_types)] struct ListTopicSubscriptionsSvc(pub Arc); - impl tonic::server::UnaryService<()> for ListTopicSubscriptionsSvc { + impl tonic::server::UnaryService<()> + for ListTopicSubscriptionsSvc { type Response = super::ListTopicSubscriptionsResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call(&mut self, request: tonic::Request<()>) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::list_topic_subscriptions(&inner, request).await + ::list_topic_subscriptions( + &inner, + request, + ) + .await }; Box::pin(fut) } @@ -1037,9 +1139,15 @@ pub mod app_callback_server { "/dapr.proto.runtime.v1.AppCallback/OnTopicEvent" => { #[allow(non_camel_case_types)] struct OnTopicEventSvc(pub Arc); - impl tonic::server::UnaryService for OnTopicEventSvc { + impl< + T: AppCallback, + > tonic::server::UnaryService + for OnTopicEventSvc { type Response = super::TopicEventResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -1076,13 +1184,18 @@ pub mod app_callback_server { "/dapr.proto.runtime.v1.AppCallback/ListInputBindings" => { #[allow(non_camel_case_types)] struct ListInputBindingsSvc(pub Arc); - impl tonic::server::UnaryService<()> for ListInputBindingsSvc { + impl tonic::server::UnaryService<()> + for ListInputBindingsSvc { type Response = super::ListInputBindingsResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call(&mut self, request: tonic::Request<()>) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::list_input_bindings(&inner, request).await + ::list_input_bindings(&inner, request) + .await }; Box::pin(fut) } @@ -1112,11 +1225,15 @@ pub mod app_callback_server { "/dapr.proto.runtime.v1.AppCallback/OnBindingEvent" => { #[allow(non_camel_case_types)] struct OnBindingEventSvc(pub Arc); - impl tonic::server::UnaryService - for OnBindingEventSvc - { + impl< + T: AppCallback, + > tonic::server::UnaryService + for OnBindingEventSvc { type Response = super::BindingEventResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -1150,21 +1267,27 @@ pub mod app_callback_server { }; Box::pin(fut) } - _ => Box::pin(async move { - Ok(http::Response::builder() - .status(200) - .header("grpc-status", tonic::Code::Unimplemented as i32) - .header( - http::header::CONTENT_TYPE, - tonic::metadata::GRPC_CONTENT_TYPE, - ) - .body(empty_body()) - .unwrap()) - }), + _ => { + Box::pin(async move { + let mut response = http::Response::new(empty_body()); + let headers = response.headers_mut(); + headers + .insert( + tonic::Status::GRPC_STATUS, + (tonic::Code::Unimplemented as i32).into(), + ); + headers + .insert( + http::header::CONTENT_TYPE, + tonic::metadata::GRPC_CONTENT_TYPE, + ); + Ok(response) + }) + } } } } - impl Clone for AppCallbackServer { + impl Clone for AppCallbackServer { fn clone(&self) -> Self { let inner = self.inner.clone(); Self { @@ -1176,35 +1299,45 @@ pub mod app_callback_server { } } } - impl tonic::server::NamedService for AppCallbackServer { - const NAME: &'static str = "dapr.proto.runtime.v1.AppCallback"; + /// Generated gRPC service name + pub const SERVICE_NAME: &str = "dapr.proto.runtime.v1.AppCallback"; + impl tonic::server::NamedService for AppCallbackServer { + const NAME: &'static str = SERVICE_NAME; } } /// Generated server implementations. pub mod app_callback_health_check_server { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + #![allow( + unused_variables, + dead_code, + missing_docs, + clippy::wildcard_imports, + clippy::let_unit_value, + )] use tonic::codegen::*; - /// Generated trait containing gRPC methods that should be implemented for use with AppCallbackHealthCheckServer. #[async_trait] - pub trait AppCallbackHealthCheck: Send + Sync + 'static { + pub trait AppCallbackHealthCheck: std::marker::Send + std::marker::Sync + 'static { /// Health check. async fn health_check( &self, request: tonic::Request<()>, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; } /// AppCallbackHealthCheck V1 is an optional extension to AppCallback V1 to implement /// the HealthCheck method. #[derive(Debug)] - pub struct AppCallbackHealthCheckServer { + pub struct AppCallbackHealthCheckServer { inner: Arc, accept_compression_encodings: EnabledCompressionEncodings, send_compression_encodings: EnabledCompressionEncodings, max_decoding_message_size: Option, max_encoding_message_size: Option, } - impl AppCallbackHealthCheckServer { + impl AppCallbackHealthCheckServer { pub fn new(inner: T) -> Self { Self::from_arc(Arc::new(inner)) } @@ -1217,7 +1350,10 @@ pub mod app_callback_health_check_server { max_encoding_message_size: None, } } - pub fn with_interceptor(inner: T, interceptor: F) -> InterceptedService + pub fn with_interceptor( + inner: T, + interceptor: F, + ) -> InterceptedService where F: tonic::service::Interceptor, { @@ -1252,11 +1388,12 @@ pub mod app_callback_health_check_server { self } } - impl tonic::codegen::Service> for AppCallbackHealthCheckServer + impl tonic::codegen::Service> + for AppCallbackHealthCheckServer where T: AppCallbackHealthCheck, - B: Body + Send + 'static, - B::Error: Into + Send + 'static, + B: Body + std::marker::Send + 'static, + B::Error: Into + std::marker::Send + 'static, { type Response = http::Response; type Error = std::convert::Infallible; @@ -1272,13 +1409,18 @@ pub mod app_callback_health_check_server { "/dapr.proto.runtime.v1.AppCallbackHealthCheck/HealthCheck" => { #[allow(non_camel_case_types)] struct HealthCheckSvc(pub Arc); - impl tonic::server::UnaryService<()> for HealthCheckSvc { + impl tonic::server::UnaryService<()> + for HealthCheckSvc { type Response = super::HealthCheckResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call(&mut self, request: tonic::Request<()>) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::health_check(&inner, request).await + ::health_check(&inner, request) + .await }; Box::pin(fut) } @@ -1305,21 +1447,27 @@ pub mod app_callback_health_check_server { }; Box::pin(fut) } - _ => Box::pin(async move { - Ok(http::Response::builder() - .status(200) - .header("grpc-status", tonic::Code::Unimplemented as i32) - .header( - http::header::CONTENT_TYPE, - tonic::metadata::GRPC_CONTENT_TYPE, - ) - .body(empty_body()) - .unwrap()) - }), + _ => { + Box::pin(async move { + let mut response = http::Response::new(empty_body()); + let headers = response.headers_mut(); + headers + .insert( + tonic::Status::GRPC_STATUS, + (tonic::Code::Unimplemented as i32).into(), + ); + headers + .insert( + http::header::CONTENT_TYPE, + tonic::metadata::GRPC_CONTENT_TYPE, + ); + Ok(response) + }) + } } } } - impl Clone for AppCallbackHealthCheckServer { + impl Clone for AppCallbackHealthCheckServer { fn clone(&self) -> Self { let inner = self.inner.clone(); Self { @@ -1331,40 +1479,53 @@ pub mod app_callback_health_check_server { } } } - impl tonic::server::NamedService for AppCallbackHealthCheckServer { - const NAME: &'static str = "dapr.proto.runtime.v1.AppCallbackHealthCheck"; + /// Generated gRPC service name + pub const SERVICE_NAME: &str = "dapr.proto.runtime.v1.AppCallbackHealthCheck"; + impl tonic::server::NamedService for AppCallbackHealthCheckServer { + const NAME: &'static str = SERVICE_NAME; } } /// Generated server implementations. pub mod app_callback_alpha_server { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + #![allow( + unused_variables, + dead_code, + missing_docs, + clippy::wildcard_imports, + clippy::let_unit_value, + )] use tonic::codegen::*; - /// Generated trait containing gRPC methods that should be implemented for use with AppCallbackAlphaServer. #[async_trait] - pub trait AppCallbackAlpha: Send + Sync + 'static { + pub trait AppCallbackAlpha: std::marker::Send + std::marker::Sync + 'static { /// Subscribes bulk events from Pubsub async fn on_bulk_topic_event_alpha1( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; /// Sends job back to the app's endpoint at trigger time. async fn on_job_event_alpha1( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; } /// AppCallbackAlpha V1 is an optional extension to AppCallback V1 to opt /// for Alpha RPCs. #[derive(Debug)] - pub struct AppCallbackAlphaServer { + pub struct AppCallbackAlphaServer { inner: Arc, accept_compression_encodings: EnabledCompressionEncodings, send_compression_encodings: EnabledCompressionEncodings, max_decoding_message_size: Option, max_encoding_message_size: Option, } - impl AppCallbackAlphaServer { + impl AppCallbackAlphaServer { pub fn new(inner: T) -> Self { Self::from_arc(Arc::new(inner)) } @@ -1377,7 +1538,10 @@ pub mod app_callback_alpha_server { max_encoding_message_size: None, } } - pub fn with_interceptor(inner: T, interceptor: F) -> InterceptedService + pub fn with_interceptor( + inner: T, + interceptor: F, + ) -> InterceptedService where F: tonic::service::Interceptor, { @@ -1415,8 +1579,8 @@ pub mod app_callback_alpha_server { impl tonic::codegen::Service> for AppCallbackAlphaServer where T: AppCallbackAlpha, - B: Body + Send + 'static, - B::Error: Into + Send + 'static, + B: Body + std::marker::Send + 'static, + B::Error: Into + std::marker::Send + 'static, { type Response = http::Response; type Error = std::convert::Infallible; @@ -1432,19 +1596,25 @@ pub mod app_callback_alpha_server { "/dapr.proto.runtime.v1.AppCallbackAlpha/OnBulkTopicEventAlpha1" => { #[allow(non_camel_case_types)] struct OnBulkTopicEventAlpha1Svc(pub Arc); - impl - tonic::server::UnaryService - for OnBulkTopicEventAlpha1Svc - { + impl< + T: AppCallbackAlpha, + > tonic::server::UnaryService + for OnBulkTopicEventAlpha1Svc { type Response = super::TopicEventBulkResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::on_bulk_topic_event_alpha1(&inner, request) + ::on_bulk_topic_event_alpha1( + &inner, + request, + ) .await }; Box::pin(fut) @@ -1475,18 +1645,26 @@ pub mod app_callback_alpha_server { "/dapr.proto.runtime.v1.AppCallbackAlpha/OnJobEventAlpha1" => { #[allow(non_camel_case_types)] struct OnJobEventAlpha1Svc(pub Arc); - impl tonic::server::UnaryService - for OnJobEventAlpha1Svc - { + impl< + T: AppCallbackAlpha, + > tonic::server::UnaryService + for OnJobEventAlpha1Svc { type Response = super::JobEventResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::on_job_event_alpha1(&inner, request).await + ::on_job_event_alpha1( + &inner, + request, + ) + .await }; Box::pin(fut) } @@ -1513,21 +1691,27 @@ pub mod app_callback_alpha_server { }; Box::pin(fut) } - _ => Box::pin(async move { - Ok(http::Response::builder() - .status(200) - .header("grpc-status", tonic::Code::Unimplemented as i32) - .header( - http::header::CONTENT_TYPE, - tonic::metadata::GRPC_CONTENT_TYPE, - ) - .body(empty_body()) - .unwrap()) - }), + _ => { + Box::pin(async move { + let mut response = http::Response::new(empty_body()); + let headers = response.headers_mut(); + headers + .insert( + tonic::Status::GRPC_STATUS, + (tonic::Code::Unimplemented as i32).into(), + ); + headers + .insert( + http::header::CONTENT_TYPE, + tonic::metadata::GRPC_CONTENT_TYPE, + ); + Ok(response) + }) + } } } } - impl Clone for AppCallbackAlphaServer { + impl Clone for AppCallbackAlphaServer { fn clone(&self) -> Self { let inner = self.inner.clone(); Self { @@ -1539,12 +1723,13 @@ pub mod app_callback_alpha_server { } } } - impl tonic::server::NamedService for AppCallbackAlphaServer { - const NAME: &'static str = "dapr.proto.runtime.v1.AppCallbackAlpha"; + /// Generated gRPC service name + pub const SERVICE_NAME: &str = "dapr.proto.runtime.v1.AppCallbackAlpha"; + impl tonic::server::NamedService for AppCallbackAlphaServer { + const NAME: &'static str = SERVICE_NAME; } } /// InvokeServiceRequest represents the request message for Service invocation. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct InvokeServiceRequest { /// Required. Callee's app id. @@ -1555,7 +1740,6 @@ pub struct InvokeServiceRequest { pub message: ::core::option::Option, } /// GetStateRequest is the message to get key-value states from specific state store. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetStateRequest { /// The name of state store. @@ -1572,11 +1756,12 @@ pub struct GetStateRequest { pub consistency: i32, /// The metadata which will be sent to state store components. #[prost(map = "string, string", tag = "4")] - pub metadata: - ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>, + pub metadata: ::std::collections::HashMap< + ::prost::alloc::string::String, + ::prost::alloc::string::String, + >, } /// GetBulkStateRequest is the message to get a list of key-value states from specific state store. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetBulkStateRequest { /// The name of state store. @@ -1590,11 +1775,12 @@ pub struct GetBulkStateRequest { pub parallelism: i32, /// The metadata which will be sent to state store components. #[prost(map = "string, string", tag = "4")] - pub metadata: - ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>, + pub metadata: ::std::collections::HashMap< + ::prost::alloc::string::String, + ::prost::alloc::string::String, + >, } /// GetBulkStateResponse is the response conveying the list of state values. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetBulkStateResponse { /// The list of items containing the keys to get values for. @@ -1603,7 +1789,6 @@ pub struct GetBulkStateResponse { } /// BulkStateItem is the response item for a bulk get operation. /// Return values include the item key, data and etag. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct BulkStateItem { /// state item key @@ -1621,11 +1806,12 @@ pub struct BulkStateItem { pub error: ::prost::alloc::string::String, /// The metadata which will be sent to app. #[prost(map = "string, string", tag = "5")] - pub metadata: - ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>, + pub metadata: ::std::collections::HashMap< + ::prost::alloc::string::String, + ::prost::alloc::string::String, + >, } /// GetStateResponse is the response conveying the state value and etag. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetStateResponse { /// The byte array data @@ -1637,11 +1823,12 @@ pub struct GetStateResponse { pub etag: ::prost::alloc::string::String, /// The metadata which will be sent to app. #[prost(map = "string, string", tag = "3")] - pub metadata: - ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>, + pub metadata: ::std::collections::HashMap< + ::prost::alloc::string::String, + ::prost::alloc::string::String, + >, } /// DeleteStateRequest is the message to delete key-value states in the specific state store. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DeleteStateRequest { /// The name of state store. @@ -1660,11 +1847,12 @@ pub struct DeleteStateRequest { pub options: ::core::option::Option, /// The metadata which will be sent to state store components. #[prost(map = "string, string", tag = "5")] - pub metadata: - ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>, + pub metadata: ::std::collections::HashMap< + ::prost::alloc::string::String, + ::prost::alloc::string::String, + >, } /// DeleteBulkStateRequest is the message to delete a list of key-value states from specific state store. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DeleteBulkStateRequest { /// The name of state store. @@ -1675,7 +1863,6 @@ pub struct DeleteBulkStateRequest { pub states: ::prost::alloc::vec::Vec, } /// SaveStateRequest is the message to save multiple states into state store. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SaveStateRequest { /// The name of state store. @@ -1686,7 +1873,6 @@ pub struct SaveStateRequest { pub states: ::prost::alloc::vec::Vec, } /// QueryStateRequest is the message to query state store. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryStateRequest { /// The name of state store. @@ -1697,10 +1883,11 @@ pub struct QueryStateRequest { pub query: ::prost::alloc::string::String, /// The metadata which will be sent to state store components. #[prost(map = "string, string", tag = "3")] - pub metadata: - ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>, + pub metadata: ::std::collections::HashMap< + ::prost::alloc::string::String, + ::prost::alloc::string::String, + >, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryStateItem { /// The object key. @@ -1718,7 +1905,6 @@ pub struct QueryStateItem { pub error: ::prost::alloc::string::String, } /// QueryStateResponse is the response conveying the query results. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryStateResponse { /// An array of query results. @@ -1729,11 +1915,12 @@ pub struct QueryStateResponse { pub token: ::prost::alloc::string::String, /// The metadata which will be sent to app. #[prost(map = "string, string", tag = "3")] - pub metadata: - ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>, + pub metadata: ::std::collections::HashMap< + ::prost::alloc::string::String, + ::prost::alloc::string::String, + >, } /// PublishEventRequest is the message to publish event data to pubsub topic -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct PublishEventRequest { /// The name of the pubsub component @@ -1753,11 +1940,12 @@ pub struct PublishEventRequest { /// metadata property: /// - key : the key of the message. #[prost(map = "string, string", tag = "5")] - pub metadata: - ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>, + pub metadata: ::std::collections::HashMap< + ::prost::alloc::string::String, + ::prost::alloc::string::String, + >, } /// BulkPublishRequest is the message to bulk publish events to pubsub topic -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct BulkPublishRequest { /// The name of the pubsub component @@ -1771,11 +1959,12 @@ pub struct BulkPublishRequest { pub entries: ::prost::alloc::vec::Vec, /// The request level metadata passing to to the pubsub components #[prost(map = "string, string", tag = "4")] - pub metadata: - ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>, + pub metadata: ::std::collections::HashMap< + ::prost::alloc::string::String, + ::prost::alloc::string::String, + >, } /// BulkPublishRequestEntry is the message containing the event to be bulk published -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct BulkPublishRequestEntry { /// The request scoped unique ID referring to this message. Used to map status in response @@ -1789,11 +1978,12 @@ pub struct BulkPublishRequestEntry { pub content_type: ::prost::alloc::string::String, /// The event level metadata passing to the pubsub component #[prost(map = "string, string", tag = "4")] - pub metadata: - ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>, + pub metadata: ::std::collections::HashMap< + ::prost::alloc::string::String, + ::prost::alloc::string::String, + >, } /// BulkPublishResponse is the message returned from a BulkPublishEvent call -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct BulkPublishResponse { /// The entries for different events that failed publish in the BulkPublishEvent call @@ -1801,7 +1991,6 @@ pub struct BulkPublishResponse { pub failed_entries: ::prost::alloc::vec::Vec, } /// BulkPublishResponseFailedEntry is the message containing the entryID and error of a failed event in BulkPublishEvent call -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct BulkPublishResponseFailedEntry { /// The response scoped unique ID referring to this message @@ -1815,7 +2004,6 @@ pub struct BulkPublishResponseFailedEntry { /// subscribing to a topic via streaming. /// The first message must always be the initial request. All subsequent /// messages must be event processed responses. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SubscribeTopicEventsRequestAlpha1 { #[prost( @@ -1828,7 +2016,6 @@ pub struct SubscribeTopicEventsRequestAlpha1 { } /// Nested message and enum types in `SubscribeTopicEventsRequestAlpha1`. pub mod subscribe_topic_events_request_alpha1 { - #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum SubscribeTopicEventsRequestType { #[prost(message, tag = "1")] @@ -1839,7 +2026,6 @@ pub mod subscribe_topic_events_request_alpha1 { } /// SubscribeTopicEventsRequestInitialAlpha1 is the initial message containing /// the details for subscribing to a topic via streaming. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SubscribeTopicEventsRequestInitialAlpha1 { /// The name of the pubsub component @@ -1853,8 +2039,10 @@ pub struct SubscribeTopicEventsRequestInitialAlpha1 { /// metadata property: /// - key : the key of the message. #[prost(map = "string, string", tag = "3")] - pub metadata: - ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>, + pub metadata: ::std::collections::HashMap< + ::prost::alloc::string::String, + ::prost::alloc::string::String, + >, /// dead_letter_topic is the topic to which messages that fail to be processed /// are sent. #[prost(string, optional, tag = "4")] @@ -1862,7 +2050,6 @@ pub struct SubscribeTopicEventsRequestInitialAlpha1 { } /// SubscribeTopicEventsRequestProcessedAlpha1 is the message containing the /// subscription to a topic. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SubscribeTopicEventsRequestProcessedAlpha1 { /// id is the unique identifier for the subscription request. @@ -1874,7 +2061,6 @@ pub struct SubscribeTopicEventsRequestProcessedAlpha1 { } /// SubscribeTopicEventsResponseAlpha1 is a message returned from daprd /// when subscribing to a topic via streaming. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SubscribeTopicEventsResponseAlpha1 { #[prost( @@ -1887,7 +2073,6 @@ pub struct SubscribeTopicEventsResponseAlpha1 { } /// Nested message and enum types in `SubscribeTopicEventsResponseAlpha1`. pub mod subscribe_topic_events_response_alpha1 { - #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum SubscribeTopicEventsResponseType { #[prost(message, tag = "1")] @@ -1898,11 +2083,9 @@ pub mod subscribe_topic_events_response_alpha1 { } /// SubscribeTopicEventsResponseInitialAlpha1 is the initial response from daprd /// when subscribing to a topic. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct SubscribeTopicEventsResponseInitialAlpha1 {} /// InvokeBindingRequest is the message to send data to output bindings -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct InvokeBindingRequest { /// The name of the output binding to invoke. @@ -1920,14 +2103,15 @@ pub struct InvokeBindingRequest { /// have a default time to live. The message ttl overrides any value /// in the binding definition. #[prost(map = "string, string", tag = "3")] - pub metadata: - ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>, + pub metadata: ::std::collections::HashMap< + ::prost::alloc::string::String, + ::prost::alloc::string::String, + >, /// The name of the operation type for the binding to invoke #[prost(string, tag = "4")] pub operation: ::prost::alloc::string::String, } /// InvokeBindingResponse is the message returned from an output binding invocation -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct InvokeBindingResponse { /// The data which will be sent to output binding. @@ -1935,11 +2119,12 @@ pub struct InvokeBindingResponse { pub data: ::prost::alloc::vec::Vec, /// The metadata returned from an external system #[prost(map = "string, string", tag = "2")] - pub metadata: - ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>, + pub metadata: ::std::collections::HashMap< + ::prost::alloc::string::String, + ::prost::alloc::string::String, + >, } /// GetSecretRequest is the message to get secret from secret store. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetSecretRequest { /// The name of secret store. @@ -1950,21 +2135,23 @@ pub struct GetSecretRequest { pub key: ::prost::alloc::string::String, /// The metadata which will be sent to secret store components. #[prost(map = "string, string", tag = "3")] - pub metadata: - ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>, + pub metadata: ::std::collections::HashMap< + ::prost::alloc::string::String, + ::prost::alloc::string::String, + >, } /// GetSecretResponse is the response message to convey the requested secret. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetSecretResponse { /// data is the secret value. Some secret store, such as kubernetes secret /// store, can save multiple secrets for single secret key. #[prost(map = "string, string", tag = "1")] - pub data: - ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>, + pub data: ::std::collections::HashMap< + ::prost::alloc::string::String, + ::prost::alloc::string::String, + >, } /// GetBulkSecretRequest is the message to get the secrets from secret store. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetBulkSecretRequest { /// The name of secret store. @@ -1972,28 +2159,32 @@ pub struct GetBulkSecretRequest { pub store_name: ::prost::alloc::string::String, /// The metadata which will be sent to secret store components. #[prost(map = "string, string", tag = "2")] - pub metadata: - ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>, + pub metadata: ::std::collections::HashMap< + ::prost::alloc::string::String, + ::prost::alloc::string::String, + >, } /// SecretResponse is a map of decrypted string/string values -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SecretResponse { #[prost(map = "string, string", tag = "1")] - pub secrets: - ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>, + pub secrets: ::std::collections::HashMap< + ::prost::alloc::string::String, + ::prost::alloc::string::String, + >, } /// GetBulkSecretResponse is the response message to convey the requested secrets. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetBulkSecretResponse { /// data hold the secret values. Some secret store, such as kubernetes secret /// store, can save multiple secrets for single secret key. #[prost(map = "string, message", tag = "1")] - pub data: ::std::collections::HashMap<::prost::alloc::string::String, SecretResponse>, + pub data: ::std::collections::HashMap< + ::prost::alloc::string::String, + SecretResponse, + >, } /// TransactionalStateOperation is the message to execute a specified operation with a key-value pair. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct TransactionalStateOperation { /// The type of operation to be executed @@ -2004,7 +2195,6 @@ pub struct TransactionalStateOperation { pub request: ::core::option::Option, } /// ExecuteStateTransactionRequest is the message to execute multiple operations on a specified store. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ExecuteStateTransactionRequest { /// Required. name of state store. @@ -2015,11 +2205,12 @@ pub struct ExecuteStateTransactionRequest { pub operations: ::prost::alloc::vec::Vec, /// The metadata used for transactional operations. #[prost(map = "string, string", tag = "3")] - pub metadata: - ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>, + pub metadata: ::std::collections::HashMap< + ::prost::alloc::string::String, + ::prost::alloc::string::String, + >, } /// RegisterActorTimerRequest is the message to register a timer for an actor of a given type and id. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RegisterActorTimerRequest { #[prost(string, tag = "1")] @@ -2040,7 +2231,6 @@ pub struct RegisterActorTimerRequest { pub ttl: ::prost::alloc::string::String, } /// UnregisterActorTimerRequest is the message to unregister an actor timer -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct UnregisterActorTimerRequest { #[prost(string, tag = "1")] @@ -2051,7 +2241,6 @@ pub struct UnregisterActorTimerRequest { pub name: ::prost::alloc::string::String, } /// RegisterActorReminderRequest is the message to register a reminder for an actor of a given type and id. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RegisterActorReminderRequest { #[prost(string, tag = "1")] @@ -2070,7 +2259,6 @@ pub struct RegisterActorReminderRequest { pub ttl: ::prost::alloc::string::String, } /// UnregisterActorReminderRequest is the message to unregister an actor reminder. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct UnregisterActorReminderRequest { #[prost(string, tag = "1")] @@ -2081,7 +2269,6 @@ pub struct UnregisterActorReminderRequest { pub name: ::prost::alloc::string::String, } /// GetActorStateRequest is the message to get key-value states from specific actor. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetActorStateRequest { #[prost(string, tag = "1")] @@ -2092,18 +2279,18 @@ pub struct GetActorStateRequest { pub key: ::prost::alloc::string::String, } /// GetActorStateResponse is the response conveying the actor's state value. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetActorStateResponse { #[prost(bytes = "vec", tag = "1")] pub data: ::prost::alloc::vec::Vec, /// The metadata which will be sent to app. #[prost(map = "string, string", tag = "2")] - pub metadata: - ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>, + pub metadata: ::std::collections::HashMap< + ::prost::alloc::string::String, + ::prost::alloc::string::String, + >, } /// ExecuteActorStateTransactionRequest is the message to execute multiple operations on a specified actor. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ExecuteActorStateTransactionRequest { #[prost(string, tag = "1")] @@ -2114,7 +2301,6 @@ pub struct ExecuteActorStateTransactionRequest { pub operations: ::prost::alloc::vec::Vec, } /// TransactionalActorStateOperation is the message to execute a specified operation with a key-value pair. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct TransactionalActorStateOperation { #[prost(string, tag = "1")] @@ -2128,11 +2314,12 @@ pub struct TransactionalActorStateOperation { /// Common metadata property: /// - ttlInSeconds : the time to live in seconds for the stored value. #[prost(map = "string, string", tag = "4")] - pub metadata: - ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>, + pub metadata: ::std::collections::HashMap< + ::prost::alloc::string::String, + ::prost::alloc::string::String, + >, } /// InvokeActorRequest is the message to call an actor. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct InvokeActorRequest { #[prost(string, tag = "1")] @@ -2144,11 +2331,12 @@ pub struct InvokeActorRequest { #[prost(bytes = "vec", tag = "4")] pub data: ::prost::alloc::vec::Vec, #[prost(map = "string, string", tag = "5")] - pub metadata: - ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>, + pub metadata: ::std::collections::HashMap< + ::prost::alloc::string::String, + ::prost::alloc::string::String, + >, } /// InvokeActorResponse is the method that returns an actor invocation response. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct InvokeActorResponse { #[prost(bytes = "vec", tag = "1")] @@ -2157,11 +2345,9 @@ pub struct InvokeActorResponse { /// GetMetadataRequest is the message for the GetMetadata request. /// /// Empty -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct GetMetadataRequest {} /// GetMetadataResponse is a message that is returned on GetMetadata rpc call. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetMetadataResponse { #[prost(string, tag = "1")] @@ -2173,8 +2359,10 @@ pub struct GetMetadataResponse { #[prost(message, repeated, tag = "3")] pub registered_components: ::prost::alloc::vec::Vec, #[prost(map = "string, string", tag = "4")] - pub extended_metadata: - ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>, + pub extended_metadata: ::std::collections::HashMap< + ::prost::alloc::string::String, + ::prost::alloc::string::String, + >, #[prost(message, repeated, tag = "5")] pub subscriptions: ::prost::alloc::vec::Vec, #[prost(message, repeated, tag = "6")] @@ -2189,7 +2377,6 @@ pub struct GetMetadataResponse { #[prost(message, optional, tag = "10")] pub actor_runtime: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ActorRuntime { /// Contains an enum indicating whether the actor runtime has been initialized. @@ -2207,7 +2394,17 @@ pub struct ActorRuntime { } /// Nested message and enum types in `ActorRuntime`. pub mod actor_runtime { - #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] + #[derive( + Clone, + Copy, + Debug, + PartialEq, + Eq, + Hash, + PartialOrd, + Ord, + ::prost::Enumeration + )] #[repr(i32)] pub enum ActorRuntimeStatus { /// Indicates that the actor runtime is still being initialized. @@ -2225,9 +2422,9 @@ pub mod actor_runtime { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - ActorRuntimeStatus::Initializing => "INITIALIZING", - ActorRuntimeStatus::Disabled => "DISABLED", - ActorRuntimeStatus::Running => "RUNNING", + Self::Initializing => "INITIALIZING", + Self::Disabled => "DISABLED", + Self::Running => "RUNNING", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -2241,7 +2438,6 @@ pub mod actor_runtime { } } } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ActiveActorsCount { #[prost(string, tag = "1")] @@ -2249,7 +2445,6 @@ pub struct ActiveActorsCount { #[prost(int32, tag = "2")] pub count: i32, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RegisteredComponents { #[prost(string, tag = "1")] @@ -2261,13 +2456,11 @@ pub struct RegisteredComponents { #[prost(string, repeated, tag = "4")] pub capabilities: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MetadataHttpEndpoint { #[prost(string, tag = "1")] pub name: ::prost::alloc::string::String, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct AppConnectionProperties { #[prost(int32, tag = "1")] @@ -2281,7 +2474,6 @@ pub struct AppConnectionProperties { #[prost(message, optional, tag = "5")] pub health: ::core::option::Option, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct AppConnectionHealthProperties { #[prost(string, tag = "1")] @@ -2293,7 +2485,6 @@ pub struct AppConnectionHealthProperties { #[prost(int32, tag = "4")] pub health_threshold: i32, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct PubsubSubscription { #[prost(string, tag = "1")] @@ -2301,8 +2492,10 @@ pub struct PubsubSubscription { #[prost(string, tag = "2")] pub topic: ::prost::alloc::string::String, #[prost(map = "string, string", tag = "3")] - pub metadata: - ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>, + pub metadata: ::std::collections::HashMap< + ::prost::alloc::string::String, + ::prost::alloc::string::String, + >, #[prost(message, optional, tag = "4")] pub rules: ::core::option::Option, #[prost(string, tag = "5")] @@ -2310,13 +2503,11 @@ pub struct PubsubSubscription { #[prost(enumeration = "PubsubSubscriptionType", tag = "6")] pub r#type: i32, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct PubsubSubscriptionRules { #[prost(message, repeated, tag = "1")] pub rules: ::prost::alloc::vec::Vec, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct PubsubSubscriptionRule { #[prost(string, tag = "1")] @@ -2324,7 +2515,6 @@ pub struct PubsubSubscriptionRule { #[prost(string, tag = "2")] pub path: ::prost::alloc::string::String, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SetMetadataRequest { #[prost(string, tag = "1")] @@ -2333,7 +2523,6 @@ pub struct SetMetadataRequest { pub value: ::prost::alloc::string::String, } /// GetConfigurationRequest is the message to get a list of key-value configuration from specified configuration store. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetConfigurationRequest { /// Required. The name of configuration store. @@ -2346,12 +2535,13 @@ pub struct GetConfigurationRequest { pub keys: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, /// Optional. The metadata which will be sent to configuration store components. #[prost(map = "string, string", tag = "3")] - pub metadata: - ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>, + pub metadata: ::std::collections::HashMap< + ::prost::alloc::string::String, + ::prost::alloc::string::String, + >, } /// GetConfigurationResponse is the response conveying the list of configuration values. /// It should be the FULL configuration of specified application which contains all of its configuration items. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetConfigurationResponse { #[prost(map = "string, message", tag = "1")] @@ -2361,7 +2551,6 @@ pub struct GetConfigurationResponse { >, } /// SubscribeConfigurationRequest is the message to get a list of key-value configuration from specified configuration store. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SubscribeConfigurationRequest { /// The name of configuration store. @@ -2374,11 +2563,12 @@ pub struct SubscribeConfigurationRequest { pub keys: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, /// The metadata which will be sent to configuration store components. #[prost(map = "string, string", tag = "3")] - pub metadata: - ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>, + pub metadata: ::std::collections::HashMap< + ::prost::alloc::string::String, + ::prost::alloc::string::String, + >, } /// UnSubscribeConfigurationRequest is the message to stop watching the key-value configuration. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct UnsubscribeConfigurationRequest { /// The name of configuration store. @@ -2388,7 +2578,6 @@ pub struct UnsubscribeConfigurationRequest { #[prost(string, tag = "2")] pub id: ::prost::alloc::string::String, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SubscribeConfigurationResponse { /// Subscribe id, used to stop subscription. @@ -2401,7 +2590,6 @@ pub struct SubscribeConfigurationResponse { super::super::common::v1::ConfigurationItem, >, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct UnsubscribeConfigurationResponse { #[prost(bool, tag = "1")] @@ -2409,7 +2597,6 @@ pub struct UnsubscribeConfigurationResponse { #[prost(string, tag = "2")] pub message: ::prost::alloc::string::String, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct TryLockRequest { /// Required. The lock store name,e.g. `redis`. @@ -2440,13 +2627,11 @@ pub struct TryLockRequest { #[prost(int32, tag = "4")] pub expiry_in_seconds: i32, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct TryLockResponse { #[prost(bool, tag = "1")] pub success: bool, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct UnlockRequest { #[prost(string, tag = "1")] @@ -2457,7 +2642,6 @@ pub struct UnlockRequest { #[prost(string, tag = "3")] pub lock_owner: ::prost::alloc::string::String, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct UnlockResponse { #[prost(enumeration = "unlock_response::Status", tag = "1")] @@ -2465,7 +2649,17 @@ pub struct UnlockResponse { } /// Nested message and enum types in `UnlockResponse`. pub mod unlock_response { - #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] + #[derive( + Clone, + Copy, + Debug, + PartialEq, + Eq, + Hash, + PartialOrd, + Ord, + ::prost::Enumeration + )] #[repr(i32)] pub enum Status { Success = 0, @@ -2480,10 +2674,10 @@ pub mod unlock_response { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - Status::Success => "SUCCESS", - Status::LockDoesNotExist => "LOCK_DOES_NOT_EXIST", - Status::LockBelongsToOthers => "LOCK_BELONGS_TO_OTHERS", - Status::InternalError => "INTERNAL_ERROR", + Self::Success => "SUCCESS", + Self::LockDoesNotExist => "LOCK_DOES_NOT_EXIST", + Self::LockBelongsToOthers => "LOCK_BELONGS_TO_OTHERS", + Self::InternalError => "INTERNAL_ERROR", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -2499,7 +2693,6 @@ pub mod unlock_response { } } /// SubtleGetKeyRequest is the request object for SubtleGetKeyAlpha1. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SubtleGetKeyRequest { /// Name of the component @@ -2514,7 +2707,17 @@ pub struct SubtleGetKeyRequest { } /// Nested message and enum types in `SubtleGetKeyRequest`. pub mod subtle_get_key_request { - #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] + #[derive( + Clone, + Copy, + Debug, + PartialEq, + Eq, + Hash, + PartialOrd, + Ord, + ::prost::Enumeration + )] #[repr(i32)] pub enum KeyFormat { /// PEM (PKIX) (default) @@ -2529,8 +2732,8 @@ pub mod subtle_get_key_request { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - KeyFormat::Pem => "PEM", - KeyFormat::Json => "JSON", + Self::Pem => "PEM", + Self::Json => "JSON", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -2544,7 +2747,6 @@ pub mod subtle_get_key_request { } } /// SubtleGetKeyResponse is the response for SubtleGetKeyAlpha1. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SubtleGetKeyResponse { /// Name (or name/version) of the key. @@ -2556,7 +2758,6 @@ pub struct SubtleGetKeyResponse { pub public_key: ::prost::alloc::string::String, } /// SubtleEncryptRequest is the request for SubtleEncryptAlpha1. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SubtleEncryptRequest { /// Name of the component @@ -2580,7 +2781,6 @@ pub struct SubtleEncryptRequest { pub associated_data: ::prost::alloc::vec::Vec, } /// SubtleEncryptResponse is the response for SubtleEncryptAlpha1. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SubtleEncryptResponse { /// Encrypted ciphertext. @@ -2592,7 +2792,6 @@ pub struct SubtleEncryptResponse { pub tag: ::prost::alloc::vec::Vec, } /// SubtleDecryptRequest is the request for SubtleDecryptAlpha1. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SubtleDecryptRequest { /// Name of the component @@ -2620,7 +2819,6 @@ pub struct SubtleDecryptRequest { pub associated_data: ::prost::alloc::vec::Vec, } /// SubtleDecryptResponse is the response for SubtleDecryptAlpha1. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SubtleDecryptResponse { /// Decrypted plaintext. @@ -2628,7 +2826,6 @@ pub struct SubtleDecryptResponse { pub plaintext: ::prost::alloc::vec::Vec, } /// SubtleWrapKeyRequest is the request for SubtleWrapKeyAlpha1. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SubtleWrapKeyRequest { /// Name of the component @@ -2652,7 +2849,6 @@ pub struct SubtleWrapKeyRequest { pub associated_data: ::prost::alloc::vec::Vec, } /// SubtleWrapKeyResponse is the response for SubtleWrapKeyAlpha1. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SubtleWrapKeyResponse { /// Wrapped key. @@ -2664,7 +2860,6 @@ pub struct SubtleWrapKeyResponse { pub tag: ::prost::alloc::vec::Vec, } /// SubtleUnwrapKeyRequest is the request for SubtleUnwrapKeyAlpha1. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SubtleUnwrapKeyRequest { /// Name of the component @@ -2692,7 +2887,6 @@ pub struct SubtleUnwrapKeyRequest { pub associated_data: ::prost::alloc::vec::Vec, } /// SubtleUnwrapKeyResponse is the response for SubtleUnwrapKeyAlpha1. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SubtleUnwrapKeyResponse { /// Key in plaintext @@ -2700,7 +2894,6 @@ pub struct SubtleUnwrapKeyResponse { pub plaintext_key: ::prost::alloc::vec::Vec, } /// SubtleSignRequest is the request for SubtleSignAlpha1. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SubtleSignRequest { /// Name of the component @@ -2717,7 +2910,6 @@ pub struct SubtleSignRequest { pub key_name: ::prost::alloc::string::String, } /// SubtleSignResponse is the response for SubtleSignAlpha1. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SubtleSignResponse { /// The signature that was computed @@ -2725,7 +2917,6 @@ pub struct SubtleSignResponse { pub signature: ::prost::alloc::vec::Vec, } /// SubtleVerifyRequest is the request for SubtleVerifyAlpha1. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SubtleVerifyRequest { /// Name of the component @@ -2745,7 +2936,6 @@ pub struct SubtleVerifyRequest { pub signature: ::prost::alloc::vec::Vec, } /// SubtleVerifyResponse is the response for SubtleVerifyAlpha1. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct SubtleVerifyResponse { /// True if the signature is valid. @@ -2753,7 +2943,6 @@ pub struct SubtleVerifyResponse { pub valid: bool, } /// EncryptRequest is the request for EncryptAlpha1. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct EncryptRequest { /// Request details. Must be present in the first message only. @@ -2764,7 +2953,6 @@ pub struct EncryptRequest { pub payload: ::core::option::Option, } /// EncryptRequestOptions contains options for the first message in the EncryptAlpha1 request. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct EncryptRequestOptions { /// Name of the component. Required. @@ -2793,7 +2981,6 @@ pub struct EncryptRequestOptions { pub decryption_key_name: ::prost::alloc::string::String, } /// EncryptResponse is the response for EncryptAlpha1. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct EncryptResponse { /// Chunk of data. @@ -2801,7 +2988,6 @@ pub struct EncryptResponse { pub payload: ::core::option::Option, } /// DecryptRequest is the request for DecryptAlpha1. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DecryptRequest { /// Request details. Must be present in the first message only. @@ -2812,7 +2998,6 @@ pub struct DecryptRequest { pub payload: ::core::option::Option, } /// DecryptRequestOptions contains options for the first message in the DecryptAlpha1 request. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DecryptRequestOptions { /// Name of the component @@ -2825,7 +3010,6 @@ pub struct DecryptRequestOptions { pub key_name: ::prost::alloc::string::String, } /// DecryptResponse is the response for DecryptAlpha1. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DecryptResponse { /// Chunk of data. @@ -2833,7 +3017,6 @@ pub struct DecryptResponse { pub payload: ::core::option::Option, } /// GetWorkflowRequest is the request for GetWorkflowBeta1. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetWorkflowRequest { /// ID of the workflow instance to query. @@ -2844,7 +3027,6 @@ pub struct GetWorkflowRequest { pub workflow_component: ::prost::alloc::string::String, } /// GetWorkflowResponse is the response for GetWorkflowBeta1. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetWorkflowResponse { /// ID of the workflow instance. @@ -2864,11 +3046,12 @@ pub struct GetWorkflowResponse { pub runtime_status: ::prost::alloc::string::String, /// Additional component-specific properties of the workflow instance. #[prost(map = "string, string", tag = "6")] - pub properties: - ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>, + pub properties: ::std::collections::HashMap< + ::prost::alloc::string::String, + ::prost::alloc::string::String, + >, } /// StartWorkflowRequest is the request for StartWorkflowBeta1. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct StartWorkflowRequest { /// The ID to assign to the started workflow instance. If empty, a random ID is generated. @@ -2882,14 +3065,15 @@ pub struct StartWorkflowRequest { pub workflow_name: ::prost::alloc::string::String, /// Additional component-specific options for starting the workflow instance. #[prost(map = "string, string", tag = "4")] - pub options: - ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>, + pub options: ::std::collections::HashMap< + ::prost::alloc::string::String, + ::prost::alloc::string::String, + >, /// Input data for the workflow instance. #[prost(bytes = "vec", tag = "5")] pub input: ::prost::alloc::vec::Vec, } /// StartWorkflowResponse is the response for StartWorkflowBeta1. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct StartWorkflowResponse { /// ID of the started workflow instance. @@ -2897,7 +3081,6 @@ pub struct StartWorkflowResponse { pub instance_id: ::prost::alloc::string::String, } /// TerminateWorkflowRequest is the request for TerminateWorkflowBeta1. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct TerminateWorkflowRequest { /// ID of the workflow instance to terminate. @@ -2908,7 +3091,6 @@ pub struct TerminateWorkflowRequest { pub workflow_component: ::prost::alloc::string::String, } /// PauseWorkflowRequest is the request for PauseWorkflowBeta1. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct PauseWorkflowRequest { /// ID of the workflow instance to pause. @@ -2919,7 +3101,6 @@ pub struct PauseWorkflowRequest { pub workflow_component: ::prost::alloc::string::String, } /// ResumeWorkflowRequest is the request for ResumeWorkflowBeta1. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ResumeWorkflowRequest { /// ID of the workflow instance to resume. @@ -2930,7 +3111,6 @@ pub struct ResumeWorkflowRequest { pub workflow_component: ::prost::alloc::string::String, } /// RaiseEventWorkflowRequest is the request for RaiseEventWorkflowBeta1. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RaiseEventWorkflowRequest { /// ID of the workflow instance to raise an event for. @@ -2947,7 +3127,6 @@ pub struct RaiseEventWorkflowRequest { pub event_data: ::prost::alloc::vec::Vec, } /// PurgeWorkflowRequest is the request for PurgeWorkflowBeta1. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct PurgeWorkflowRequest { /// ID of the workflow instance to purge. @@ -2960,12 +3139,10 @@ pub struct PurgeWorkflowRequest { /// ShutdownRequest is the request for Shutdown. /// /// Empty -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct ShutdownRequest {} /// Job is the definition of a job. At least one of schedule or due_time must be /// provided but can also be provided together. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Job { /// The unique name for the job. @@ -3014,7 +3191,6 @@ pub struct Job { pub data: ::core::option::Option<::prost_types::Any>, } /// ScheduleJobRequest is the message to create/schedule the job. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ScheduleJobRequest { /// The job details. @@ -3024,11 +3200,9 @@ pub struct ScheduleJobRequest { /// ScheduleJobResponse is the message response to create/schedule the job. /// /// Empty -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct ScheduleJobResponse {} /// GetJobRequest is the message to retrieve a job. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetJobRequest { /// The name of the job. @@ -3036,7 +3210,6 @@ pub struct GetJobRequest { pub name: ::prost::alloc::string::String, } /// GetJobResponse is the message's response for a job retrieved. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetJobResponse { /// The job details. @@ -3044,7 +3217,6 @@ pub struct GetJobResponse { pub job: ::core::option::Option, } /// DeleteJobRequest is the message to delete the job by name. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DeleteJobRequest { /// The name of the job. @@ -3054,7 +3226,6 @@ pub struct DeleteJobRequest { /// DeleteJobResponse is the message response to delete the job by name. /// /// Empty -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct DeleteJobResponse {} /// PubsubSubscriptionType indicates the type of subscription @@ -3077,10 +3248,10 @@ impl PubsubSubscriptionType { /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - PubsubSubscriptionType::Unknown => "UNKNOWN", - PubsubSubscriptionType::Declarative => "DECLARATIVE", - PubsubSubscriptionType::Programmatic => "PROGRAMMATIC", - PubsubSubscriptionType::Streaming => "STREAMING", + Self::Unknown => "UNKNOWN", + Self::Declarative => "DECLARATIVE", + Self::Programmatic => "PROGRAMMATIC", + Self::Streaming => "STREAMING", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -3096,10 +3267,15 @@ impl PubsubSubscriptionType { } /// Generated client implementations. pub mod dapr_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::http::Uri; + #![allow( + unused_variables, + dead_code, + missing_docs, + clippy::wildcard_imports, + clippy::let_unit_value, + )] use tonic::codegen::*; - + use tonic::codegen::http::Uri; /// Dapr service provides APIs to user application to access Dapr building blocks. #[derive(Debug, Clone)] pub struct DaprClient { @@ -3120,8 +3296,8 @@ pub mod dapr_client { where T: tonic::client::GrpcService, T::Error: Into, - T::ResponseBody: Body + Send + 'static, - ::Error: Into + Send, + T::ResponseBody: Body + std::marker::Send + 'static, + ::Error: Into + std::marker::Send, { pub fn new(inner: T) -> Self { let inner = tonic::client::Grpc::new(inner); @@ -3131,7 +3307,10 @@ pub mod dapr_client { let inner = tonic::client::Grpc::with_origin(inner, origin); Self { inner } } - pub fn with_interceptor(inner: T, interceptor: F) -> DaprClient> + pub fn with_interceptor( + inner: T, + interceptor: F, + ) -> DaprClient> where F: tonic::service::Interceptor, T::ResponseBody: Default, @@ -3141,8 +3320,9 @@ pub mod dapr_client { >::ResponseBody, >, >, - >>::Error: - Into + Send + Sync, + , + >>::Error: Into + std::marker::Send + std::marker::Sync, { DaprClient::new(InterceptedService::new(inner, interceptor)) } @@ -3186,35 +3366,43 @@ pub mod dapr_client { tonic::Response, tonic::Status, > { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/dapr.proto.runtime.v1.Dapr/InvokeService"); + let path = http::uri::PathAndQuery::from_static( + "/dapr.proto.runtime.v1.Dapr/InvokeService", + ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "dapr.proto.runtime.v1.Dapr", - "InvokeService", - )); + req.extensions_mut() + .insert(GrpcMethod::new("dapr.proto.runtime.v1.Dapr", "InvokeService")); self.inner.unary(req, path, codec).await } /// Gets the state for a specific key. pub async fn get_state( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static("/dapr.proto.runtime.v1.Dapr/GetState"); + let path = http::uri::PathAndQuery::from_static( + "/dapr.proto.runtime.v1.Dapr/GetState", + ); let mut req = request.into_request(); req.extensions_mut() .insert(GrpcMethod::new("dapr.proto.runtime.v1.Dapr", "GetState")); @@ -3224,22 +3412,25 @@ pub mod dapr_client { pub async fn get_bulk_state( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/dapr.proto.runtime.v1.Dapr/GetBulkState"); + let path = http::uri::PathAndQuery::from_static( + "/dapr.proto.runtime.v1.Dapr/GetBulkState", + ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "dapr.proto.runtime.v1.Dapr", - "GetBulkState", - )); + req.extensions_mut() + .insert(GrpcMethod::new("dapr.proto.runtime.v1.Dapr", "GetBulkState")); self.inner.unary(req, path, codec).await } /// Saves the state for a specific key. @@ -3247,15 +3438,18 @@ pub mod dapr_client { &mut self, request: impl tonic::IntoRequest, ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/dapr.proto.runtime.v1.Dapr/SaveState"); + let path = http::uri::PathAndQuery::from_static( + "/dapr.proto.runtime.v1.Dapr/SaveState", + ); let mut req = request.into_request(); req.extensions_mut() .insert(GrpcMethod::new("dapr.proto.runtime.v1.Dapr", "SaveState")); @@ -3265,23 +3459,27 @@ pub mod dapr_client { pub async fn query_state_alpha1( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/dapr.proto.runtime.v1.Dapr/QueryStateAlpha1", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "dapr.proto.runtime.v1.Dapr", - "QueryStateAlpha1", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("dapr.proto.runtime.v1.Dapr", "QueryStateAlpha1"), + ); self.inner.unary(req, path, codec).await } /// Deletes the state for a specific key. @@ -3289,15 +3487,18 @@ pub mod dapr_client { &mut self, request: impl tonic::IntoRequest, ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/dapr.proto.runtime.v1.Dapr/DeleteState"); + let path = http::uri::PathAndQuery::from_static( + "/dapr.proto.runtime.v1.Dapr/DeleteState", + ); let mut req = request.into_request(); req.extensions_mut() .insert(GrpcMethod::new("dapr.proto.runtime.v1.Dapr", "DeleteState")); @@ -3308,20 +3509,23 @@ pub mod dapr_client { &mut self, request: impl tonic::IntoRequest, ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/dapr.proto.runtime.v1.Dapr/DeleteBulkState"); + let path = http::uri::PathAndQuery::from_static( + "/dapr.proto.runtime.v1.Dapr/DeleteBulkState", + ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "dapr.proto.runtime.v1.Dapr", - "DeleteBulkState", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("dapr.proto.runtime.v1.Dapr", "DeleteBulkState"), + ); self.inner.unary(req, path, codec).await } /// Executes transactions for a specified store @@ -3329,21 +3533,26 @@ pub mod dapr_client { &mut self, request: impl tonic::IntoRequest, ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/dapr.proto.runtime.v1.Dapr/ExecuteStateTransaction", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "dapr.proto.runtime.v1.Dapr", - "ExecuteStateTransaction", - )); + req.extensions_mut() + .insert( + GrpcMethod::new( + "dapr.proto.runtime.v1.Dapr", + "ExecuteStateTransaction", + ), + ); self.inner.unary(req, path, codec).await } /// Publishes events to the specific topic. @@ -3351,43 +3560,51 @@ pub mod dapr_client { &mut self, request: impl tonic::IntoRequest, ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/dapr.proto.runtime.v1.Dapr/PublishEvent"); + let path = http::uri::PathAndQuery::from_static( + "/dapr.proto.runtime.v1.Dapr/PublishEvent", + ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "dapr.proto.runtime.v1.Dapr", - "PublishEvent", - )); + req.extensions_mut() + .insert(GrpcMethod::new("dapr.proto.runtime.v1.Dapr", "PublishEvent")); self.inner.unary(req, path, codec).await } /// Bulk Publishes multiple events to the specified topic. pub async fn bulk_publish_event_alpha1( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/dapr.proto.runtime.v1.Dapr/BulkPublishEventAlpha1", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "dapr.proto.runtime.v1.Dapr", - "BulkPublishEventAlpha1", - )); + req.extensions_mut() + .insert( + GrpcMethod::new( + "dapr.proto.runtime.v1.Dapr", + "BulkPublishEventAlpha1", + ), + ); self.inner.unary(req, path, codec).await } /// SubscribeTopicEventsAlpha1 subscribes to a PubSub topic and receives topic @@ -3398,62 +3615,78 @@ pub mod dapr_client { Message = super::SubscribeTopicEventsRequestAlpha1, >, ) -> std::result::Result< - tonic::Response>, + tonic::Response< + tonic::codec::Streaming, + >, tonic::Status, > { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/dapr.proto.runtime.v1.Dapr/SubscribeTopicEventsAlpha1", ); let mut req = request.into_streaming_request(); - req.extensions_mut().insert(GrpcMethod::new( - "dapr.proto.runtime.v1.Dapr", - "SubscribeTopicEventsAlpha1", - )); + req.extensions_mut() + .insert( + GrpcMethod::new( + "dapr.proto.runtime.v1.Dapr", + "SubscribeTopicEventsAlpha1", + ), + ); self.inner.streaming(req, path, codec).await } /// Invokes binding data to specific output bindings pub async fn invoke_binding( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/dapr.proto.runtime.v1.Dapr/InvokeBinding"); + let path = http::uri::PathAndQuery::from_static( + "/dapr.proto.runtime.v1.Dapr/InvokeBinding", + ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "dapr.proto.runtime.v1.Dapr", - "InvokeBinding", - )); + req.extensions_mut() + .insert(GrpcMethod::new("dapr.proto.runtime.v1.Dapr", "InvokeBinding")); self.inner.unary(req, path, codec).await } /// Gets secrets from secret stores. pub async fn get_secret( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/dapr.proto.runtime.v1.Dapr/GetSecret"); + let path = http::uri::PathAndQuery::from_static( + "/dapr.proto.runtime.v1.Dapr/GetSecret", + ); let mut req = request.into_request(); req.extensions_mut() .insert(GrpcMethod::new("dapr.proto.runtime.v1.Dapr", "GetSecret")); @@ -3463,22 +3696,25 @@ pub mod dapr_client { pub async fn get_bulk_secret( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/dapr.proto.runtime.v1.Dapr/GetBulkSecret"); + let path = http::uri::PathAndQuery::from_static( + "/dapr.proto.runtime.v1.Dapr/GetBulkSecret", + ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "dapr.proto.runtime.v1.Dapr", - "GetBulkSecret", - )); + req.extensions_mut() + .insert(GrpcMethod::new("dapr.proto.runtime.v1.Dapr", "GetBulkSecret")); self.inner.unary(req, path, codec).await } /// Register an actor timer. @@ -3486,21 +3722,23 @@ pub mod dapr_client { &mut self, request: impl tonic::IntoRequest, ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/dapr.proto.runtime.v1.Dapr/RegisterActorTimer", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "dapr.proto.runtime.v1.Dapr", - "RegisterActorTimer", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("dapr.proto.runtime.v1.Dapr", "RegisterActorTimer"), + ); self.inner.unary(req, path, codec).await } /// Unregister an actor timer. @@ -3508,21 +3746,23 @@ pub mod dapr_client { &mut self, request: impl tonic::IntoRequest, ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/dapr.proto.runtime.v1.Dapr/UnregisterActorTimer", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "dapr.proto.runtime.v1.Dapr", - "UnregisterActorTimer", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("dapr.proto.runtime.v1.Dapr", "UnregisterActorTimer"), + ); self.inner.unary(req, path, codec).await } /// Register an actor reminder. @@ -3530,21 +3770,26 @@ pub mod dapr_client { &mut self, request: impl tonic::IntoRequest, ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/dapr.proto.runtime.v1.Dapr/RegisterActorReminder", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "dapr.proto.runtime.v1.Dapr", - "RegisterActorReminder", - )); + req.extensions_mut() + .insert( + GrpcMethod::new( + "dapr.proto.runtime.v1.Dapr", + "RegisterActorReminder", + ), + ); self.inner.unary(req, path, codec).await } /// Unregister an actor reminder. @@ -3552,43 +3797,51 @@ pub mod dapr_client { &mut self, request: impl tonic::IntoRequest, ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/dapr.proto.runtime.v1.Dapr/UnregisterActorReminder", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "dapr.proto.runtime.v1.Dapr", - "UnregisterActorReminder", - )); + req.extensions_mut() + .insert( + GrpcMethod::new( + "dapr.proto.runtime.v1.Dapr", + "UnregisterActorReminder", + ), + ); self.inner.unary(req, path, codec).await } /// Gets the state for a specific actor. pub async fn get_actor_state( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/dapr.proto.runtime.v1.Dapr/GetActorState"); + let path = http::uri::PathAndQuery::from_static( + "/dapr.proto.runtime.v1.Dapr/GetActorState", + ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "dapr.proto.runtime.v1.Dapr", - "GetActorState", - )); + req.extensions_mut() + .insert(GrpcMethod::new("dapr.proto.runtime.v1.Dapr", "GetActorState")); self.inner.unary(req, path, codec).await } /// Executes state transactions for a specified actor @@ -3596,38 +3849,48 @@ pub mod dapr_client { &mut self, request: impl tonic::IntoRequest, ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/dapr.proto.runtime.v1.Dapr/ExecuteActorStateTransaction", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "dapr.proto.runtime.v1.Dapr", - "ExecuteActorStateTransaction", - )); + req.extensions_mut() + .insert( + GrpcMethod::new( + "dapr.proto.runtime.v1.Dapr", + "ExecuteActorStateTransaction", + ), + ); self.inner.unary(req, path, codec).await } /// InvokeActor calls a method on an actor. pub async fn invoke_actor( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/dapr.proto.runtime.v1.Dapr/InvokeActor"); + let path = http::uri::PathAndQuery::from_static( + "/dapr.proto.runtime.v1.Dapr/InvokeActor", + ); let mut req = request.into_request(); req.extensions_mut() .insert(GrpcMethod::new("dapr.proto.runtime.v1.Dapr", "InvokeActor")); @@ -3637,46 +3900,57 @@ pub mod dapr_client { pub async fn get_configuration_alpha1( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/dapr.proto.runtime.v1.Dapr/GetConfigurationAlpha1", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "dapr.proto.runtime.v1.Dapr", - "GetConfigurationAlpha1", - )); + req.extensions_mut() + .insert( + GrpcMethod::new( + "dapr.proto.runtime.v1.Dapr", + "GetConfigurationAlpha1", + ), + ); self.inner.unary(req, path, codec).await } /// GetConfiguration gets configuration from configuration store. pub async fn get_configuration( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/dapr.proto.runtime.v1.Dapr/GetConfiguration", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "dapr.proto.runtime.v1.Dapr", - "GetConfiguration", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("dapr.proto.runtime.v1.Dapr", "GetConfiguration"), + ); self.inner.unary(req, path, codec).await } /// SubscribeConfiguration gets configuration from configuration store and subscribe the updates event by grpc stream @@ -3684,24 +3958,31 @@ pub mod dapr_client { &mut self, request: impl tonic::IntoRequest, ) -> std::result::Result< - tonic::Response>, + tonic::Response< + tonic::codec::Streaming, + >, tonic::Status, > { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/dapr.proto.runtime.v1.Dapr/SubscribeConfigurationAlpha1", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "dapr.proto.runtime.v1.Dapr", - "SubscribeConfigurationAlpha1", - )); + req.extensions_mut() + .insert( + GrpcMethod::new( + "dapr.proto.runtime.v1.Dapr", + "SubscribeConfigurationAlpha1", + ), + ); self.inner.server_streaming(req, path, codec).await } /// SubscribeConfiguration gets configuration from configuration store and subscribe the updates event by grpc stream @@ -3709,24 +3990,31 @@ pub mod dapr_client { &mut self, request: impl tonic::IntoRequest, ) -> std::result::Result< - tonic::Response>, + tonic::Response< + tonic::codec::Streaming, + >, tonic::Status, > { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/dapr.proto.runtime.v1.Dapr/SubscribeConfiguration", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "dapr.proto.runtime.v1.Dapr", - "SubscribeConfiguration", - )); + req.extensions_mut() + .insert( + GrpcMethod::new( + "dapr.proto.runtime.v1.Dapr", + "SubscribeConfiguration", + ), + ); self.inner.server_streaming(req, path, codec).await } /// UnSubscribeConfiguration unsubscribe the subscription of configuration @@ -3737,21 +4025,26 @@ pub mod dapr_client { tonic::Response, tonic::Status, > { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/dapr.proto.runtime.v1.Dapr/UnsubscribeConfigurationAlpha1", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "dapr.proto.runtime.v1.Dapr", - "UnsubscribeConfigurationAlpha1", - )); + req.extensions_mut() + .insert( + GrpcMethod::new( + "dapr.proto.runtime.v1.Dapr", + "UnsubscribeConfigurationAlpha1", + ), + ); self.inner.unary(req, path, codec).await } /// UnSubscribeConfiguration unsubscribe the subscription of configuration @@ -3762,42 +4055,51 @@ pub mod dapr_client { tonic::Response, tonic::Status, > { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/dapr.proto.runtime.v1.Dapr/UnsubscribeConfiguration", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "dapr.proto.runtime.v1.Dapr", - "UnsubscribeConfiguration", - )); + req.extensions_mut() + .insert( + GrpcMethod::new( + "dapr.proto.runtime.v1.Dapr", + "UnsubscribeConfiguration", + ), + ); self.inner.unary(req, path, codec).await } /// TryLockAlpha1 tries to get a lock with an expiry. pub async fn try_lock_alpha1( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/dapr.proto.runtime.v1.Dapr/TryLockAlpha1"); + let path = http::uri::PathAndQuery::from_static( + "/dapr.proto.runtime.v1.Dapr/TryLockAlpha1", + ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "dapr.proto.runtime.v1.Dapr", - "TryLockAlpha1", - )); + req.extensions_mut() + .insert(GrpcMethod::new("dapr.proto.runtime.v1.Dapr", "TryLockAlpha1")); self.inner.unary(req, path, codec).await } /// UnlockAlpha1 unlocks a lock. @@ -3805,20 +4107,21 @@ pub mod dapr_client { &mut self, request: impl tonic::IntoRequest, ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/dapr.proto.runtime.v1.Dapr/UnlockAlpha1"); + let path = http::uri::PathAndQuery::from_static( + "/dapr.proto.runtime.v1.Dapr/UnlockAlpha1", + ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "dapr.proto.runtime.v1.Dapr", - "UnlockAlpha1", - )); + req.extensions_mut() + .insert(GrpcMethod::new("dapr.proto.runtime.v1.Dapr", "UnlockAlpha1")); self.inner.unary(req, path, codec).await } /// EncryptAlpha1 encrypts a message using the Dapr encryption scheme and a key stored in the vault. @@ -3829,20 +4132,21 @@ pub mod dapr_client { tonic::Response>, tonic::Status, > { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/dapr.proto.runtime.v1.Dapr/EncryptAlpha1"); + let path = http::uri::PathAndQuery::from_static( + "/dapr.proto.runtime.v1.Dapr/EncryptAlpha1", + ); let mut req = request.into_streaming_request(); - req.extensions_mut().insert(GrpcMethod::new( - "dapr.proto.runtime.v1.Dapr", - "EncryptAlpha1", - )); + req.extensions_mut() + .insert(GrpcMethod::new("dapr.proto.runtime.v1.Dapr", "EncryptAlpha1")); self.inner.streaming(req, path, codec).await } /// DecryptAlpha1 decrypts a message using the Dapr encryption scheme and a key stored in the vault. @@ -3853,37 +4157,43 @@ pub mod dapr_client { tonic::Response>, tonic::Status, > { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/dapr.proto.runtime.v1.Dapr/DecryptAlpha1"); + let path = http::uri::PathAndQuery::from_static( + "/dapr.proto.runtime.v1.Dapr/DecryptAlpha1", + ); let mut req = request.into_streaming_request(); - req.extensions_mut().insert(GrpcMethod::new( - "dapr.proto.runtime.v1.Dapr", - "DecryptAlpha1", - )); + req.extensions_mut() + .insert(GrpcMethod::new("dapr.proto.runtime.v1.Dapr", "DecryptAlpha1")); self.inner.streaming(req, path, codec).await } /// Gets metadata of the sidecar pub async fn get_metadata( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/dapr.proto.runtime.v1.Dapr/GetMetadata"); + let path = http::uri::PathAndQuery::from_static( + "/dapr.proto.runtime.v1.Dapr/GetMetadata", + ); let mut req = request.into_request(); req.extensions_mut() .insert(GrpcMethod::new("dapr.proto.runtime.v1.Dapr", "GetMetadata")); @@ -3894,15 +4204,18 @@ pub mod dapr_client { &mut self, request: impl tonic::IntoRequest, ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/dapr.proto.runtime.v1.Dapr/SetMetadata"); + let path = http::uri::PathAndQuery::from_static( + "/dapr.proto.runtime.v1.Dapr/SetMetadata", + ); let mut req = request.into_request(); req.extensions_mut() .insert(GrpcMethod::new("dapr.proto.runtime.v1.Dapr", "SetMetadata")); @@ -3912,207 +4225,246 @@ pub mod dapr_client { pub async fn subtle_get_key_alpha1( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/dapr.proto.runtime.v1.Dapr/SubtleGetKeyAlpha1", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "dapr.proto.runtime.v1.Dapr", - "SubtleGetKeyAlpha1", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("dapr.proto.runtime.v1.Dapr", "SubtleGetKeyAlpha1"), + ); self.inner.unary(req, path, codec).await } /// SubtleEncryptAlpha1 encrypts a small message using a key stored in the vault. pub async fn subtle_encrypt_alpha1( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/dapr.proto.runtime.v1.Dapr/SubtleEncryptAlpha1", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "dapr.proto.runtime.v1.Dapr", - "SubtleEncryptAlpha1", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("dapr.proto.runtime.v1.Dapr", "SubtleEncryptAlpha1"), + ); self.inner.unary(req, path, codec).await } /// SubtleDecryptAlpha1 decrypts a small message using a key stored in the vault. pub async fn subtle_decrypt_alpha1( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/dapr.proto.runtime.v1.Dapr/SubtleDecryptAlpha1", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "dapr.proto.runtime.v1.Dapr", - "SubtleDecryptAlpha1", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("dapr.proto.runtime.v1.Dapr", "SubtleDecryptAlpha1"), + ); self.inner.unary(req, path, codec).await } /// SubtleWrapKeyAlpha1 wraps a key using a key stored in the vault. pub async fn subtle_wrap_key_alpha1( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/dapr.proto.runtime.v1.Dapr/SubtleWrapKeyAlpha1", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "dapr.proto.runtime.v1.Dapr", - "SubtleWrapKeyAlpha1", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("dapr.proto.runtime.v1.Dapr", "SubtleWrapKeyAlpha1"), + ); self.inner.unary(req, path, codec).await } /// SubtleUnwrapKeyAlpha1 unwraps a key using a key stored in the vault. pub async fn subtle_unwrap_key_alpha1( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/dapr.proto.runtime.v1.Dapr/SubtleUnwrapKeyAlpha1", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "dapr.proto.runtime.v1.Dapr", - "SubtleUnwrapKeyAlpha1", - )); + req.extensions_mut() + .insert( + GrpcMethod::new( + "dapr.proto.runtime.v1.Dapr", + "SubtleUnwrapKeyAlpha1", + ), + ); self.inner.unary(req, path, codec).await } /// SubtleSignAlpha1 signs a message using a key stored in the vault. pub async fn subtle_sign_alpha1( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/dapr.proto.runtime.v1.Dapr/SubtleSignAlpha1", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "dapr.proto.runtime.v1.Dapr", - "SubtleSignAlpha1", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("dapr.proto.runtime.v1.Dapr", "SubtleSignAlpha1"), + ); self.inner.unary(req, path, codec).await } /// SubtleVerifyAlpha1 verifies the signature of a message using a key stored in the vault. pub async fn subtle_verify_alpha1( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/dapr.proto.runtime.v1.Dapr/SubtleVerifyAlpha1", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "dapr.proto.runtime.v1.Dapr", - "SubtleVerifyAlpha1", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("dapr.proto.runtime.v1.Dapr", "SubtleVerifyAlpha1"), + ); self.inner.unary(req, path, codec).await } /// Starts a new instance of a workflow pub async fn start_workflow_alpha1( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/dapr.proto.runtime.v1.Dapr/StartWorkflowAlpha1", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "dapr.proto.runtime.v1.Dapr", - "StartWorkflowAlpha1", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("dapr.proto.runtime.v1.Dapr", "StartWorkflowAlpha1"), + ); self.inner.unary(req, path, codec).await } /// Gets details about a started workflow instance pub async fn get_workflow_alpha1( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/dapr.proto.runtime.v1.Dapr/GetWorkflowAlpha1", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "dapr.proto.runtime.v1.Dapr", - "GetWorkflowAlpha1", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("dapr.proto.runtime.v1.Dapr", "GetWorkflowAlpha1"), + ); self.inner.unary(req, path, codec).await } /// Purge Workflow @@ -4120,21 +4472,23 @@ pub mod dapr_client { &mut self, request: impl tonic::IntoRequest, ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/dapr.proto.runtime.v1.Dapr/PurgeWorkflowAlpha1", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "dapr.proto.runtime.v1.Dapr", - "PurgeWorkflowAlpha1", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("dapr.proto.runtime.v1.Dapr", "PurgeWorkflowAlpha1"), + ); self.inner.unary(req, path, codec).await } /// Terminates a running workflow instance @@ -4142,21 +4496,26 @@ pub mod dapr_client { &mut self, request: impl tonic::IntoRequest, ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/dapr.proto.runtime.v1.Dapr/TerminateWorkflowAlpha1", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "dapr.proto.runtime.v1.Dapr", - "TerminateWorkflowAlpha1", - )); + req.extensions_mut() + .insert( + GrpcMethod::new( + "dapr.proto.runtime.v1.Dapr", + "TerminateWorkflowAlpha1", + ), + ); self.inner.unary(req, path, codec).await } /// Pauses a running workflow instance @@ -4164,21 +4523,23 @@ pub mod dapr_client { &mut self, request: impl tonic::IntoRequest, ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/dapr.proto.runtime.v1.Dapr/PauseWorkflowAlpha1", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "dapr.proto.runtime.v1.Dapr", - "PauseWorkflowAlpha1", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("dapr.proto.runtime.v1.Dapr", "PauseWorkflowAlpha1"), + ); self.inner.unary(req, path, codec).await } /// Resumes a paused workflow instance @@ -4186,21 +4547,23 @@ pub mod dapr_client { &mut self, request: impl tonic::IntoRequest, ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/dapr.proto.runtime.v1.Dapr/ResumeWorkflowAlpha1", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "dapr.proto.runtime.v1.Dapr", - "ResumeWorkflowAlpha1", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("dapr.proto.runtime.v1.Dapr", "ResumeWorkflowAlpha1"), + ); self.inner.unary(req, path, codec).await } /// Raise an event to a running workflow instance @@ -4208,67 +4571,80 @@ pub mod dapr_client { &mut self, request: impl tonic::IntoRequest, ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/dapr.proto.runtime.v1.Dapr/RaiseEventWorkflowAlpha1", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "dapr.proto.runtime.v1.Dapr", - "RaiseEventWorkflowAlpha1", - )); + req.extensions_mut() + .insert( + GrpcMethod::new( + "dapr.proto.runtime.v1.Dapr", + "RaiseEventWorkflowAlpha1", + ), + ); self.inner.unary(req, path, codec).await } /// Starts a new instance of a workflow pub async fn start_workflow_beta1( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/dapr.proto.runtime.v1.Dapr/StartWorkflowBeta1", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "dapr.proto.runtime.v1.Dapr", - "StartWorkflowBeta1", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("dapr.proto.runtime.v1.Dapr", "StartWorkflowBeta1"), + ); self.inner.unary(req, path, codec).await } /// Gets details about a started workflow instance pub async fn get_workflow_beta1( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/dapr.proto.runtime.v1.Dapr/GetWorkflowBeta1", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "dapr.proto.runtime.v1.Dapr", - "GetWorkflowBeta1", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("dapr.proto.runtime.v1.Dapr", "GetWorkflowBeta1"), + ); self.inner.unary(req, path, codec).await } /// Purge Workflow @@ -4276,21 +4652,23 @@ pub mod dapr_client { &mut self, request: impl tonic::IntoRequest, ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/dapr.proto.runtime.v1.Dapr/PurgeWorkflowBeta1", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "dapr.proto.runtime.v1.Dapr", - "PurgeWorkflowBeta1", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("dapr.proto.runtime.v1.Dapr", "PurgeWorkflowBeta1"), + ); self.inner.unary(req, path, codec).await } /// Terminates a running workflow instance @@ -4298,21 +4676,26 @@ pub mod dapr_client { &mut self, request: impl tonic::IntoRequest, ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/dapr.proto.runtime.v1.Dapr/TerminateWorkflowBeta1", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "dapr.proto.runtime.v1.Dapr", - "TerminateWorkflowBeta1", - )); + req.extensions_mut() + .insert( + GrpcMethod::new( + "dapr.proto.runtime.v1.Dapr", + "TerminateWorkflowBeta1", + ), + ); self.inner.unary(req, path, codec).await } /// Pauses a running workflow instance @@ -4320,21 +4703,23 @@ pub mod dapr_client { &mut self, request: impl tonic::IntoRequest, ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/dapr.proto.runtime.v1.Dapr/PauseWorkflowBeta1", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "dapr.proto.runtime.v1.Dapr", - "PauseWorkflowBeta1", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("dapr.proto.runtime.v1.Dapr", "PauseWorkflowBeta1"), + ); self.inner.unary(req, path, codec).await } /// Resumes a paused workflow instance @@ -4342,21 +4727,23 @@ pub mod dapr_client { &mut self, request: impl tonic::IntoRequest, ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/dapr.proto.runtime.v1.Dapr/ResumeWorkflowBeta1", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "dapr.proto.runtime.v1.Dapr", - "ResumeWorkflowBeta1", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("dapr.proto.runtime.v1.Dapr", "ResumeWorkflowBeta1"), + ); self.inner.unary(req, path, codec).await } /// Raise an event to a running workflow instance @@ -4364,21 +4751,26 @@ pub mod dapr_client { &mut self, request: impl tonic::IntoRequest, ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/dapr.proto.runtime.v1.Dapr/RaiseEventWorkflowBeta1", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "dapr.proto.runtime.v1.Dapr", - "RaiseEventWorkflowBeta1", - )); + req.extensions_mut() + .insert( + GrpcMethod::new( + "dapr.proto.runtime.v1.Dapr", + "RaiseEventWorkflowBeta1", + ), + ); self.inner.unary(req, path, codec).await } /// Shutdown the sidecar @@ -4386,14 +4778,18 @@ pub mod dapr_client { &mut self, request: impl tonic::IntoRequest, ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static("/dapr.proto.runtime.v1.Dapr/Shutdown"); + let path = http::uri::PathAndQuery::from_static( + "/dapr.proto.runtime.v1.Dapr/Shutdown", + ); let mut req = request.into_request(); req.extensions_mut() .insert(GrpcMethod::new("dapr.proto.runtime.v1.Dapr", "Shutdown")); @@ -4403,23 +4799,27 @@ pub mod dapr_client { pub async fn schedule_job_alpha1( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> - { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/dapr.proto.runtime.v1.Dapr/ScheduleJobAlpha1", ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "dapr.proto.runtime.v1.Dapr", - "ScheduleJobAlpha1", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("dapr.proto.runtime.v1.Dapr", "ScheduleJobAlpha1"), + ); self.inner.unary(req, path, codec).await } /// Gets a scheduled job @@ -4427,53 +4827,65 @@ pub mod dapr_client { &mut self, request: impl tonic::IntoRequest, ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/dapr.proto.runtime.v1.Dapr/GetJobAlpha1"); + let path = http::uri::PathAndQuery::from_static( + "/dapr.proto.runtime.v1.Dapr/GetJobAlpha1", + ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "dapr.proto.runtime.v1.Dapr", - "GetJobAlpha1", - )); + req.extensions_mut() + .insert(GrpcMethod::new("dapr.proto.runtime.v1.Dapr", "GetJobAlpha1")); self.inner.unary(req, path, codec).await } /// Delete a job pub async fn delete_job_alpha1( &mut self, request: impl tonic::IntoRequest, - ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = - http::uri::PathAndQuery::from_static("/dapr.proto.runtime.v1.Dapr/DeleteJobAlpha1"); + let path = http::uri::PathAndQuery::from_static( + "/dapr.proto.runtime.v1.Dapr/DeleteJobAlpha1", + ); let mut req = request.into_request(); - req.extensions_mut().insert(GrpcMethod::new( - "dapr.proto.runtime.v1.Dapr", - "DeleteJobAlpha1", - )); + req.extensions_mut() + .insert( + GrpcMethod::new("dapr.proto.runtime.v1.Dapr", "DeleteJobAlpha1"), + ); self.inner.unary(req, path, codec).await } } } /// Generated server implementations. pub mod dapr_server { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + #![allow( + unused_variables, + dead_code, + missing_docs, + clippy::wildcard_imports, + clippy::let_unit_value, + )] use tonic::codegen::*; - /// Generated trait containing gRPC methods that should be implemented for use with DaprServer. #[async_trait] - pub trait Dapr: Send + Sync + 'static { + pub trait Dapr: std::marker::Send + std::marker::Sync + 'static { /// Invokes a method on a remote Dapr app. /// Deprecated: Use proxy mode service invocation instead. async fn invoke_service( @@ -4487,12 +4899,18 @@ pub mod dapr_server { async fn get_state( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; /// Gets a bulk of state items for a list of keys async fn get_bulk_state( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; /// Saves the state for a specific key. async fn save_state( &self, @@ -4502,7 +4920,10 @@ pub mod dapr_server { async fn query_state_alpha1( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; /// Deletes the state for a specific key. async fn delete_state( &self, @@ -4527,20 +4948,26 @@ pub mod dapr_server { async fn bulk_publish_event_alpha1( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; /// Server streaming response type for the SubscribeTopicEventsAlpha1 method. type SubscribeTopicEventsAlpha1Stream: tonic::codegen::tokio_stream::Stream< Item = std::result::Result< super::SubscribeTopicEventsResponseAlpha1, tonic::Status, >, - > + Send + > + + std::marker::Send + 'static; /// SubscribeTopicEventsAlpha1 subscribes to a PubSub topic and receives topic /// events from it. async fn subscribe_topic_events_alpha1( &self, - request: tonic::Request>, + request: tonic::Request< + tonic::Streaming, + >, ) -> std::result::Result< tonic::Response, tonic::Status, @@ -4549,17 +4976,26 @@ pub mod dapr_server { async fn invoke_binding( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; /// Gets secrets from secret stores. async fn get_secret( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; /// Gets a bulk of secrets async fn get_bulk_secret( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; /// Register an actor timer. async fn register_actor_timer( &self, @@ -4584,7 +5020,10 @@ pub mod dapr_server { async fn get_actor_state( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; /// Executes state transactions for a specified actor async fn execute_actor_state_transaction( &self, @@ -4594,21 +5033,34 @@ pub mod dapr_server { async fn invoke_actor( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; /// GetConfiguration gets configuration from configuration store. async fn get_configuration_alpha1( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; /// GetConfiguration gets configuration from configuration store. async fn get_configuration( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; /// Server streaming response type for the SubscribeConfigurationAlpha1 method. type SubscribeConfigurationAlpha1Stream: tonic::codegen::tokio_stream::Stream< - Item = std::result::Result, - > + Send + Item = std::result::Result< + super::SubscribeConfigurationResponse, + tonic::Status, + >, + > + + std::marker::Send + 'static; /// SubscribeConfiguration gets configuration from configuration store and subscribe the updates event by grpc stream async fn subscribe_configuration_alpha1( @@ -4620,14 +5072,21 @@ pub mod dapr_server { >; /// Server streaming response type for the SubscribeConfiguration method. type SubscribeConfigurationStream: tonic::codegen::tokio_stream::Stream< - Item = std::result::Result, - > + Send + Item = std::result::Result< + super::SubscribeConfigurationResponse, + tonic::Status, + >, + > + + std::marker::Send + 'static; /// SubscribeConfiguration gets configuration from configuration store and subscribe the updates event by grpc stream async fn subscribe_configuration( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; /// UnSubscribeConfiguration unsubscribe the subscription of configuration async fn unsubscribe_configuration_alpha1( &self, @@ -4657,28 +5116,39 @@ pub mod dapr_server { /// Server streaming response type for the EncryptAlpha1 method. type EncryptAlpha1Stream: tonic::codegen::tokio_stream::Stream< Item = std::result::Result, - > + Send + > + + std::marker::Send + 'static; /// EncryptAlpha1 encrypts a message using the Dapr encryption scheme and a key stored in the vault. async fn encrypt_alpha1( &self, request: tonic::Request>, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; /// Server streaming response type for the DecryptAlpha1 method. type DecryptAlpha1Stream: tonic::codegen::tokio_stream::Stream< Item = std::result::Result, - > + Send + > + + std::marker::Send + 'static; /// DecryptAlpha1 decrypts a message using the Dapr encryption scheme and a key stored in the vault. async fn decrypt_alpha1( &self, request: tonic::Request>, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; /// Gets metadata of the sidecar async fn get_metadata( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; /// Sets value in extended metadata of the sidecar async fn set_metadata( &self, @@ -4688,47 +5158,74 @@ pub mod dapr_server { async fn subtle_get_key_alpha1( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; /// SubtleEncryptAlpha1 encrypts a small message using a key stored in the vault. async fn subtle_encrypt_alpha1( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; /// SubtleDecryptAlpha1 decrypts a small message using a key stored in the vault. async fn subtle_decrypt_alpha1( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; /// SubtleWrapKeyAlpha1 wraps a key using a key stored in the vault. async fn subtle_wrap_key_alpha1( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; /// SubtleUnwrapKeyAlpha1 unwraps a key using a key stored in the vault. async fn subtle_unwrap_key_alpha1( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; /// SubtleSignAlpha1 signs a message using a key stored in the vault. async fn subtle_sign_alpha1( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; /// SubtleVerifyAlpha1 verifies the signature of a message using a key stored in the vault. async fn subtle_verify_alpha1( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; /// Starts a new instance of a workflow async fn start_workflow_alpha1( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; /// Gets details about a started workflow instance async fn get_workflow_alpha1( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; /// Purge Workflow async fn purge_workflow_alpha1( &self, @@ -4758,12 +5255,18 @@ pub mod dapr_server { async fn start_workflow_beta1( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; /// Gets details about a started workflow instance async fn get_workflow_beta1( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; /// Purge Workflow async fn purge_workflow_beta1( &self, @@ -4798,7 +5301,10 @@ pub mod dapr_server { async fn schedule_job_alpha1( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; /// Gets a scheduled job async fn get_job_alpha1( &self, @@ -4808,18 +5314,21 @@ pub mod dapr_server { async fn delete_job_alpha1( &self, request: tonic::Request, - ) -> std::result::Result, tonic::Status>; + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; } /// Dapr service provides APIs to user application to access Dapr building blocks. #[derive(Debug)] - pub struct DaprServer { + pub struct DaprServer { inner: Arc, accept_compression_encodings: EnabledCompressionEncodings, send_compression_encodings: EnabledCompressionEncodings, max_decoding_message_size: Option, max_encoding_message_size: Option, } - impl DaprServer { + impl DaprServer { pub fn new(inner: T) -> Self { Self::from_arc(Arc::new(inner)) } @@ -4832,7 +5341,10 @@ pub mod dapr_server { max_encoding_message_size: None, } } - pub fn with_interceptor(inner: T, interceptor: F) -> InterceptedService + pub fn with_interceptor( + inner: T, + interceptor: F, + ) -> InterceptedService where F: tonic::service::Interceptor, { @@ -4870,8 +5382,8 @@ pub mod dapr_server { impl tonic::codegen::Service> for DaprServer where T: Dapr, - B: Body + Send + 'static, - B::Error: Into + Send + 'static, + B: Body + std::marker::Send + 'static, + B::Error: Into + std::marker::Send + 'static, { type Response = http::Response; type Error = std::convert::Infallible; @@ -4887,16 +5399,23 @@ pub mod dapr_server { "/dapr.proto.runtime.v1.Dapr/InvokeService" => { #[allow(non_camel_case_types)] struct InvokeServiceSvc(pub Arc); - impl tonic::server::UnaryService for InvokeServiceSvc { + impl< + T: Dapr, + > tonic::server::UnaryService + for InvokeServiceSvc { type Response = super::super::super::common::v1::InvokeResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); - let fut = - async move { ::invoke_service(&inner, request).await }; + let fut = async move { + ::invoke_service(&inner, request).await + }; Box::pin(fut) } } @@ -4925,15 +5444,21 @@ pub mod dapr_server { "/dapr.proto.runtime.v1.Dapr/GetState" => { #[allow(non_camel_case_types)] struct GetStateSvc(pub Arc); - impl tonic::server::UnaryService for GetStateSvc { + impl tonic::server::UnaryService + for GetStateSvc { type Response = super::GetStateResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); - let fut = async move { ::get_state(&inner, request).await }; + let fut = async move { + ::get_state(&inner, request).await + }; Box::pin(fut) } } @@ -4962,16 +5487,21 @@ pub mod dapr_server { "/dapr.proto.runtime.v1.Dapr/GetBulkState" => { #[allow(non_camel_case_types)] struct GetBulkStateSvc(pub Arc); - impl tonic::server::UnaryService for GetBulkStateSvc { + impl tonic::server::UnaryService + for GetBulkStateSvc { type Response = super::GetBulkStateResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); - let fut = - async move { ::get_bulk_state(&inner, request).await }; + let fut = async move { + ::get_bulk_state(&inner, request).await + }; Box::pin(fut) } } @@ -5000,15 +5530,21 @@ pub mod dapr_server { "/dapr.proto.runtime.v1.Dapr/SaveState" => { #[allow(non_camel_case_types)] struct SaveStateSvc(pub Arc); - impl tonic::server::UnaryService for SaveStateSvc { + impl tonic::server::UnaryService + for SaveStateSvc { type Response = (); - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); - let fut = async move { ::save_state(&inner, request).await }; + let fut = async move { + ::save_state(&inner, request).await + }; Box::pin(fut) } } @@ -5037,9 +5573,13 @@ pub mod dapr_server { "/dapr.proto.runtime.v1.Dapr/QueryStateAlpha1" => { #[allow(non_camel_case_types)] struct QueryStateAlpha1Svc(pub Arc); - impl tonic::server::UnaryService for QueryStateAlpha1Svc { + impl tonic::server::UnaryService + for QueryStateAlpha1Svc { type Response = super::QueryStateResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -5076,16 +5616,21 @@ pub mod dapr_server { "/dapr.proto.runtime.v1.Dapr/DeleteState" => { #[allow(non_camel_case_types)] struct DeleteStateSvc(pub Arc); - impl tonic::server::UnaryService for DeleteStateSvc { + impl tonic::server::UnaryService + for DeleteStateSvc { type Response = (); - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); - let fut = - async move { ::delete_state(&inner, request).await }; + let fut = async move { + ::delete_state(&inner, request).await + }; Box::pin(fut) } } @@ -5114,9 +5659,15 @@ pub mod dapr_server { "/dapr.proto.runtime.v1.Dapr/DeleteBulkState" => { #[allow(non_camel_case_types)] struct DeleteBulkStateSvc(pub Arc); - impl tonic::server::UnaryService for DeleteBulkStateSvc { + impl< + T: Dapr, + > tonic::server::UnaryService + for DeleteBulkStateSvc { type Response = (); - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -5153,18 +5704,25 @@ pub mod dapr_server { "/dapr.proto.runtime.v1.Dapr/ExecuteStateTransaction" => { #[allow(non_camel_case_types)] struct ExecuteStateTransactionSvc(pub Arc); - impl tonic::server::UnaryService - for ExecuteStateTransactionSvc - { + impl< + T: Dapr, + > tonic::server::UnaryService + for ExecuteStateTransactionSvc { type Response = (); - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, - request: tonic::Request, + request: tonic::Request< + super::ExecuteStateTransactionRequest, + >, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::execute_state_transaction(&inner, request).await + ::execute_state_transaction(&inner, request) + .await }; Box::pin(fut) } @@ -5194,16 +5752,21 @@ pub mod dapr_server { "/dapr.proto.runtime.v1.Dapr/PublishEvent" => { #[allow(non_camel_case_types)] struct PublishEventSvc(pub Arc); - impl tonic::server::UnaryService for PublishEventSvc { + impl tonic::server::UnaryService + for PublishEventSvc { type Response = (); - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); - let fut = - async move { ::publish_event(&inner, request).await }; + let fut = async move { + ::publish_event(&inner, request).await + }; Box::pin(fut) } } @@ -5233,17 +5796,20 @@ pub mod dapr_server { #[allow(non_camel_case_types)] struct BulkPublishEventAlpha1Svc(pub Arc); impl tonic::server::UnaryService - for BulkPublishEventAlpha1Svc - { + for BulkPublishEventAlpha1Svc { type Response = super::BulkPublishResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::bulk_publish_event_alpha1(&inner, request).await + ::bulk_publish_event_alpha1(&inner, request) + .await }; Box::pin(fut) } @@ -5273,14 +5839,17 @@ pub mod dapr_server { "/dapr.proto.runtime.v1.Dapr/SubscribeTopicEventsAlpha1" => { #[allow(non_camel_case_types)] struct SubscribeTopicEventsAlpha1Svc(pub Arc); - impl - tonic::server::StreamingService - for SubscribeTopicEventsAlpha1Svc - { + impl< + T: Dapr, + > tonic::server::StreamingService< + super::SubscribeTopicEventsRequestAlpha1, + > for SubscribeTopicEventsAlpha1Svc { type Response = super::SubscribeTopicEventsResponseAlpha1; type ResponseStream = T::SubscribeTopicEventsAlpha1Stream; - type Future = - BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request< @@ -5289,7 +5858,8 @@ pub mod dapr_server { ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::subscribe_topic_events_alpha1(&inner, request).await + ::subscribe_topic_events_alpha1(&inner, request) + .await }; Box::pin(fut) } @@ -5319,16 +5889,23 @@ pub mod dapr_server { "/dapr.proto.runtime.v1.Dapr/InvokeBinding" => { #[allow(non_camel_case_types)] struct InvokeBindingSvc(pub Arc); - impl tonic::server::UnaryService for InvokeBindingSvc { + impl< + T: Dapr, + > tonic::server::UnaryService + for InvokeBindingSvc { type Response = super::InvokeBindingResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); - let fut = - async move { ::invoke_binding(&inner, request).await }; + let fut = async move { + ::invoke_binding(&inner, request).await + }; Box::pin(fut) } } @@ -5357,15 +5934,21 @@ pub mod dapr_server { "/dapr.proto.runtime.v1.Dapr/GetSecret" => { #[allow(non_camel_case_types)] struct GetSecretSvc(pub Arc); - impl tonic::server::UnaryService for GetSecretSvc { + impl tonic::server::UnaryService + for GetSecretSvc { type Response = super::GetSecretResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); - let fut = async move { ::get_secret(&inner, request).await }; + let fut = async move { + ::get_secret(&inner, request).await + }; Box::pin(fut) } } @@ -5394,16 +5977,23 @@ pub mod dapr_server { "/dapr.proto.runtime.v1.Dapr/GetBulkSecret" => { #[allow(non_camel_case_types)] struct GetBulkSecretSvc(pub Arc); - impl tonic::server::UnaryService for GetBulkSecretSvc { + impl< + T: Dapr, + > tonic::server::UnaryService + for GetBulkSecretSvc { type Response = super::GetBulkSecretResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); - let fut = - async move { ::get_bulk_secret(&inner, request).await }; + let fut = async move { + ::get_bulk_secret(&inner, request).await + }; Box::pin(fut) } } @@ -5432,11 +6022,15 @@ pub mod dapr_server { "/dapr.proto.runtime.v1.Dapr/RegisterActorTimer" => { #[allow(non_camel_case_types)] struct RegisterActorTimerSvc(pub Arc); - impl tonic::server::UnaryService - for RegisterActorTimerSvc - { + impl< + T: Dapr, + > tonic::server::UnaryService + for RegisterActorTimerSvc { type Response = (); - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -5473,11 +6067,15 @@ pub mod dapr_server { "/dapr.proto.runtime.v1.Dapr/UnregisterActorTimer" => { #[allow(non_camel_case_types)] struct UnregisterActorTimerSvc(pub Arc); - impl tonic::server::UnaryService - for UnregisterActorTimerSvc - { + impl< + T: Dapr, + > tonic::server::UnaryService + for UnregisterActorTimerSvc { type Response = (); - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -5514,11 +6112,15 @@ pub mod dapr_server { "/dapr.proto.runtime.v1.Dapr/RegisterActorReminder" => { #[allow(non_camel_case_types)] struct RegisterActorReminderSvc(pub Arc); - impl tonic::server::UnaryService - for RegisterActorReminderSvc - { + impl< + T: Dapr, + > tonic::server::UnaryService + for RegisterActorReminderSvc { type Response = (); - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -5555,18 +6157,25 @@ pub mod dapr_server { "/dapr.proto.runtime.v1.Dapr/UnregisterActorReminder" => { #[allow(non_camel_case_types)] struct UnregisterActorReminderSvc(pub Arc); - impl tonic::server::UnaryService - for UnregisterActorReminderSvc - { + impl< + T: Dapr, + > tonic::server::UnaryService + for UnregisterActorReminderSvc { type Response = (); - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, - request: tonic::Request, + request: tonic::Request< + super::UnregisterActorReminderRequest, + >, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::unregister_actor_reminder(&inner, request).await + ::unregister_actor_reminder(&inner, request) + .await }; Box::pin(fut) } @@ -5596,16 +6205,23 @@ pub mod dapr_server { "/dapr.proto.runtime.v1.Dapr/GetActorState" => { #[allow(non_camel_case_types)] struct GetActorStateSvc(pub Arc); - impl tonic::server::UnaryService for GetActorStateSvc { + impl< + T: Dapr, + > tonic::server::UnaryService + for GetActorStateSvc { type Response = super::GetActorStateResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); - let fut = - async move { ::get_actor_state(&inner, request).await }; + let fut = async move { + ::get_actor_state(&inner, request).await + }; Box::pin(fut) } } @@ -5634,19 +6250,29 @@ pub mod dapr_server { "/dapr.proto.runtime.v1.Dapr/ExecuteActorStateTransaction" => { #[allow(non_camel_case_types)] struct ExecuteActorStateTransactionSvc(pub Arc); - impl - tonic::server::UnaryService - for ExecuteActorStateTransactionSvc - { + impl< + T: Dapr, + > tonic::server::UnaryService< + super::ExecuteActorStateTransactionRequest, + > for ExecuteActorStateTransactionSvc { type Response = (); - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, - request: tonic::Request, + request: tonic::Request< + super::ExecuteActorStateTransactionRequest, + >, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::execute_actor_state_transaction(&inner, request).await + ::execute_actor_state_transaction( + &inner, + request, + ) + .await }; Box::pin(fut) } @@ -5676,16 +6302,21 @@ pub mod dapr_server { "/dapr.proto.runtime.v1.Dapr/InvokeActor" => { #[allow(non_camel_case_types)] struct InvokeActorSvc(pub Arc); - impl tonic::server::UnaryService for InvokeActorSvc { + impl tonic::server::UnaryService + for InvokeActorSvc { type Response = super::InvokeActorResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); - let fut = - async move { ::invoke_actor(&inner, request).await }; + let fut = async move { + ::invoke_actor(&inner, request).await + }; Box::pin(fut) } } @@ -5714,11 +6345,15 @@ pub mod dapr_server { "/dapr.proto.runtime.v1.Dapr/GetConfigurationAlpha1" => { #[allow(non_camel_case_types)] struct GetConfigurationAlpha1Svc(pub Arc); - impl tonic::server::UnaryService - for GetConfigurationAlpha1Svc - { + impl< + T: Dapr, + > tonic::server::UnaryService + for GetConfigurationAlpha1Svc { type Response = super::GetConfigurationResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -5755,11 +6390,15 @@ pub mod dapr_server { "/dapr.proto.runtime.v1.Dapr/GetConfiguration" => { #[allow(non_camel_case_types)] struct GetConfigurationSvc(pub Arc); - impl tonic::server::UnaryService - for GetConfigurationSvc - { + impl< + T: Dapr, + > tonic::server::UnaryService + for GetConfigurationSvc { type Response = super::GetConfigurationResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -5796,21 +6435,25 @@ pub mod dapr_server { "/dapr.proto.runtime.v1.Dapr/SubscribeConfigurationAlpha1" => { #[allow(non_camel_case_types)] struct SubscribeConfigurationAlpha1Svc(pub Arc); - impl - tonic::server::ServerStreamingService - for SubscribeConfigurationAlpha1Svc - { + impl< + T: Dapr, + > tonic::server::ServerStreamingService< + super::SubscribeConfigurationRequest, + > for SubscribeConfigurationAlpha1Svc { type Response = super::SubscribeConfigurationResponse; type ResponseStream = T::SubscribeConfigurationAlpha1Stream; - type Future = - BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::subscribe_configuration_alpha1(&inner, request).await + ::subscribe_configuration_alpha1(&inner, request) + .await }; Box::pin(fut) } @@ -5840,14 +6483,17 @@ pub mod dapr_server { "/dapr.proto.runtime.v1.Dapr/SubscribeConfiguration" => { #[allow(non_camel_case_types)] struct SubscribeConfigurationSvc(pub Arc); - impl - tonic::server::ServerStreamingService - for SubscribeConfigurationSvc - { + impl< + T: Dapr, + > tonic::server::ServerStreamingService< + super::SubscribeConfigurationRequest, + > for SubscribeConfigurationSvc { type Response = super::SubscribeConfigurationResponse; type ResponseStream = T::SubscribeConfigurationStream; - type Future = - BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -5884,19 +6530,28 @@ pub mod dapr_server { "/dapr.proto.runtime.v1.Dapr/UnsubscribeConfigurationAlpha1" => { #[allow(non_camel_case_types)] struct UnsubscribeConfigurationAlpha1Svc(pub Arc); - impl - tonic::server::UnaryService - for UnsubscribeConfigurationAlpha1Svc - { + impl< + T: Dapr, + > tonic::server::UnaryService + for UnsubscribeConfigurationAlpha1Svc { type Response = super::UnsubscribeConfigurationResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, - request: tonic::Request, + request: tonic::Request< + super::UnsubscribeConfigurationRequest, + >, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::unsubscribe_configuration_alpha1(&inner, request).await + ::unsubscribe_configuration_alpha1( + &inner, + request, + ) + .await }; Box::pin(fut) } @@ -5926,19 +6581,25 @@ pub mod dapr_server { "/dapr.proto.runtime.v1.Dapr/UnsubscribeConfiguration" => { #[allow(non_camel_case_types)] struct UnsubscribeConfigurationSvc(pub Arc); - impl - tonic::server::UnaryService - for UnsubscribeConfigurationSvc - { + impl< + T: Dapr, + > tonic::server::UnaryService + for UnsubscribeConfigurationSvc { type Response = super::UnsubscribeConfigurationResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, - request: tonic::Request, + request: tonic::Request< + super::UnsubscribeConfigurationRequest, + >, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::unsubscribe_configuration(&inner, request).await + ::unsubscribe_configuration(&inner, request) + .await }; Box::pin(fut) } @@ -5968,16 +6629,21 @@ pub mod dapr_server { "/dapr.proto.runtime.v1.Dapr/TryLockAlpha1" => { #[allow(non_camel_case_types)] struct TryLockAlpha1Svc(pub Arc); - impl tonic::server::UnaryService for TryLockAlpha1Svc { + impl tonic::server::UnaryService + for TryLockAlpha1Svc { type Response = super::TryLockResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); - let fut = - async move { ::try_lock_alpha1(&inner, request).await }; + let fut = async move { + ::try_lock_alpha1(&inner, request).await + }; Box::pin(fut) } } @@ -6006,16 +6672,21 @@ pub mod dapr_server { "/dapr.proto.runtime.v1.Dapr/UnlockAlpha1" => { #[allow(non_camel_case_types)] struct UnlockAlpha1Svc(pub Arc); - impl tonic::server::UnaryService for UnlockAlpha1Svc { + impl tonic::server::UnaryService + for UnlockAlpha1Svc { type Response = super::UnlockResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); - let fut = - async move { ::unlock_alpha1(&inner, request).await }; + let fut = async move { + ::unlock_alpha1(&inner, request).await + }; Box::pin(fut) } } @@ -6044,18 +6715,24 @@ pub mod dapr_server { "/dapr.proto.runtime.v1.Dapr/EncryptAlpha1" => { #[allow(non_camel_case_types)] struct EncryptAlpha1Svc(pub Arc); - impl tonic::server::StreamingService for EncryptAlpha1Svc { + impl tonic::server::StreamingService + for EncryptAlpha1Svc { type Response = super::EncryptResponse; type ResponseStream = T::EncryptAlpha1Stream; - type Future = - BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, - request: tonic::Request>, + request: tonic::Request< + tonic::Streaming, + >, ) -> Self::Future { let inner = Arc::clone(&self.0); - let fut = - async move { ::encrypt_alpha1(&inner, request).await }; + let fut = async move { + ::encrypt_alpha1(&inner, request).await + }; Box::pin(fut) } } @@ -6084,18 +6761,24 @@ pub mod dapr_server { "/dapr.proto.runtime.v1.Dapr/DecryptAlpha1" => { #[allow(non_camel_case_types)] struct DecryptAlpha1Svc(pub Arc); - impl tonic::server::StreamingService for DecryptAlpha1Svc { + impl tonic::server::StreamingService + for DecryptAlpha1Svc { type Response = super::DecryptResponse; type ResponseStream = T::DecryptAlpha1Stream; - type Future = - BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, - request: tonic::Request>, + request: tonic::Request< + tonic::Streaming, + >, ) -> Self::Future { let inner = Arc::clone(&self.0); - let fut = - async move { ::decrypt_alpha1(&inner, request).await }; + let fut = async move { + ::decrypt_alpha1(&inner, request).await + }; Box::pin(fut) } } @@ -6124,16 +6807,21 @@ pub mod dapr_server { "/dapr.proto.runtime.v1.Dapr/GetMetadata" => { #[allow(non_camel_case_types)] struct GetMetadataSvc(pub Arc); - impl tonic::server::UnaryService for GetMetadataSvc { + impl tonic::server::UnaryService + for GetMetadataSvc { type Response = super::GetMetadataResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); - let fut = - async move { ::get_metadata(&inner, request).await }; + let fut = async move { + ::get_metadata(&inner, request).await + }; Box::pin(fut) } } @@ -6162,16 +6850,21 @@ pub mod dapr_server { "/dapr.proto.runtime.v1.Dapr/SetMetadata" => { #[allow(non_camel_case_types)] struct SetMetadataSvc(pub Arc); - impl tonic::server::UnaryService for SetMetadataSvc { + impl tonic::server::UnaryService + for SetMetadataSvc { type Response = (); - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); - let fut = - async move { ::set_metadata(&inner, request).await }; + let fut = async move { + ::set_metadata(&inner, request).await + }; Box::pin(fut) } } @@ -6200,9 +6893,13 @@ pub mod dapr_server { "/dapr.proto.runtime.v1.Dapr/SubtleGetKeyAlpha1" => { #[allow(non_camel_case_types)] struct SubtleGetKeyAlpha1Svc(pub Arc); - impl tonic::server::UnaryService for SubtleGetKeyAlpha1Svc { + impl tonic::server::UnaryService + for SubtleGetKeyAlpha1Svc { type Response = super::SubtleGetKeyResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -6239,11 +6936,15 @@ pub mod dapr_server { "/dapr.proto.runtime.v1.Dapr/SubtleEncryptAlpha1" => { #[allow(non_camel_case_types)] struct SubtleEncryptAlpha1Svc(pub Arc); - impl tonic::server::UnaryService - for SubtleEncryptAlpha1Svc - { + impl< + T: Dapr, + > tonic::server::UnaryService + for SubtleEncryptAlpha1Svc { type Response = super::SubtleEncryptResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -6280,11 +6981,15 @@ pub mod dapr_server { "/dapr.proto.runtime.v1.Dapr/SubtleDecryptAlpha1" => { #[allow(non_camel_case_types)] struct SubtleDecryptAlpha1Svc(pub Arc); - impl tonic::server::UnaryService - for SubtleDecryptAlpha1Svc - { + impl< + T: Dapr, + > tonic::server::UnaryService + for SubtleDecryptAlpha1Svc { type Response = super::SubtleDecryptResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -6321,11 +7026,15 @@ pub mod dapr_server { "/dapr.proto.runtime.v1.Dapr/SubtleWrapKeyAlpha1" => { #[allow(non_camel_case_types)] struct SubtleWrapKeyAlpha1Svc(pub Arc); - impl tonic::server::UnaryService - for SubtleWrapKeyAlpha1Svc - { + impl< + T: Dapr, + > tonic::server::UnaryService + for SubtleWrapKeyAlpha1Svc { type Response = super::SubtleWrapKeyResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -6362,11 +7071,15 @@ pub mod dapr_server { "/dapr.proto.runtime.v1.Dapr/SubtleUnwrapKeyAlpha1" => { #[allow(non_camel_case_types)] struct SubtleUnwrapKeyAlpha1Svc(pub Arc); - impl tonic::server::UnaryService - for SubtleUnwrapKeyAlpha1Svc - { + impl< + T: Dapr, + > tonic::server::UnaryService + for SubtleUnwrapKeyAlpha1Svc { type Response = super::SubtleUnwrapKeyResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -6403,9 +7116,13 @@ pub mod dapr_server { "/dapr.proto.runtime.v1.Dapr/SubtleSignAlpha1" => { #[allow(non_camel_case_types)] struct SubtleSignAlpha1Svc(pub Arc); - impl tonic::server::UnaryService for SubtleSignAlpha1Svc { + impl tonic::server::UnaryService + for SubtleSignAlpha1Svc { type Response = super::SubtleSignResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -6442,9 +7159,13 @@ pub mod dapr_server { "/dapr.proto.runtime.v1.Dapr/SubtleVerifyAlpha1" => { #[allow(non_camel_case_types)] struct SubtleVerifyAlpha1Svc(pub Arc); - impl tonic::server::UnaryService for SubtleVerifyAlpha1Svc { + impl tonic::server::UnaryService + for SubtleVerifyAlpha1Svc { type Response = super::SubtleVerifyResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -6481,11 +7202,15 @@ pub mod dapr_server { "/dapr.proto.runtime.v1.Dapr/StartWorkflowAlpha1" => { #[allow(non_camel_case_types)] struct StartWorkflowAlpha1Svc(pub Arc); - impl tonic::server::UnaryService - for StartWorkflowAlpha1Svc - { + impl< + T: Dapr, + > tonic::server::UnaryService + for StartWorkflowAlpha1Svc { type Response = super::StartWorkflowResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -6522,9 +7247,13 @@ pub mod dapr_server { "/dapr.proto.runtime.v1.Dapr/GetWorkflowAlpha1" => { #[allow(non_camel_case_types)] struct GetWorkflowAlpha1Svc(pub Arc); - impl tonic::server::UnaryService for GetWorkflowAlpha1Svc { + impl tonic::server::UnaryService + for GetWorkflowAlpha1Svc { type Response = super::GetWorkflowResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -6561,11 +7290,15 @@ pub mod dapr_server { "/dapr.proto.runtime.v1.Dapr/PurgeWorkflowAlpha1" => { #[allow(non_camel_case_types)] struct PurgeWorkflowAlpha1Svc(pub Arc); - impl tonic::server::UnaryService - for PurgeWorkflowAlpha1Svc - { + impl< + T: Dapr, + > tonic::server::UnaryService + for PurgeWorkflowAlpha1Svc { type Response = (); - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -6602,18 +7335,23 @@ pub mod dapr_server { "/dapr.proto.runtime.v1.Dapr/TerminateWorkflowAlpha1" => { #[allow(non_camel_case_types)] struct TerminateWorkflowAlpha1Svc(pub Arc); - impl tonic::server::UnaryService - for TerminateWorkflowAlpha1Svc - { + impl< + T: Dapr, + > tonic::server::UnaryService + for TerminateWorkflowAlpha1Svc { type Response = (); - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::terminate_workflow_alpha1(&inner, request).await + ::terminate_workflow_alpha1(&inner, request) + .await }; Box::pin(fut) } @@ -6643,11 +7381,15 @@ pub mod dapr_server { "/dapr.proto.runtime.v1.Dapr/PauseWorkflowAlpha1" => { #[allow(non_camel_case_types)] struct PauseWorkflowAlpha1Svc(pub Arc); - impl tonic::server::UnaryService - for PauseWorkflowAlpha1Svc - { + impl< + T: Dapr, + > tonic::server::UnaryService + for PauseWorkflowAlpha1Svc { type Response = (); - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -6684,11 +7426,15 @@ pub mod dapr_server { "/dapr.proto.runtime.v1.Dapr/ResumeWorkflowAlpha1" => { #[allow(non_camel_case_types)] struct ResumeWorkflowAlpha1Svc(pub Arc); - impl tonic::server::UnaryService - for ResumeWorkflowAlpha1Svc - { + impl< + T: Dapr, + > tonic::server::UnaryService + for ResumeWorkflowAlpha1Svc { type Response = (); - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -6725,18 +7471,23 @@ pub mod dapr_server { "/dapr.proto.runtime.v1.Dapr/RaiseEventWorkflowAlpha1" => { #[allow(non_camel_case_types)] struct RaiseEventWorkflowAlpha1Svc(pub Arc); - impl tonic::server::UnaryService - for RaiseEventWorkflowAlpha1Svc - { + impl< + T: Dapr, + > tonic::server::UnaryService + for RaiseEventWorkflowAlpha1Svc { type Response = (); - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::raise_event_workflow_alpha1(&inner, request).await + ::raise_event_workflow_alpha1(&inner, request) + .await }; Box::pin(fut) } @@ -6766,11 +7517,15 @@ pub mod dapr_server { "/dapr.proto.runtime.v1.Dapr/StartWorkflowBeta1" => { #[allow(non_camel_case_types)] struct StartWorkflowBeta1Svc(pub Arc); - impl tonic::server::UnaryService - for StartWorkflowBeta1Svc - { + impl< + T: Dapr, + > tonic::server::UnaryService + for StartWorkflowBeta1Svc { type Response = super::StartWorkflowResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -6807,9 +7562,13 @@ pub mod dapr_server { "/dapr.proto.runtime.v1.Dapr/GetWorkflowBeta1" => { #[allow(non_camel_case_types)] struct GetWorkflowBeta1Svc(pub Arc); - impl tonic::server::UnaryService for GetWorkflowBeta1Svc { + impl tonic::server::UnaryService + for GetWorkflowBeta1Svc { type Response = super::GetWorkflowResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -6846,11 +7605,15 @@ pub mod dapr_server { "/dapr.proto.runtime.v1.Dapr/PurgeWorkflowBeta1" => { #[allow(non_camel_case_types)] struct PurgeWorkflowBeta1Svc(pub Arc); - impl tonic::server::UnaryService - for PurgeWorkflowBeta1Svc - { + impl< + T: Dapr, + > tonic::server::UnaryService + for PurgeWorkflowBeta1Svc { type Response = (); - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -6887,11 +7650,15 @@ pub mod dapr_server { "/dapr.proto.runtime.v1.Dapr/TerminateWorkflowBeta1" => { #[allow(non_camel_case_types)] struct TerminateWorkflowBeta1Svc(pub Arc); - impl tonic::server::UnaryService - for TerminateWorkflowBeta1Svc - { + impl< + T: Dapr, + > tonic::server::UnaryService + for TerminateWorkflowBeta1Svc { type Response = (); - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -6928,11 +7695,15 @@ pub mod dapr_server { "/dapr.proto.runtime.v1.Dapr/PauseWorkflowBeta1" => { #[allow(non_camel_case_types)] struct PauseWorkflowBeta1Svc(pub Arc); - impl tonic::server::UnaryService - for PauseWorkflowBeta1Svc - { + impl< + T: Dapr, + > tonic::server::UnaryService + for PauseWorkflowBeta1Svc { type Response = (); - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -6969,11 +7740,15 @@ pub mod dapr_server { "/dapr.proto.runtime.v1.Dapr/ResumeWorkflowBeta1" => { #[allow(non_camel_case_types)] struct ResumeWorkflowBeta1Svc(pub Arc); - impl tonic::server::UnaryService - for ResumeWorkflowBeta1Svc - { + impl< + T: Dapr, + > tonic::server::UnaryService + for ResumeWorkflowBeta1Svc { type Response = (); - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -7010,18 +7785,23 @@ pub mod dapr_server { "/dapr.proto.runtime.v1.Dapr/RaiseEventWorkflowBeta1" => { #[allow(non_camel_case_types)] struct RaiseEventWorkflowBeta1Svc(pub Arc); - impl tonic::server::UnaryService - for RaiseEventWorkflowBeta1Svc - { + impl< + T: Dapr, + > tonic::server::UnaryService + for RaiseEventWorkflowBeta1Svc { type Response = (); - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::raise_event_workflow_beta1(&inner, request).await + ::raise_event_workflow_beta1(&inner, request) + .await }; Box::pin(fut) } @@ -7051,15 +7831,21 @@ pub mod dapr_server { "/dapr.proto.runtime.v1.Dapr/Shutdown" => { #[allow(non_camel_case_types)] struct ShutdownSvc(pub Arc); - impl tonic::server::UnaryService for ShutdownSvc { + impl tonic::server::UnaryService + for ShutdownSvc { type Response = (); - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); - let fut = async move { ::shutdown(&inner, request).await }; + let fut = async move { + ::shutdown(&inner, request).await + }; Box::pin(fut) } } @@ -7088,9 +7874,13 @@ pub mod dapr_server { "/dapr.proto.runtime.v1.Dapr/ScheduleJobAlpha1" => { #[allow(non_camel_case_types)] struct ScheduleJobAlpha1Svc(pub Arc); - impl tonic::server::UnaryService for ScheduleJobAlpha1Svc { + impl tonic::server::UnaryService + for ScheduleJobAlpha1Svc { type Response = super::ScheduleJobResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -7127,16 +7917,21 @@ pub mod dapr_server { "/dapr.proto.runtime.v1.Dapr/GetJobAlpha1" => { #[allow(non_camel_case_types)] struct GetJobAlpha1Svc(pub Arc); - impl tonic::server::UnaryService for GetJobAlpha1Svc { + impl tonic::server::UnaryService + for GetJobAlpha1Svc { type Response = super::GetJobResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); - let fut = - async move { ::get_job_alpha1(&inner, request).await }; + let fut = async move { + ::get_job_alpha1(&inner, request).await + }; Box::pin(fut) } } @@ -7165,9 +7960,13 @@ pub mod dapr_server { "/dapr.proto.runtime.v1.Dapr/DeleteJobAlpha1" => { #[allow(non_camel_case_types)] struct DeleteJobAlpha1Svc(pub Arc); - impl tonic::server::UnaryService for DeleteJobAlpha1Svc { + impl tonic::server::UnaryService + for DeleteJobAlpha1Svc { type Response = super::DeleteJobResponse; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, @@ -7201,21 +8000,27 @@ pub mod dapr_server { }; Box::pin(fut) } - _ => Box::pin(async move { - Ok(http::Response::builder() - .status(200) - .header("grpc-status", tonic::Code::Unimplemented as i32) - .header( - http::header::CONTENT_TYPE, - tonic::metadata::GRPC_CONTENT_TYPE, - ) - .body(empty_body()) - .unwrap()) - }), + _ => { + Box::pin(async move { + let mut response = http::Response::new(empty_body()); + let headers = response.headers_mut(); + headers + .insert( + tonic::Status::GRPC_STATUS, + (tonic::Code::Unimplemented as i32).into(), + ); + headers + .insert( + http::header::CONTENT_TYPE, + tonic::metadata::GRPC_CONTENT_TYPE, + ); + Ok(response) + }) + } } } } - impl Clone for DaprServer { + impl Clone for DaprServer { fn clone(&self) -> Self { let inner = self.inner.clone(); Self { @@ -7227,7 +8032,9 @@ pub mod dapr_server { } } } - impl tonic::server::NamedService for DaprServer { - const NAME: &'static str = "dapr.proto.runtime.v1.Dapr"; + /// Generated gRPC service name + pub const SERVICE_NAME: &str = "dapr.proto.runtime.v1.Dapr"; + impl tonic::server::NamedService for DaprServer { + const NAME: &'static str = SERVICE_NAME; } } diff --git a/dapr/src/lib.rs b/dapr/src/lib.rs index 7f8b53a3..e5be4084 100644 --- a/dapr/src/lib.rs +++ b/dapr/src/lib.rs @@ -1,12 +1,12 @@ -#![doc = include_str!("../../README.md")] +#![doc = include_str!("../README.md")] extern crate dapr_macros; -pub use dapr_macros::actor; pub use serde; pub use serde_json; pub use client::Client; +pub use dapr_macros::actor; /// Module containing the Dapr Callback SDK. pub mod appcallback; diff --git a/examples/src/invoke/protos/helloworld.rs b/examples/src/invoke/protos/helloworld.rs index 1000f169..df7df14d 100644 --- a/examples/src/invoke/protos/helloworld.rs +++ b/examples/src/invoke/protos/helloworld.rs @@ -1,11 +1,9 @@ // This file is @generated by prost-build. -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct HelloRequest { #[prost(string, tag = "1")] pub name: ::prost::alloc::string::String, } -#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct HelloReply { #[prost(string, tag = "1")] @@ -13,10 +11,15 @@ pub struct HelloReply { } /// Generated client implementations. pub mod greeter_client { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] - use tonic::codegen::http::Uri; + #![allow( + unused_variables, + dead_code, + missing_docs, + clippy::wildcard_imports, + clippy::let_unit_value, + )] use tonic::codegen::*; - + use tonic::codegen::http::Uri; #[derive(Debug, Clone)] pub struct GreeterClient { inner: tonic::client::Grpc, @@ -36,8 +39,8 @@ pub mod greeter_client { where T: tonic::client::GrpcService, T::Error: Into, - T::ResponseBody: Body + Send + 'static, - ::Error: Into + Send, + T::ResponseBody: Body + std::marker::Send + 'static, + ::Error: Into + std::marker::Send, { pub fn new(inner: T) -> Self { let inner = tonic::client::Grpc::new(inner); @@ -60,8 +63,9 @@ pub mod greeter_client { >::ResponseBody, >, >, - >>::Error: - Into + Send + Sync, + , + >>::Error: Into + std::marker::Send + std::marker::Sync, { GreeterClient::new(InterceptedService::new(inner, interceptor)) } @@ -100,14 +104,18 @@ pub mod greeter_client { &mut self, request: impl tonic::IntoRequest, ) -> std::result::Result, tonic::Status> { - self.inner.ready().await.map_err(|e| { - tonic::Status::new( - tonic::Code::Unknown, - format!("Service was not ready: {}", e.into()), - ) - })?; + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::unknown( + format!("Service was not ready: {}", e.into()), + ) + })?; let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static("/helloworld.Greeter/SayHello"); + let path = http::uri::PathAndQuery::from_static( + "/helloworld.Greeter/SayHello", + ); let mut req = request.into_request(); req.extensions_mut() .insert(GrpcMethod::new("helloworld.Greeter", "SayHello")); @@ -117,26 +125,31 @@ pub mod greeter_client { } /// Generated server implementations. pub mod greeter_server { - #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + #![allow( + unused_variables, + dead_code, + missing_docs, + clippy::wildcard_imports, + clippy::let_unit_value, + )] use tonic::codegen::*; - /// Generated trait containing gRPC methods that should be implemented for use with GreeterServer. #[async_trait] - pub trait Greeter: Send + Sync + 'static { + pub trait Greeter: std::marker::Send + std::marker::Sync + 'static { async fn say_hello( &self, request: tonic::Request, ) -> std::result::Result, tonic::Status>; } #[derive(Debug)] - pub struct GreeterServer { + pub struct GreeterServer { inner: Arc, accept_compression_encodings: EnabledCompressionEncodings, send_compression_encodings: EnabledCompressionEncodings, max_decoding_message_size: Option, max_encoding_message_size: Option, } - impl GreeterServer { + impl GreeterServer { pub fn new(inner: T) -> Self { Self::from_arc(Arc::new(inner)) } @@ -149,7 +162,10 @@ pub mod greeter_server { max_encoding_message_size: None, } } - pub fn with_interceptor(inner: T, interceptor: F) -> InterceptedService + pub fn with_interceptor( + inner: T, + interceptor: F, + ) -> InterceptedService where F: tonic::service::Interceptor, { @@ -187,8 +203,8 @@ pub mod greeter_server { impl tonic::codegen::Service> for GreeterServer where T: Greeter, - B: Body + Send + 'static, - B::Error: Into + Send + 'static, + B: Body + std::marker::Send + 'static, + B::Error: Into + std::marker::Send + 'static, { type Response = http::Response; type Error = std::convert::Infallible; @@ -204,16 +220,21 @@ pub mod greeter_server { "/helloworld.Greeter/SayHello" => { #[allow(non_camel_case_types)] struct SayHelloSvc(pub Arc); - impl tonic::server::UnaryService for SayHelloSvc { + impl tonic::server::UnaryService + for SayHelloSvc { type Response = super::HelloReply; - type Future = BoxFuture, tonic::Status>; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); - let fut = - async move { ::say_hello(&inner, request).await }; + let fut = async move { + ::say_hello(&inner, request).await + }; Box::pin(fut) } } @@ -239,21 +260,27 @@ pub mod greeter_server { }; Box::pin(fut) } - _ => Box::pin(async move { - Ok(http::Response::builder() - .status(200) - .header("grpc-status", tonic::Code::Unimplemented as i32) - .header( - http::header::CONTENT_TYPE, - tonic::metadata::GRPC_CONTENT_TYPE, - ) - .body(empty_body()) - .unwrap()) - }), + _ => { + Box::pin(async move { + let mut response = http::Response::new(empty_body()); + let headers = response.headers_mut(); + headers + .insert( + tonic::Status::GRPC_STATUS, + (tonic::Code::Unimplemented as i32).into(), + ); + headers + .insert( + http::header::CONTENT_TYPE, + tonic::metadata::GRPC_CONTENT_TYPE, + ); + Ok(response) + }) + } } } } - impl Clone for GreeterServer { + impl Clone for GreeterServer { fn clone(&self) -> Self { let inner = self.inner.clone(); Self { @@ -265,7 +292,9 @@ pub mod greeter_server { } } } - impl tonic::server::NamedService for GreeterServer { - const NAME: &'static str = "helloworld.Greeter"; + /// Generated gRPC service name + pub const SERVICE_NAME: &str = "helloworld.Greeter"; + impl tonic::server::NamedService for GreeterServer { + const NAME: &'static str = SERVICE_NAME; } } diff --git a/examples/src/jobs/jobs.rs b/examples/src/jobs/jobs.rs index 6f724e1e..d8cbf07e 100644 --- a/examples/src/jobs/jobs.rs +++ b/examples/src/jobs/jobs.rs @@ -1,6 +1,5 @@ use std::time::Duration; -use base64::prelude::*; use dapr::client::JobBuilder; use dapr::dapr::proto::runtime::v1::{ app_callback_alpha_server::AppCallbackAlphaServer, JobEventRequest, JobEventResponse, @@ -42,17 +41,8 @@ async fn backup_job_handler(request: JobEventRequest) -> Result