1
0
Fork 0
mirror of https://github.com/actix/actix-web.git synced 2024-12-21 07:36:43 +00:00

move Service to service sub mod

This commit is contained in:
Nikolay Kim 2018-09-11 09:30:22 -07:00
parent 43d6719703
commit 82b71d91ea
16 changed files with 22 additions and 22 deletions

View file

@ -11,7 +11,7 @@ use trust_dns_resolver::config::{ResolverConfig, ResolverOpts};
use trust_dns_resolver::system_conf::read_system_conf;
use super::resolver::{HostAware, Resolver, ResolverError, ResolverFuture};
use super::{NewService, Service};
use super::service::{NewService, Service};
// #[derive(Fail, Debug)]
#[derive(Debug)]

View file

@ -57,14 +57,9 @@ extern crate webpki;
#[cfg(feature = "rust-tls")]
extern crate webpki_roots;
/// re-export for convinience
pub use tower_service::{NewService, Service};
pub mod connector;
pub mod resolver;
pub mod server;
pub mod service;
pub mod ssl;
pub mod stream;
pub use service::{IntoNewService, IntoService, NewServiceExt, ServiceExt};

View file

@ -11,7 +11,7 @@ use trust_dns_resolver::lookup_ip::LookupIpFuture;
use trust_dns_resolver::system_conf::read_system_conf;
use trust_dns_resolver::{AsyncResolver, Background};
use super::Service;
use super::service::Service;
#[derive(Debug)]
pub enum ResolverError {

View file

@ -10,6 +10,7 @@ mod worker;
pub use self::server::Server;
pub use self::services::ServerServiceFactory;
#[allow(unused_imports)]
pub(crate) use self::worker::{Connections, ConnectionsGuard};
/// Pause accepting incoming connections

View file

@ -5,7 +5,7 @@ use futures::{Future, Poll};
use tokio_reactor::Handle;
use tokio_tcp::TcpStream;
use {NewService, Service};
use service::{NewService, Service};
pub enum ServerMessage {
Connect(net::TcpStream),

View file

@ -2,9 +2,8 @@ use std::cell::RefCell;
use std::rc::Rc;
use futures::{Async, Future, Poll};
use tower_service::{NewService, Service};
use super::IntoNewService;
use super::{IntoNewService, NewService, Service};
/// `AndThen` service combinator
pub struct AndThen<A, B> {

View file

@ -1,7 +1,8 @@
use std::marker::PhantomData;
use futures::{Async, Future, IntoFuture, Poll};
use {IntoNewService, NewService, Service};
use super::{IntoNewService, NewService, Service};
/// `Apply` service combinator
pub struct Apply<T, F, R, Req> {

View file

@ -4,9 +4,8 @@ use futures::{
future::{ok, FutureResult},
Async, IntoFuture, Poll,
};
use tower_service::{NewService, Service};
use super::{IntoNewService, IntoService};
use super::{IntoNewService, IntoService, NewService, Service};
pub struct FnService<F, Req, Resp, E, Fut>
where

View file

@ -1,9 +1,8 @@
use std::marker;
use futures::{Async, Future, IntoFuture, Poll};
use tower_service::{NewService, Service};
use super::IntoNewService;
use super::{IntoNewService, NewService, Service};
pub struct FnStateService<S, F, Req, Resp, Err, Fut>
where

View file

@ -1,7 +1,8 @@
use std::marker::PhantomData;
use futures::{Future, Poll};
use tower_service::Service;
use super::Service;
pub struct FromErr<A, E>
where

View file

@ -1,7 +1,8 @@
use std::marker;
use futures::{Async, Future, Poll};
use {NewService, Service};
use super::{NewService, Service};
/// `Map` service combinator
pub struct Map<A, F, R> {

View file

@ -1,7 +1,8 @@
use std::marker;
use futures::{Async, Future, Poll};
use tower_service::{NewService, Service};
use super::{NewService, Service};
/// `MapErr` service combinator
pub struct MapErr<A, F, E> {

View file

@ -1,7 +1,8 @@
use std::marker;
use futures::{Future, Poll};
use tower_service::NewService;
use super::NewService;
/// `MapInitErr` service combinator
pub struct MapInitErr<A, F, E> {

View file

@ -1,5 +1,8 @@
use futures::{Future, IntoFuture};
/// re-export for convinience
pub use tower_service::{NewService, Service};
mod and_then;
mod apply;
mod fn_service;
@ -17,7 +20,6 @@ pub use self::from_err::FromErr;
pub use self::map::{Map, MapNewService};
pub use self::map_err::{MapErr, MapErrNewService};
pub use self::map_init_err::MapInitErr;
use {NewService, Service};
pub trait ServiceExt: Service {
fn apply<F, R, Req>(self, f: F) -> Apply<Self, F, R, Req>

View file

@ -8,7 +8,7 @@ use tokio_openssl::{AcceptAsync, ConnectAsync, SslAcceptorExt, SslConnectorExt,
use super::MAX_CONN_COUNTER;
use connector::ConnectionInfo;
use server::{Connections, ConnectionsGuard};
use {NewService, Service};
use service::{NewService, Service};
/// Support `SSL` connections via openssl package
///

View file

@ -2,7 +2,7 @@ use futures::unsync::mpsc;
use futures::{Async, Future, Poll, Stream};
use tokio::executor::current_thread::spawn;
use super::{IntoService, Service};
use super::service::{IntoService, Service};
pub struct StreamDispatcher<S: Stream, T> {
stream: S,