Trait svc_assets_client_grpc::prelude::Client
pub trait Client<T>where
T: Send + Clone,{
// Required methods
fn invalidate<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait, Global>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn get_name(&self) -> String;
fn get_address(&self) -> String;
fn get_inner(&self) -> &Arc<Mutex<Option<T>>, Global>;
// Provided method
fn new_client(
server_host: &str,
server_port: u16,
name: &str
) -> GrpcClient<T> { ... }
}
Expand description
Generic gRPC Client trait to provide wrapper for [GrpcClient
] struct creation
Required Methods§
fn invalidate<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
Self: 'async_trait,
fn invalidate<'life0, 'async_trait>( &'life0 mut self ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait, Global>>where 'life0: 'async_trait, Self: 'async_trait,
Invalidates the client if set
fn get_address(&self) -> String
fn get_address(&self) -> String
Get connection string for client
Provided Methods§
fn new_client(server_host: &str, server_port: u16, name: &str) -> GrpcClient<T>
fn new_client(server_host: &str, server_port: u16, name: &str) -> GrpcClient<T>
Create new [GrpcClient
]