Trait shaku::Provider [−][src]
Like Component
s, providers provide a service by implementing an interface.
Unlike Component
, Provider
represents a temporary service. Examples include a connection
to a remote service or pooled database connection. Because only providers can have other
providers as dependencies, services which use these provided services must also be Provider
s
(ex. DB repository, service using a DB repository, etc).
See also the provider getting started guide.
Associated Types
Loading content...Required methods
fn provide(module: &M) -> Result<Box<Self::Interface>, Box<dyn Error>>
[src]
Provides the service, possibly resolving other components/providers to do so.