1
0
mirror of https://github.com/fafhrd91/actix-net synced 2025-08-21 17:25:37 +02:00

service improvements (#233)

This commit is contained in:
Rob Ede
2020-12-27 14:15:42 +00:00
committed by GitHub
parent 33c9aa6988
commit 8a58a341a4
27 changed files with 387 additions and 1179 deletions

View File

@@ -1,7 +1,11 @@
use std::future::Future;
use std::marker::PhantomData;
use std::pin::Pin;
use std::task::{Context, Poll};
use core::{
future::Future,
marker::PhantomData,
pin::Pin,
task::{Context, Poll},
};
use pin_project_lite::pin_project;
use super::ServiceFactory;
@@ -59,15 +63,16 @@ where
}
}
#[pin_project::pin_project]
pub struct MapInitErrFuture<A, F, Req, E>
where
A: ServiceFactory<Req>,
F: Fn(A::InitError) -> E,
{
f: F,
#[pin]
fut: A::Future,
pin_project! {
pub struct MapInitErrFuture<A, F, Req, E>
where
A: ServiceFactory<Req>,
F: Fn(A::InitError) -> E,
{
f: F,
#[pin]
fut: A::Future,
}
}
impl<A, F, Req, E> MapInitErrFuture<A, F, Req, E>