pub trait GrpcClientType: Sync + Send {
type RawGrpcClient;
// Required methods
fn create_scoped_client(
project_id: ValidShardedId<ProjectId>,
request_id: RequestId,
channel: Channel,
interceptor: GrpcRequestInterceptor,
) -> Self;
fn get_mut(&mut self) -> &mut ScopedGrpcClient<Self::RawGrpcClient>;
fn address_map(config: &MainConfig) -> &HashMap<u64, String>;
// Provided methods
fn create_channel<'life0, 'async_trait>(
address: &'life0 str,
) -> Pin<Box<dyn Future<Output = Result<Channel, GrpcClientError>> + Send + 'async_trait>>
where 'life0: 'async_trait { ... }
fn get_address(
config: &MainConfig,
_project_id: &ValidShardedId<ProjectId>,
) -> Result<String, GrpcClientError> { ... }
}
Required Associated Types§
type RawGrpcClient
Required Methods§
fn create_scoped_client( project_id: ValidShardedId<ProjectId>, request_id: RequestId, channel: Channel, interceptor: GrpcRequestInterceptor, ) -> Self
fn get_mut(&mut self) -> &mut ScopedGrpcClient<Self::RawGrpcClient>
fn address_map(config: &MainConfig) -> &HashMap<u64, String>
Provided Methods§
fn create_channel<'life0, 'async_trait>(
address: &'life0 str,
) -> Pin<Box<dyn Future<Output = Result<Channel, GrpcClientError>> + Send + 'async_trait>>where
'life0: 'async_trait,
fn get_address( config: &MainConfig, _project_id: &ValidShardedId<ProjectId>, ) -> Result<String, GrpcClientError>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.