1
0
mirror of https://github.com/fafhrd91/actix-net synced 2025-06-28 20:10:35 +02:00

Add into_service helper function

This commit is contained in:
Nikolay Kim
2020-01-08 18:31:50 +06:00
parent 3551d6674d
commit 7c5fa25b23
3 changed files with 17 additions and 2 deletions

View File

@ -351,6 +351,15 @@ where
}
}
/// Convert object of type `T` to a service `S`
pub fn into_service<T, S>(tp: T) -> S
where
S: Service,
T: IntoService<S>,
{
tp.into_service()
}
pub mod dev {
pub use crate::and_then::{AndThenService, AndThenServiceFactory};
pub use crate::and_then_apply_fn::{AndThenApplyFn, AndThenApplyFnFactory};