pub struct LayoutServiceClient<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.get_layouts(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.get_layouts(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> LayoutServiceClient<T>
impl<T> LayoutServiceClient<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 get_layouts(
&self,
request: GetLayoutsRequest,
) -> Result<UnaryResponse<OwnedView<GetLayoutsResponseView<'static>>>, ConnectError>
pub async fn get_layouts( &self, request: GetLayoutsRequest, ) -> Result<UnaryResponse<OwnedView<GetLayoutsResponseView<'static>>>, ConnectError>
Call the GetLayouts RPC. Sends a request to /layout.v1.LayoutService/GetLayouts.
Sourcepub async fn get_layouts_with_options(
&self,
request: GetLayoutsRequest,
options: CallOptions,
) -> Result<UnaryResponse<OwnedView<GetLayoutsResponseView<'static>>>, ConnectError>
pub async fn get_layouts_with_options( &self, request: GetLayoutsRequest, options: CallOptions, ) -> Result<UnaryResponse<OwnedView<GetLayoutsResponseView<'static>>>, ConnectError>
Call the GetLayouts RPC with explicit per-call options. Options override ClientConfig defaults.
Sourcepub async fn get_layout(
&self,
request: GetLayoutRequest,
) -> Result<UnaryResponse<OwnedView<GetLayoutResponseView<'static>>>, ConnectError>
pub async fn get_layout( &self, request: GetLayoutRequest, ) -> Result<UnaryResponse<OwnedView<GetLayoutResponseView<'static>>>, ConnectError>
Call the GetLayout RPC. Sends a request to /layout.v1.LayoutService/GetLayout.
Sourcepub async fn get_layout_with_options(
&self,
request: GetLayoutRequest,
options: CallOptions,
) -> Result<UnaryResponse<OwnedView<GetLayoutResponseView<'static>>>, ConnectError>
pub async fn get_layout_with_options( &self, request: GetLayoutRequest, options: CallOptions, ) -> Result<UnaryResponse<OwnedView<GetLayoutResponseView<'static>>>, ConnectError>
Call the GetLayout RPC with explicit per-call options. Options override ClientConfig defaults.
Sourcepub async fn upsert_layout(
&self,
request: UpsertLayoutRequest,
) -> Result<UnaryResponse<OwnedView<UpsertLayoutResponseView<'static>>>, ConnectError>
pub async fn upsert_layout( &self, request: UpsertLayoutRequest, ) -> Result<UnaryResponse<OwnedView<UpsertLayoutResponseView<'static>>>, ConnectError>
Call the UpsertLayout RPC. Sends a request to /layout.v1.LayoutService/UpsertLayout.
Sourcepub async fn upsert_layout_with_options(
&self,
request: UpsertLayoutRequest,
options: CallOptions,
) -> Result<UnaryResponse<OwnedView<UpsertLayoutResponseView<'static>>>, ConnectError>
pub async fn upsert_layout_with_options( &self, request: UpsertLayoutRequest, options: CallOptions, ) -> Result<UnaryResponse<OwnedView<UpsertLayoutResponseView<'static>>>, ConnectError>
Call the UpsertLayout RPC with explicit per-call options. Options override ClientConfig defaults.
Sourcepub async fn delete_layout(
&self,
request: DeleteLayoutRequest,
) -> Result<UnaryResponse<OwnedView<DeleteLayoutResponseView<'static>>>, ConnectError>
pub async fn delete_layout( &self, request: DeleteLayoutRequest, ) -> Result<UnaryResponse<OwnedView<DeleteLayoutResponseView<'static>>>, ConnectError>
Call the DeleteLayout RPC. Sends a request to /layout.v1.LayoutService/DeleteLayout.
Sourcepub async fn delete_layout_with_options(
&self,
request: DeleteLayoutRequest,
options: CallOptions,
) -> Result<UnaryResponse<OwnedView<DeleteLayoutResponseView<'static>>>, ConnectError>
pub async fn delete_layout_with_options( &self, request: DeleteLayoutRequest, options: CallOptions, ) -> Result<UnaryResponse<OwnedView<DeleteLayoutResponseView<'static>>>, ConnectError>
Call the DeleteLayout RPC with explicit per-call options. Options override ClientConfig defaults.
Call the ResolveLayoutShareToken RPC. Sends a request to /layout.v1.LayoutService/ResolveLayoutShareToken.
Call the ResolveLayoutShareToken RPC with explicit per-call options. Options override ClientConfig defaults.
Call the CreateLayoutShareLink RPC. Sends a request to /layout.v1.LayoutService/CreateLayoutShareLink.
Call the CreateLayoutShareLink RPC with explicit per-call options. Options override ClientConfig defaults.
Call the RevokeLayoutShareLink RPC. Sends a request to /layout.v1.LayoutService/RevokeLayoutShareLink.
Call the RevokeLayoutShareLink RPC with explicit per-call options. Options override ClientConfig defaults.
Sourcepub async fn list_owner_published_layouts(
&self,
request: ListOwnerPublishedLayoutsRequest,
) -> Result<UnaryResponse<OwnedView<ListOwnerPublishedLayoutsResponseView<'static>>>, ConnectError>
pub async fn list_owner_published_layouts( &self, request: ListOwnerPublishedLayoutsRequest, ) -> Result<UnaryResponse<OwnedView<ListOwnerPublishedLayoutsResponseView<'static>>>, ConnectError>
Call the ListOwnerPublishedLayouts RPC. Sends a request to /layout.v1.LayoutService/ListOwnerPublishedLayouts.
Sourcepub async fn list_owner_published_layouts_with_options(
&self,
request: ListOwnerPublishedLayoutsRequest,
options: CallOptions,
) -> Result<UnaryResponse<OwnedView<ListOwnerPublishedLayoutsResponseView<'static>>>, ConnectError>
pub async fn list_owner_published_layouts_with_options( &self, request: ListOwnerPublishedLayoutsRequest, options: CallOptions, ) -> Result<UnaryResponse<OwnedView<ListOwnerPublishedLayoutsResponseView<'static>>>, ConnectError>
Call the ListOwnerPublishedLayouts RPC with explicit per-call options. Options override ClientConfig defaults.
Sourcepub async fn publish_layout(
&self,
request: PublishLayoutRequest,
) -> Result<UnaryResponse<OwnedView<PublishLayoutResponseView<'static>>>, ConnectError>
pub async fn publish_layout( &self, request: PublishLayoutRequest, ) -> Result<UnaryResponse<OwnedView<PublishLayoutResponseView<'static>>>, ConnectError>
Call the PublishLayout RPC. Sends a request to /layout.v1.LayoutService/PublishLayout.
Sourcepub async fn publish_layout_with_options(
&self,
request: PublishLayoutRequest,
options: CallOptions,
) -> Result<UnaryResponse<OwnedView<PublishLayoutResponseView<'static>>>, ConnectError>
pub async fn publish_layout_with_options( &self, request: PublishLayoutRequest, options: CallOptions, ) -> Result<UnaryResponse<OwnedView<PublishLayoutResponseView<'static>>>, ConnectError>
Call the PublishLayout RPC with explicit per-call options. Options override ClientConfig defaults.
Sourcepub async fn unpublish_layout(
&self,
request: UnpublishLayoutRequest,
) -> Result<UnaryResponse<OwnedView<UnpublishLayoutResponseView<'static>>>, ConnectError>
pub async fn unpublish_layout( &self, request: UnpublishLayoutRequest, ) -> Result<UnaryResponse<OwnedView<UnpublishLayoutResponseView<'static>>>, ConnectError>
Call the UnpublishLayout RPC. Sends a request to /layout.v1.LayoutService/UnpublishLayout.
Sourcepub async fn unpublish_layout_with_options(
&self,
request: UnpublishLayoutRequest,
options: CallOptions,
) -> Result<UnaryResponse<OwnedView<UnpublishLayoutResponseView<'static>>>, ConnectError>
pub async fn unpublish_layout_with_options( &self, request: UnpublishLayoutRequest, options: CallOptions, ) -> Result<UnaryResponse<OwnedView<UnpublishLayoutResponseView<'static>>>, ConnectError>
Call the UnpublishLayout RPC with explicit per-call options. Options override ClientConfig defaults.
Sourcepub async fn list_layout_template_versions(
&self,
request: ListLayoutTemplateVersionsRequest,
) -> Result<UnaryResponse<OwnedView<ListLayoutTemplateVersionsResponseView<'static>>>, ConnectError>
pub async fn list_layout_template_versions( &self, request: ListLayoutTemplateVersionsRequest, ) -> Result<UnaryResponse<OwnedView<ListLayoutTemplateVersionsResponseView<'static>>>, ConnectError>
Call the ListLayoutTemplateVersions RPC. Sends a request to /layout.v1.LayoutService/ListLayoutTemplateVersions.
Sourcepub async fn list_layout_template_versions_with_options(
&self,
request: ListLayoutTemplateVersionsRequest,
options: CallOptions,
) -> Result<UnaryResponse<OwnedView<ListLayoutTemplateVersionsResponseView<'static>>>, ConnectError>
pub async fn list_layout_template_versions_with_options( &self, request: ListLayoutTemplateVersionsRequest, options: CallOptions, ) -> Result<UnaryResponse<OwnedView<ListLayoutTemplateVersionsResponseView<'static>>>, ConnectError>
Call the ListLayoutTemplateVersions RPC with explicit per-call options. Options override ClientConfig defaults.
Sourcepub async fn get_layout_template_version(
&self,
request: GetLayoutTemplateVersionRequest,
) -> Result<UnaryResponse<OwnedView<GetLayoutTemplateVersionResponseView<'static>>>, ConnectError>
pub async fn get_layout_template_version( &self, request: GetLayoutTemplateVersionRequest, ) -> Result<UnaryResponse<OwnedView<GetLayoutTemplateVersionResponseView<'static>>>, ConnectError>
Call the GetLayoutTemplateVersion RPC. Sends a request to /layout.v1.LayoutService/GetLayoutTemplateVersion.
Sourcepub async fn get_layout_template_version_with_options(
&self,
request: GetLayoutTemplateVersionRequest,
options: CallOptions,
) -> Result<UnaryResponse<OwnedView<GetLayoutTemplateVersionResponseView<'static>>>, ConnectError>
pub async fn get_layout_template_version_with_options( &self, request: GetLayoutTemplateVersionRequest, options: CallOptions, ) -> Result<UnaryResponse<OwnedView<GetLayoutTemplateVersionResponseView<'static>>>, ConnectError>
Call the GetLayoutTemplateVersion RPC with explicit per-call options. Options override ClientConfig defaults.
Sourcepub async fn set_layout_template_subscription(
&self,
request: SetLayoutTemplateSubscriptionRequest,
) -> Result<UnaryResponse<OwnedView<SetLayoutTemplateSubscriptionResponseView<'static>>>, ConnectError>
pub async fn set_layout_template_subscription( &self, request: SetLayoutTemplateSubscriptionRequest, ) -> Result<UnaryResponse<OwnedView<SetLayoutTemplateSubscriptionResponseView<'static>>>, ConnectError>
Call the SetLayoutTemplateSubscription RPC. Sends a request to /layout.v1.LayoutService/SetLayoutTemplateSubscription.
Sourcepub async fn set_layout_template_subscription_with_options(
&self,
request: SetLayoutTemplateSubscriptionRequest,
options: CallOptions,
) -> Result<UnaryResponse<OwnedView<SetLayoutTemplateSubscriptionResponseView<'static>>>, ConnectError>
pub async fn set_layout_template_subscription_with_options( &self, request: SetLayoutTemplateSubscriptionRequest, options: CallOptions, ) -> Result<UnaryResponse<OwnedView<SetLayoutTemplateSubscriptionResponseView<'static>>>, ConnectError>
Call the SetLayoutTemplateSubscription RPC with explicit per-call options. Options override ClientConfig defaults.
Sourcepub async fn delete_layout_template_subscription(
&self,
request: DeleteLayoutTemplateSubscriptionRequest,
) -> Result<UnaryResponse<OwnedView<DeleteLayoutTemplateSubscriptionResponseView<'static>>>, ConnectError>
pub async fn delete_layout_template_subscription( &self, request: DeleteLayoutTemplateSubscriptionRequest, ) -> Result<UnaryResponse<OwnedView<DeleteLayoutTemplateSubscriptionResponseView<'static>>>, ConnectError>
Call the DeleteLayoutTemplateSubscription RPC. Sends a request to /layout.v1.LayoutService/DeleteLayoutTemplateSubscription.
Sourcepub async fn delete_layout_template_subscription_with_options(
&self,
request: DeleteLayoutTemplateSubscriptionRequest,
options: CallOptions,
) -> Result<UnaryResponse<OwnedView<DeleteLayoutTemplateSubscriptionResponseView<'static>>>, ConnectError>
pub async fn delete_layout_template_subscription_with_options( &self, request: DeleteLayoutTemplateSubscriptionRequest, options: CallOptions, ) -> Result<UnaryResponse<OwnedView<DeleteLayoutTemplateSubscriptionResponseView<'static>>>, ConnectError>
Call the DeleteLayoutTemplateSubscription RPC with explicit per-call options. Options override ClientConfig defaults.
Sourcepub async fn list_my_layout_template_subscriptions(
&self,
request: ListMyLayoutTemplateSubscriptionsRequest,
) -> Result<UnaryResponse<OwnedView<ListMyLayoutTemplateSubscriptionsResponseView<'static>>>, ConnectError>
pub async fn list_my_layout_template_subscriptions( &self, request: ListMyLayoutTemplateSubscriptionsRequest, ) -> Result<UnaryResponse<OwnedView<ListMyLayoutTemplateSubscriptionsResponseView<'static>>>, ConnectError>
Call the ListMyLayoutTemplateSubscriptions RPC. Sends a request to /layout.v1.LayoutService/ListMyLayoutTemplateSubscriptions.
Sourcepub async fn list_my_layout_template_subscriptions_with_options(
&self,
request: ListMyLayoutTemplateSubscriptionsRequest,
options: CallOptions,
) -> Result<UnaryResponse<OwnedView<ListMyLayoutTemplateSubscriptionsResponseView<'static>>>, ConnectError>
pub async fn list_my_layout_template_subscriptions_with_options( &self, request: ListMyLayoutTemplateSubscriptionsRequest, options: CallOptions, ) -> Result<UnaryResponse<OwnedView<ListMyLayoutTemplateSubscriptionsResponseView<'static>>>, ConnectError>
Call the ListMyLayoutTemplateSubscriptions RPC with explicit per-call options. Options override ClientConfig defaults.
Trait Implementations§
Source§impl<T: Clone> Clone for LayoutServiceClient<T>
impl<T: Clone> Clone for LayoutServiceClient<T>
Source§fn clone(&self) -> LayoutServiceClient<T>
fn clone(&self) -> LayoutServiceClient<T>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more