Skip to main content

Provider

Trait Provider 

Source
pub trait Provider<'d> {
    type Client<'app>: 'app
       where Self: 'app,
             'd: 'app;

    // Required method
    fn provide<'app>(context: Context<'_, 'app, 'd, Self>) -> Self::Client<'app>
       where Self: 'app,
             'd: 'app;
}
Expand description

Produces a client from the exact selected provider. The provider type carries its storage loans; each client requires those loans and its driver domain to outlive the issued application scope.

Required Associated Types§

Source

type Client<'app>: 'app
where Self: 'app, 'd: 'app,

Required Methods§

Source

fn provide<'app>(context: Context<'_, 'app, 'd, Self>) -> Self::Client<'app>
where Self: 'app, 'd: 'app,

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§