Trait axum_starter::Prepare

source ·
pub trait Prepare<C: 'static>: 'static {
    type Effect: 'static;
    type Error: StdError + 'static;
    type Future: IntoFuture<Output = Result<Self::Effect, Self::Error>> + 'static;

    // Required method
    fn prepare(self, config: Arc<C>) -> Self::Future;
}
Expand description

Prepare Task witch may return any kind of effect

Required Associated Types§

source

type Effect: 'static

the effect

source

type Error: StdError + 'static

prepare error

source

type Future: IntoFuture<Output = Result<Self::Effect, Self::Error>> + 'static

the future for preparing

Required Methods§

source

fn prepare(self, config: Arc<C>) -> Self::Future

Implementors§

source§

impl<F, C, Fut, Effect, Error> Prepare<C> for F
where C: 'static, F: FnOnce(Arc<C>) -> Fut + 'static, Fut: Future<Output = Result<Effect, Error>> + 'static, Effect: 'static, Error: 'static + StdError,

§

type Effect = Effect

§

type Error = Error

§

type Future = Fut