pub struct PolicyServiceClient<T> { /* private fields */ }Expand description
Client for this service.
Generic over T: ClientTransport. For gRPC (HTTP/2), use
Http2Connection — it has honest poll_ready and composes with
tower::balance for multi-connection load balancing. For Connect
over HTTP/1.1 (or unknown protocol), use HttpClient.
§Working with the response
Unary calls return UnaryResponse<OwnedView<FooView>>.
view() borrows the response
message, so field access is zero-copy:
let resp = client.list_subaccount_policies(request).await?;
let name: &str = resp.view().name; // borrow into the response bufferIf you need the owned struct (e.g. to store or pass by value), use
into_owned():
let owned = client.list_subaccount_policies(request).await?.into_owned();into_view() keeps the
zero-copy decoded body (an OwnedView) without copying; field access on it
goes through .reborrow(). Streaming responses yield one
StreamMessage per received message from
.message().await — read fields zero-copy through the generated accessor
methods (msg.name()) or .view(), or convert with .to_owned_message().
Implementations§
Source§impl<T> PolicyServiceClient<T>
impl<T> PolicyServiceClient<T>
Sourcepub fn new(transport: T, config: ClientConfig) -> Self
pub fn new(transport: T, config: ClientConfig) -> Self
Create a new client with the given transport and configuration.
Sourcepub fn config(&self) -> &ClientConfig
pub fn config(&self) -> &ClientConfig
Get the client configuration.
Sourcepub fn config_mut(&mut self) -> &mut ClientConfig
pub fn config_mut(&mut self) -> &mut ClientConfig
Get a mutable reference to the client configuration.
Sourcepub async fn list_subaccount_policies(
&self,
request: ListSubaccountPoliciesRequest,
) -> Result<UnaryResponse<OwnedView<ListSubaccountPoliciesResponseView<'static>>>, ConnectError>
pub async fn list_subaccount_policies( &self, request: ListSubaccountPoliciesRequest, ) -> Result<UnaryResponse<OwnedView<ListSubaccountPoliciesResponseView<'static>>>, ConnectError>
Call the ListSubaccountPolicies RPC. Sends a request to /auth.v1.PolicyService/ListSubaccountPolicies.
Sourcepub async fn list_subaccount_policies_with_options(
&self,
request: ListSubaccountPoliciesRequest,
options: CallOptions,
) -> Result<UnaryResponse<OwnedView<ListSubaccountPoliciesResponseView<'static>>>, ConnectError>
pub async fn list_subaccount_policies_with_options( &self, request: ListSubaccountPoliciesRequest, options: CallOptions, ) -> Result<UnaryResponse<OwnedView<ListSubaccountPoliciesResponseView<'static>>>, ConnectError>
Call the ListSubaccountPolicies RPC with explicit per-call options. Options override ClientConfig defaults.
Sourcepub async fn get_subaccount_policy(
&self,
request: GetSubaccountPolicyRequest,
) -> Result<UnaryResponse<OwnedView<GetSubaccountPolicyResponseView<'static>>>, ConnectError>
pub async fn get_subaccount_policy( &self, request: GetSubaccountPolicyRequest, ) -> Result<UnaryResponse<OwnedView<GetSubaccountPolicyResponseView<'static>>>, ConnectError>
Call the GetSubaccountPolicy RPC. Sends a request to /auth.v1.PolicyService/GetSubaccountPolicy.
Sourcepub async fn get_subaccount_policy_with_options(
&self,
request: GetSubaccountPolicyRequest,
options: CallOptions,
) -> Result<UnaryResponse<OwnedView<GetSubaccountPolicyResponseView<'static>>>, ConnectError>
pub async fn get_subaccount_policy_with_options( &self, request: GetSubaccountPolicyRequest, options: CallOptions, ) -> Result<UnaryResponse<OwnedView<GetSubaccountPolicyResponseView<'static>>>, ConnectError>
Call the GetSubaccountPolicy RPC with explicit per-call options. Options override ClientConfig defaults.
Sourcepub async fn create_subaccount_policy(
&self,
request: CreateSubaccountPolicyRequest,
) -> Result<UnaryResponse<OwnedView<CreateSubaccountPolicyResponseView<'static>>>, ConnectError>
pub async fn create_subaccount_policy( &self, request: CreateSubaccountPolicyRequest, ) -> Result<UnaryResponse<OwnedView<CreateSubaccountPolicyResponseView<'static>>>, ConnectError>
Call the CreateSubaccountPolicy RPC. Sends a request to /auth.v1.PolicyService/CreateSubaccountPolicy.
Sourcepub async fn create_subaccount_policy_with_options(
&self,
request: CreateSubaccountPolicyRequest,
options: CallOptions,
) -> Result<UnaryResponse<OwnedView<CreateSubaccountPolicyResponseView<'static>>>, ConnectError>
pub async fn create_subaccount_policy_with_options( &self, request: CreateSubaccountPolicyRequest, options: CallOptions, ) -> Result<UnaryResponse<OwnedView<CreateSubaccountPolicyResponseView<'static>>>, ConnectError>
Call the CreateSubaccountPolicy RPC with explicit per-call options. Options override ClientConfig defaults.
Sourcepub async fn update_subaccount_policy(
&self,
request: UpdateSubaccountPolicyRequest,
) -> Result<UnaryResponse<OwnedView<UpdateSubaccountPolicyResponseView<'static>>>, ConnectError>
pub async fn update_subaccount_policy( &self, request: UpdateSubaccountPolicyRequest, ) -> Result<UnaryResponse<OwnedView<UpdateSubaccountPolicyResponseView<'static>>>, ConnectError>
Call the UpdateSubaccountPolicy RPC. Sends a request to /auth.v1.PolicyService/UpdateSubaccountPolicy.
Sourcepub async fn update_subaccount_policy_with_options(
&self,
request: UpdateSubaccountPolicyRequest,
options: CallOptions,
) -> Result<UnaryResponse<OwnedView<UpdateSubaccountPolicyResponseView<'static>>>, ConnectError>
pub async fn update_subaccount_policy_with_options( &self, request: UpdateSubaccountPolicyRequest, options: CallOptions, ) -> Result<UnaryResponse<OwnedView<UpdateSubaccountPolicyResponseView<'static>>>, ConnectError>
Call the UpdateSubaccountPolicy RPC with explicit per-call options. Options override ClientConfig defaults.
Sourcepub async fn delete_subaccount_policy(
&self,
request: DeleteSubaccountPolicyRequest,
) -> Result<UnaryResponse<OwnedView<DeleteSubaccountPolicyResponseView<'static>>>, ConnectError>
pub async fn delete_subaccount_policy( &self, request: DeleteSubaccountPolicyRequest, ) -> Result<UnaryResponse<OwnedView<DeleteSubaccountPolicyResponseView<'static>>>, ConnectError>
Call the DeleteSubaccountPolicy RPC. Sends a request to /auth.v1.PolicyService/DeleteSubaccountPolicy.
Sourcepub async fn delete_subaccount_policy_with_options(
&self,
request: DeleteSubaccountPolicyRequest,
options: CallOptions,
) -> Result<UnaryResponse<OwnedView<DeleteSubaccountPolicyResponseView<'static>>>, ConnectError>
pub async fn delete_subaccount_policy_with_options( &self, request: DeleteSubaccountPolicyRequest, options: CallOptions, ) -> Result<UnaryResponse<OwnedView<DeleteSubaccountPolicyResponseView<'static>>>, ConnectError>
Call the DeleteSubaccountPolicy RPC with explicit per-call options. Options override ClientConfig defaults.
Sourcepub async fn set_subaccount_policy(
&self,
request: SetSubaccountPolicyRequest,
) -> Result<UnaryResponse<OwnedView<SetSubaccountPolicyResponseView<'static>>>, ConnectError>
pub async fn set_subaccount_policy( &self, request: SetSubaccountPolicyRequest, ) -> Result<UnaryResponse<OwnedView<SetSubaccountPolicyResponseView<'static>>>, ConnectError>
Call the SetSubaccountPolicy RPC. Sends a request to /auth.v1.PolicyService/SetSubaccountPolicy.
Sourcepub async fn set_subaccount_policy_with_options(
&self,
request: SetSubaccountPolicyRequest,
options: CallOptions,
) -> Result<UnaryResponse<OwnedView<SetSubaccountPolicyResponseView<'static>>>, ConnectError>
pub async fn set_subaccount_policy_with_options( &self, request: SetSubaccountPolicyRequest, options: CallOptions, ) -> Result<UnaryResponse<OwnedView<SetSubaccountPolicyResponseView<'static>>>, ConnectError>
Call the SetSubaccountPolicy RPC with explicit per-call options. Options override ClientConfig defaults.
Sourcepub async fn list_api_policies(
&self,
request: ListApiPoliciesRequest,
) -> Result<UnaryResponse<OwnedView<ListApiPoliciesResponseView<'static>>>, ConnectError>
pub async fn list_api_policies( &self, request: ListApiPoliciesRequest, ) -> Result<UnaryResponse<OwnedView<ListApiPoliciesResponseView<'static>>>, ConnectError>
Call the ListApiPolicies RPC. Sends a request to /auth.v1.PolicyService/ListApiPolicies.
Sourcepub async fn list_api_policies_with_options(
&self,
request: ListApiPoliciesRequest,
options: CallOptions,
) -> Result<UnaryResponse<OwnedView<ListApiPoliciesResponseView<'static>>>, ConnectError>
pub async fn list_api_policies_with_options( &self, request: ListApiPoliciesRequest, options: CallOptions, ) -> Result<UnaryResponse<OwnedView<ListApiPoliciesResponseView<'static>>>, ConnectError>
Call the ListApiPolicies RPC with explicit per-call options. Options override ClientConfig defaults.
Sourcepub async fn get_api_policy(
&self,
request: GetApiPolicyRequest,
) -> Result<UnaryResponse<OwnedView<GetApiPolicyResponseView<'static>>>, ConnectError>
pub async fn get_api_policy( &self, request: GetApiPolicyRequest, ) -> Result<UnaryResponse<OwnedView<GetApiPolicyResponseView<'static>>>, ConnectError>
Call the GetApiPolicy RPC. Sends a request to /auth.v1.PolicyService/GetApiPolicy.
Sourcepub async fn get_api_policy_with_options(
&self,
request: GetApiPolicyRequest,
options: CallOptions,
) -> Result<UnaryResponse<OwnedView<GetApiPolicyResponseView<'static>>>, ConnectError>
pub async fn get_api_policy_with_options( &self, request: GetApiPolicyRequest, options: CallOptions, ) -> Result<UnaryResponse<OwnedView<GetApiPolicyResponseView<'static>>>, ConnectError>
Call the GetApiPolicy RPC with explicit per-call options. Options override ClientConfig defaults.
Sourcepub async fn create_api_policy(
&self,
request: CreateApiPolicyRequest,
) -> Result<UnaryResponse<OwnedView<CreateApiPolicyResponseView<'static>>>, ConnectError>
pub async fn create_api_policy( &self, request: CreateApiPolicyRequest, ) -> Result<UnaryResponse<OwnedView<CreateApiPolicyResponseView<'static>>>, ConnectError>
Call the CreateApiPolicy RPC. Sends a request to /auth.v1.PolicyService/CreateApiPolicy.
Sourcepub async fn create_api_policy_with_options(
&self,
request: CreateApiPolicyRequest,
options: CallOptions,
) -> Result<UnaryResponse<OwnedView<CreateApiPolicyResponseView<'static>>>, ConnectError>
pub async fn create_api_policy_with_options( &self, request: CreateApiPolicyRequest, options: CallOptions, ) -> Result<UnaryResponse<OwnedView<CreateApiPolicyResponseView<'static>>>, ConnectError>
Call the CreateApiPolicy RPC with explicit per-call options. Options override ClientConfig defaults.
Sourcepub async fn update_api_policy(
&self,
request: UpdateApiPolicyRequest,
) -> Result<UnaryResponse<OwnedView<UpdateApiPolicyResponseView<'static>>>, ConnectError>
pub async fn update_api_policy( &self, request: UpdateApiPolicyRequest, ) -> Result<UnaryResponse<OwnedView<UpdateApiPolicyResponseView<'static>>>, ConnectError>
Call the UpdateApiPolicy RPC. Sends a request to /auth.v1.PolicyService/UpdateApiPolicy.
Sourcepub async fn update_api_policy_with_options(
&self,
request: UpdateApiPolicyRequest,
options: CallOptions,
) -> Result<UnaryResponse<OwnedView<UpdateApiPolicyResponseView<'static>>>, ConnectError>
pub async fn update_api_policy_with_options( &self, request: UpdateApiPolicyRequest, options: CallOptions, ) -> Result<UnaryResponse<OwnedView<UpdateApiPolicyResponseView<'static>>>, ConnectError>
Call the UpdateApiPolicy RPC with explicit per-call options. Options override ClientConfig defaults.
Sourcepub async fn delete_api_policy(
&self,
request: DeleteApiPolicyRequest,
) -> Result<UnaryResponse<OwnedView<DeleteApiPolicyResponseView<'static>>>, ConnectError>
pub async fn delete_api_policy( &self, request: DeleteApiPolicyRequest, ) -> Result<UnaryResponse<OwnedView<DeleteApiPolicyResponseView<'static>>>, ConnectError>
Call the DeleteApiPolicy RPC. Sends a request to /auth.v1.PolicyService/DeleteApiPolicy.
Sourcepub async fn delete_api_policy_with_options(
&self,
request: DeleteApiPolicyRequest,
options: CallOptions,
) -> Result<UnaryResponse<OwnedView<DeleteApiPolicyResponseView<'static>>>, ConnectError>
pub async fn delete_api_policy_with_options( &self, request: DeleteApiPolicyRequest, options: CallOptions, ) -> Result<UnaryResponse<OwnedView<DeleteApiPolicyResponseView<'static>>>, ConnectError>
Call the DeleteApiPolicy RPC with explicit per-call options. Options override ClientConfig defaults.
Sourcepub async fn set_api_key_policy(
&self,
request: SetApiKeyPolicyRequest,
) -> Result<UnaryResponse<OwnedView<SetApiKeyPolicyResponseView<'static>>>, ConnectError>
pub async fn set_api_key_policy( &self, request: SetApiKeyPolicyRequest, ) -> Result<UnaryResponse<OwnedView<SetApiKeyPolicyResponseView<'static>>>, ConnectError>
Call the SetApiKeyPolicy RPC. Sends a request to /auth.v1.PolicyService/SetApiKeyPolicy.
Sourcepub async fn set_api_key_policy_with_options(
&self,
request: SetApiKeyPolicyRequest,
options: CallOptions,
) -> Result<UnaryResponse<OwnedView<SetApiKeyPolicyResponseView<'static>>>, ConnectError>
pub async fn set_api_key_policy_with_options( &self, request: SetApiKeyPolicyRequest, options: CallOptions, ) -> Result<UnaryResponse<OwnedView<SetApiKeyPolicyResponseView<'static>>>, ConnectError>
Call the SetApiKeyPolicy RPC with explicit per-call options. Options override ClientConfig defaults.
Trait Implementations§
Source§impl<T: Clone> Clone for PolicyServiceClient<T>
impl<T: Clone> Clone for PolicyServiceClient<T>
Source§fn clone(&self) -> PolicyServiceClient<T>
fn clone(&self) -> PolicyServiceClient<T>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more