mirror of
https://github.com/fafhrd91/actix-net
synced 2025-01-31 09:12:08 +01:00
Add into_service helper function
This commit is contained in:
parent
3551d6674d
commit
7c5fa25b23
@ -1,5 +1,12 @@
|
|||||||
# Changes
|
# Changes
|
||||||
|
|
||||||
|
## [1.0.2] - 2020-01-08
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
* Add `into_service` helper function
|
||||||
|
|
||||||
|
|
||||||
## [1.0.1] - 2019-12-22
|
## [1.0.1] - 2019-12-22
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "actix-service"
|
name = "actix-service"
|
||||||
version = "1.0.1"
|
version = "1.0.2"
|
||||||
authors = ["Nikolay Kim <fafhrd91@gmail.com>"]
|
authors = ["Nikolay Kim <fafhrd91@gmail.com>"]
|
||||||
description = "Actix service"
|
description = "Actix service"
|
||||||
keywords = ["network", "framework", "async", "futures"]
|
keywords = ["network", "framework", "async", "futures"]
|
||||||
@ -10,7 +10,6 @@ documentation = "https://docs.rs/actix-service/"
|
|||||||
categories = ["network-programming", "asynchronous"]
|
categories = ["network-programming", "asynchronous"]
|
||||||
license = "MIT/Apache-2.0"
|
license = "MIT/Apache-2.0"
|
||||||
edition = "2018"
|
edition = "2018"
|
||||||
workspace = ".."
|
|
||||||
|
|
||||||
[badges]
|
[badges]
|
||||||
travis-ci = { repository = "actix/actix-service", branch = "master" }
|
travis-ci = { repository = "actix/actix-service", branch = "master" }
|
||||||
|
@ -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 mod dev {
|
||||||
pub use crate::and_then::{AndThenService, AndThenServiceFactory};
|
pub use crate::and_then::{AndThenService, AndThenServiceFactory};
|
||||||
pub use crate::and_then_apply_fn::{AndThenApplyFn, AndThenApplyFnFactory};
|
pub use crate::and_then_apply_fn::{AndThenApplyFn, AndThenApplyFnFactory};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user