mirror of
https://github.com/fafhrd91/actix-net
synced 2024-11-30 21:04:35 +01:00
updated as per comments
This commit is contained in:
parent
33cd51aabf
commit
5cbc29306a
@ -53,9 +53,6 @@ pub use self::then::{Then, ThenNewService};
|
|||||||
pub use self::transform::{apply_transform, IntoTransform, Transform};
|
pub use self::transform::{apply_transform, IntoTransform, Transform};
|
||||||
|
|
||||||
/// An asynchronous function from `Request` to a `Response`.
|
/// An asynchronous function from `Request` to a `Response`.
|
||||||
/// The entire request/response lifecycle can be represented as a pipeline of
|
|
||||||
/// Services. The linkage between Services is represented in terms of ownership,
|
|
||||||
/// where the preceeding Service owns that which follows it.
|
|
||||||
pub trait Service {
|
pub trait Service {
|
||||||
/// Requests handled by the service.
|
/// Requests handled by the service.
|
||||||
type Request;
|
type Request;
|
||||||
|
@ -40,9 +40,7 @@ pub trait Transform<S> {
|
|||||||
/// The future response value.
|
/// The future response value.
|
||||||
type Future: Future<Item = Self::Transform, Error = Self::InitError>;
|
type Future: Future<Item = Self::Transform, Error = Self::InitError>;
|
||||||
|
|
||||||
/// Creates and returns a new Service component, asynchronously. `new_transform`
|
/// Creates and returns a new Service component, asynchronously
|
||||||
/// is called only once during the lifetime of a server -- as the server
|
|
||||||
/// initializes.
|
|
||||||
fn new_transform(&self, service: S) -> Self::Future;
|
fn new_transform(&self, service: S) -> Self::Future;
|
||||||
|
|
||||||
/// Map this service's factory error to a different error,
|
/// Map this service's factory error to a different error,
|
||||||
|
Loading…
Reference in New Issue
Block a user