pub struct PolychartServiceClient<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_market_layers(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_market_layers(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> PolychartServiceClient<T>
impl<T> PolychartServiceClient<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_market_layers(
&self,
request: GetMarketLayersRequest,
) -> Result<UnaryResponse<OwnedView<GetMarketLayersResponseView<'static>>>, ConnectError>
pub async fn get_market_layers( &self, request: GetMarketLayersRequest, ) -> Result<UnaryResponse<OwnedView<GetMarketLayersResponseView<'static>>>, ConnectError>
Call the GetMarketLayers RPC. Sends a request to /polychart.v1.PolychartService/GetMarketLayers.
Sourcepub async fn get_market_layers_with_options(
&self,
request: GetMarketLayersRequest,
options: CallOptions,
) -> Result<UnaryResponse<OwnedView<GetMarketLayersResponseView<'static>>>, ConnectError>
pub async fn get_market_layers_with_options( &self, request: GetMarketLayersRequest, options: CallOptions, ) -> Result<UnaryResponse<OwnedView<GetMarketLayersResponseView<'static>>>, ConnectError>
Call the GetMarketLayers RPC with explicit per-call options. Options override ClientConfig defaults.
Sourcepub async fn list_inbox_market_layers(
&self,
request: ListInboxMarketLayersRequest,
) -> Result<UnaryResponse<OwnedView<ListInboxMarketLayersResponseView<'static>>>, ConnectError>
pub async fn list_inbox_market_layers( &self, request: ListInboxMarketLayersRequest, ) -> Result<UnaryResponse<OwnedView<ListInboxMarketLayersResponseView<'static>>>, ConnectError>
Call the ListInboxMarketLayers RPC. Sends a request to /polychart.v1.PolychartService/ListInboxMarketLayers.
Sourcepub async fn list_inbox_market_layers_with_options(
&self,
request: ListInboxMarketLayersRequest,
options: CallOptions,
) -> Result<UnaryResponse<OwnedView<ListInboxMarketLayersResponseView<'static>>>, ConnectError>
pub async fn list_inbox_market_layers_with_options( &self, request: ListInboxMarketLayersRequest, options: CallOptions, ) -> Result<UnaryResponse<OwnedView<ListInboxMarketLayersResponseView<'static>>>, ConnectError>
Call the ListInboxMarketLayers RPC with explicit per-call options. Options override ClientConfig defaults.
Sourcepub async fn get_layer_snapshot(
&self,
request: GetLayerSnapshotRequest,
) -> Result<UnaryResponse<OwnedView<GetLayerSnapshotResponseView<'static>>>, ConnectError>
pub async fn get_layer_snapshot( &self, request: GetLayerSnapshotRequest, ) -> Result<UnaryResponse<OwnedView<GetLayerSnapshotResponseView<'static>>>, ConnectError>
Call the GetLayerSnapshot RPC. Sends a request to /polychart.v1.PolychartService/GetLayerSnapshot.
Sourcepub async fn get_layer_snapshot_with_options(
&self,
request: GetLayerSnapshotRequest,
options: CallOptions,
) -> Result<UnaryResponse<OwnedView<GetLayerSnapshotResponseView<'static>>>, ConnectError>
pub async fn get_layer_snapshot_with_options( &self, request: GetLayerSnapshotRequest, options: CallOptions, ) -> Result<UnaryResponse<OwnedView<GetLayerSnapshotResponseView<'static>>>, ConnectError>
Call the GetLayerSnapshot RPC with explicit per-call options. Options override ClientConfig defaults.
Sourcepub async fn get_layer_subscribe_tokens(
&self,
request: GetLayerSubscribeTokensRequest,
) -> Result<UnaryResponse<OwnedView<GetLayerSubscribeTokensResponseView<'static>>>, ConnectError>
pub async fn get_layer_subscribe_tokens( &self, request: GetLayerSubscribeTokensRequest, ) -> Result<UnaryResponse<OwnedView<GetLayerSubscribeTokensResponseView<'static>>>, ConnectError>
Call the GetLayerSubscribeTokens RPC. Sends a request to /polychart.v1.PolychartService/GetLayerSubscribeTokens.
Sourcepub async fn get_layer_subscribe_tokens_with_options(
&self,
request: GetLayerSubscribeTokensRequest,
options: CallOptions,
) -> Result<UnaryResponse<OwnedView<GetLayerSubscribeTokensResponseView<'static>>>, ConnectError>
pub async fn get_layer_subscribe_tokens_with_options( &self, request: GetLayerSubscribeTokensRequest, options: CallOptions, ) -> Result<UnaryResponse<OwnedView<GetLayerSubscribeTokensResponseView<'static>>>, ConnectError>
Call the GetLayerSubscribeTokens RPC with explicit per-call options. Options override ClientConfig defaults.
Call the ResolveLayerShareToken RPC. Sends a request to /polychart.v1.PolychartService/ResolveLayerShareToken.
Call the ResolveLayerShareToken RPC with explicit per-call options. Options override ClientConfig defaults.
Call the CreateLayerShareLink RPC. Sends a request to /polychart.v1.PolychartService/CreateLayerShareLink.
Call the CreateLayerShareLink RPC with explicit per-call options. Options override ClientConfig defaults.
Call the RevokeLayerShareLink RPC. Sends a request to /polychart.v1.PolychartService/RevokeLayerShareLink.
Call the RevokeLayerShareLink RPC with explicit per-call options. Options override ClientConfig defaults.
Sourcepub async fn list_owner_published_layers(
&self,
request: ListOwnerPublishedLayersRequest,
) -> Result<UnaryResponse<OwnedView<ListOwnerPublishedLayersResponseView<'static>>>, ConnectError>
pub async fn list_owner_published_layers( &self, request: ListOwnerPublishedLayersRequest, ) -> Result<UnaryResponse<OwnedView<ListOwnerPublishedLayersResponseView<'static>>>, ConnectError>
Call the ListOwnerPublishedLayers RPC. Sends a request to /polychart.v1.PolychartService/ListOwnerPublishedLayers.
Sourcepub async fn list_owner_published_layers_with_options(
&self,
request: ListOwnerPublishedLayersRequest,
options: CallOptions,
) -> Result<UnaryResponse<OwnedView<ListOwnerPublishedLayersResponseView<'static>>>, ConnectError>
pub async fn list_owner_published_layers_with_options( &self, request: ListOwnerPublishedLayersRequest, options: CallOptions, ) -> Result<UnaryResponse<OwnedView<ListOwnerPublishedLayersResponseView<'static>>>, ConnectError>
Call the ListOwnerPublishedLayers RPC with explicit per-call options. Options override ClientConfig defaults.
Sourcepub async fn publish_layer(
&self,
request: PublishLayerRequest,
) -> Result<UnaryResponse<OwnedView<PublishLayerResponseView<'static>>>, ConnectError>
pub async fn publish_layer( &self, request: PublishLayerRequest, ) -> Result<UnaryResponse<OwnedView<PublishLayerResponseView<'static>>>, ConnectError>
Call the PublishLayer RPC. Sends a request to /polychart.v1.PolychartService/PublishLayer.
Sourcepub async fn publish_layer_with_options(
&self,
request: PublishLayerRequest,
options: CallOptions,
) -> Result<UnaryResponse<OwnedView<PublishLayerResponseView<'static>>>, ConnectError>
pub async fn publish_layer_with_options( &self, request: PublishLayerRequest, options: CallOptions, ) -> Result<UnaryResponse<OwnedView<PublishLayerResponseView<'static>>>, ConnectError>
Call the PublishLayer RPC with explicit per-call options. Options override ClientConfig defaults.
Sourcepub async fn unpublish_layer(
&self,
request: UnpublishLayerRequest,
) -> Result<UnaryResponse<OwnedView<UnpublishLayerResponseView<'static>>>, ConnectError>
pub async fn unpublish_layer( &self, request: UnpublishLayerRequest, ) -> Result<UnaryResponse<OwnedView<UnpublishLayerResponseView<'static>>>, ConnectError>
Call the UnpublishLayer RPC. Sends a request to /polychart.v1.PolychartService/UnpublishLayer.
Sourcepub async fn unpublish_layer_with_options(
&self,
request: UnpublishLayerRequest,
options: CallOptions,
) -> Result<UnaryResponse<OwnedView<UnpublishLayerResponseView<'static>>>, ConnectError>
pub async fn unpublish_layer_with_options( &self, request: UnpublishLayerRequest, options: CallOptions, ) -> Result<UnaryResponse<OwnedView<UnpublishLayerResponseView<'static>>>, ConnectError>
Call the UnpublishLayer RPC with explicit per-call options. Options override ClientConfig defaults.
Sourcepub async fn upsert_layer(
&self,
request: UpsertLayerRequest,
) -> Result<UnaryResponse<OwnedView<UpsertLayerResponseView<'static>>>, ConnectError>
pub async fn upsert_layer( &self, request: UpsertLayerRequest, ) -> Result<UnaryResponse<OwnedView<UpsertLayerResponseView<'static>>>, ConnectError>
Call the UpsertLayer RPC. Sends a request to /polychart.v1.PolychartService/UpsertLayer.
Sourcepub async fn upsert_layer_with_options(
&self,
request: UpsertLayerRequest,
options: CallOptions,
) -> Result<UnaryResponse<OwnedView<UpsertLayerResponseView<'static>>>, ConnectError>
pub async fn upsert_layer_with_options( &self, request: UpsertLayerRequest, options: CallOptions, ) -> Result<UnaryResponse<OwnedView<UpsertLayerResponseView<'static>>>, ConnectError>
Call the UpsertLayer RPC with explicit per-call options. Options override ClientConfig defaults.
Sourcepub async fn delete_layer(
&self,
request: DeleteLayerRequest,
) -> Result<UnaryResponse<OwnedView<DeleteLayerResponseView<'static>>>, ConnectError>
pub async fn delete_layer( &self, request: DeleteLayerRequest, ) -> Result<UnaryResponse<OwnedView<DeleteLayerResponseView<'static>>>, ConnectError>
Call the DeleteLayer RPC. Sends a request to /polychart.v1.PolychartService/DeleteLayer.
Sourcepub async fn delete_layer_with_options(
&self,
request: DeleteLayerRequest,
options: CallOptions,
) -> Result<UnaryResponse<OwnedView<DeleteLayerResponseView<'static>>>, ConnectError>
pub async fn delete_layer_with_options( &self, request: DeleteLayerRequest, options: CallOptions, ) -> Result<UnaryResponse<OwnedView<DeleteLayerResponseView<'static>>>, ConnectError>
Call the DeleteLayer RPC with explicit per-call options. Options override ClientConfig defaults.
Sourcepub async fn upsert_drawing(
&self,
request: UpsertDrawingRequest,
) -> Result<UnaryResponse<OwnedView<UpsertDrawingResponseView<'static>>>, ConnectError>
pub async fn upsert_drawing( &self, request: UpsertDrawingRequest, ) -> Result<UnaryResponse<OwnedView<UpsertDrawingResponseView<'static>>>, ConnectError>
Call the UpsertDrawing RPC. Sends a request to /polychart.v1.PolychartService/UpsertDrawing.
Sourcepub async fn upsert_drawing_with_options(
&self,
request: UpsertDrawingRequest,
options: CallOptions,
) -> Result<UnaryResponse<OwnedView<UpsertDrawingResponseView<'static>>>, ConnectError>
pub async fn upsert_drawing_with_options( &self, request: UpsertDrawingRequest, options: CallOptions, ) -> Result<UnaryResponse<OwnedView<UpsertDrawingResponseView<'static>>>, ConnectError>
Call the UpsertDrawing RPC with explicit per-call options. Options override ClientConfig defaults.
Sourcepub async fn delete_drawing(
&self,
request: DeleteDrawingRequest,
) -> Result<UnaryResponse<OwnedView<DeleteDrawingResponseView<'static>>>, ConnectError>
pub async fn delete_drawing( &self, request: DeleteDrawingRequest, ) -> Result<UnaryResponse<OwnedView<DeleteDrawingResponseView<'static>>>, ConnectError>
Call the DeleteDrawing RPC. Sends a request to /polychart.v1.PolychartService/DeleteDrawing.
Sourcepub async fn delete_drawing_with_options(
&self,
request: DeleteDrawingRequest,
options: CallOptions,
) -> Result<UnaryResponse<OwnedView<DeleteDrawingResponseView<'static>>>, ConnectError>
pub async fn delete_drawing_with_options( &self, request: DeleteDrawingRequest, options: CallOptions, ) -> Result<UnaryResponse<OwnedView<DeleteDrawingResponseView<'static>>>, ConnectError>
Call the DeleteDrawing RPC with explicit per-call options. Options override ClientConfig defaults.
Sourcepub async fn set_layer_subscriptions(
&self,
request: SetLayerSubscriptionsRequest,
) -> Result<UnaryResponse<OwnedView<SetLayerSubscriptionsResponseView<'static>>>, ConnectError>
pub async fn set_layer_subscriptions( &self, request: SetLayerSubscriptionsRequest, ) -> Result<UnaryResponse<OwnedView<SetLayerSubscriptionsResponseView<'static>>>, ConnectError>
Call the SetLayerSubscriptions RPC. Sends a request to /polychart.v1.PolychartService/SetLayerSubscriptions.
Sourcepub async fn set_layer_subscriptions_with_options(
&self,
request: SetLayerSubscriptionsRequest,
options: CallOptions,
) -> Result<UnaryResponse<OwnedView<SetLayerSubscriptionsResponseView<'static>>>, ConnectError>
pub async fn set_layer_subscriptions_with_options( &self, request: SetLayerSubscriptionsRequest, options: CallOptions, ) -> Result<UnaryResponse<OwnedView<SetLayerSubscriptionsResponseView<'static>>>, ConnectError>
Call the SetLayerSubscriptions RPC with explicit per-call options. Options override ClientConfig defaults.
Trait Implementations§
Source§impl<T: Clone> Clone for PolychartServiceClient<T>
impl<T: Clone> Clone for PolychartServiceClient<T>
Source§fn clone(&self) -> PolychartServiceClient<T>
fn clone(&self) -> PolychartServiceClient<T>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more