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>> 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>>>; // 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>>
where 'life0: 'async_trait, Self: 'async_trait,

Invalidates the client if set

fn get_name(&self) -> String

Get name string for client

fn get_address(&self) -> String

Get connection string for client

fn get_inner(&self) -> &Arc<Mutex<Option<T>>>

Get GrpcClient inner value

Provided Methods§

fn new_client(server_host: &str, server_port: u16, name: &str) -> GrpcClient<T>

Create new [GrpcClient]

Object Safety§

This trait is not object safe.

Implementors§

§

impl<T> Client<T> for GrpcClient<T>
where T: Send + Clone,