Trait salak::Factory [−][src]
A factory.
Associated Types
type Env: Environment
[src]
Factory environment.
Required methods
fn env(&self) -> &Self::Env
[src]
Get environment.
fn get_or_build<T: FromFactory>(&self) -> Result<FacRef<T>, PropertyError>
[src]
Get reference of specified type.
If FactoryScope
is [FactoryScope::registrySingleton
], then return cached value,
otherwise create a new one.
Provided methods
fn init<T: FromFactory>(&self) -> Result<(), PropertyError>
[src]
Initialize some value.