1
0
mirror of https://github.com/fafhrd91/actix-net synced 2024-11-24 03:42:59 +01:00

rename module

This commit is contained in:
Nikolay Kim 2019-03-08 16:26:30 -08:00
parent 046142ffbc
commit 4850cf41ff
3 changed files with 8 additions and 9 deletions

View File

@ -12,8 +12,8 @@ use num_cpus;
use tokio_timer::sleep; use tokio_timer::sleep;
use crate::accept::{AcceptLoop, AcceptNotify, Command}; use crate::accept::{AcceptLoop, AcceptNotify, Command};
use crate::config::{ConfiguredService, ServiceConfig};
use crate::server::{Server, ServerCommand}; use crate::server::{Server, ServerCommand};
use crate::service_config::{ConfiguredService, ServiceConfig};
use crate::services::{InternalServiceFactory, ServiceFactory, StreamNewService}; use crate::services::{InternalServiceFactory, ServiceFactory, StreamNewService};
use crate::signals::{Signal, Signals}; use crate::signals::{Signal, Signals};
use crate::worker::{self, Worker, WorkerAvailability, WorkerClient}; use crate::worker::{self, Worker, WorkerAvailability, WorkerClient};
@ -194,19 +194,18 @@ impl ServerBuilder {
/// ```rust,ignore /// ```rust,ignore
/// use actix_web::*; /// use actix_web::*;
/// ///
/// fn main() { /// fn main() -> std::io::Result<()> {
/// Server::new(). /// Server::new().
/// .service( /// .service(
/// HttpServer::new(|| App::new().resource("/", |r| r.h(|_| HttpResponse::Ok()))) /// HttpServer::new(|| App::new().service(web::service("/").to(|| HttpResponse::Ok())))
/// .bind("127.0.0.1:0") /// .bind("127.0.0.1:0")
/// .expect("Can not bind to 127.0.0.1:0")) /// .run()
/// .run();
/// } /// }
/// ``` /// ```
pub fn run(self) { pub fn run(self) -> io::Result<()> {
let sys = System::new("http-server"); let sys = System::new("http-server");
self.start(); self.start();
sys.run(); sys.run()
} }
/// Starts processing incoming connections and return server controller. /// Starts processing incoming connections and return server controller.

View File

@ -2,17 +2,17 @@
mod accept; mod accept;
mod builder; mod builder;
mod config;
mod counter; mod counter;
mod server; mod server;
mod service_config;
mod services; mod services;
mod signals; mod signals;
pub mod ssl; pub mod ssl;
mod worker; mod worker;
pub use self::builder::ServerBuilder; pub use self::builder::ServerBuilder;
pub use self::config::{ServiceConfig, ServiceRuntime};
pub use self::server::Server; pub use self::server::Server;
pub use self::service_config::{ServiceConfig, ServiceRuntime};
pub use self::services::ServiceFactory; pub use self::services::ServiceFactory;
#[doc(hidden)] #[doc(hidden)]