pub trait BuildFromContext<E, CtxErr = (), InitErr = ()> {
// Required method
fn build_from(ctx: &AppContextBuilder, extras: E) -> Result<Self, CtxErr>
where Self: Sized;
// Provided method
fn init_self(&self) -> Result<(), InitErr> { ... }
}Expand description
A trait for beans which can be created from AppContextBuilder.
ctx is the AppContext for acquiring lazy-initialized beans,
and extras are extra params for this build.
Required Methods§
Sourcefn build_from(ctx: &AppContextBuilder, extras: E) -> Result<Self, CtxErr>where
Self: Sized,
fn build_from(ctx: &AppContextBuilder, extras: E) -> Result<Self, CtxErr>where
Self: Sized,
build the beans from