dope_runtime/client/provider.rs
1use crate::client;
2
3/// Produces a client from the exact selected provider.
4/// The provider type carries its storage loans; each client requires those loans
5/// and its driver domain to outlive the issued application scope.
6pub trait Provider<'d> {
7 type Client<'app>: 'app
8 where
9 Self: 'app,
10 'd: 'app;
11
12 fn provide<'app>(context: client::Context<'_, 'app, 'd, Self>) -> Self::Client<'app>
13 where
14 Self: 'app,
15 'd: 'app;
16}