1
0
mirror of https://github.com/fafhrd91/actix-net synced 2024-11-30 21:04:35 +01:00

prepare actix-service release

This commit is contained in:
Nikolay Kim 2019-12-11 10:29:34 +06:00
parent 25012d290a
commit c094f84b85
3 changed files with 6 additions and 6 deletions

View File

@ -1,5 +1,7 @@
# Changes # Changes
## [1.0.0] - 2019-12-11
### Added ### Added
* Add Clone impl for Apply service * Add Clone impl for Apply service

View File

@ -1,6 +1,6 @@
[package] [package]
name = "actix-service" name = "actix-service"
version = "1.0.0-alpha.4" version = "1.0.0"
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"]

View File

@ -7,16 +7,14 @@ use std::task::{Context, Poll};
use crate::transform_err::TransformMapInitErr; use crate::transform_err::TransformMapInitErr;
use crate::{IntoServiceFactory, Service, ServiceFactory}; use crate::{IntoServiceFactory, Service, ServiceFactory};
/// Apply transform to a service. Function returns /// Apply transform to a service.
/// services factory that in initialization creates pub fn apply<T, S, U>(t: T, factory: U) -> ApplyTransform<T, S>
/// service and applies transform to this service.
pub fn apply<T, S, U>(t: T, service: U) -> ApplyTransform<T, S>
where where
S: ServiceFactory, S: ServiceFactory,
T: Transform<S::Service, InitError = S::InitError>, T: Transform<S::Service, InitError = S::InitError>,
U: IntoServiceFactory<S>, U: IntoServiceFactory<S>,
{ {
ApplyTransform::new(t, service.into_factory()) ApplyTransform::new(t, factory.into_factory())
} }
/// The `Transform` trait defines the interface of a service factory that wraps inner service /// The `Transform` trait defines the interface of a service factory that wraps inner service