1
0
mirror of https://github.com/fafhrd91/actix-net synced 2025-08-21 03:25:38 +02:00

rename StreamServiceFactory to ServiceFactory

This commit is contained in:
Nikolay Kim
2019-03-04 14:31:46 -08:00
parent 82930de8e7
commit 9f25fdf929
4 changed files with 21 additions and 9 deletions

View File

@@ -14,7 +14,7 @@ use tokio_timer::sleep;
use crate::accept::{AcceptLoop, AcceptNotify, Command};
use crate::config::{ConfiguredService, ServiceConfig};
use crate::server::{Server, ServerCommand};
use crate::services::{InternalServiceFactory, StreamNewService, StreamServiceFactory};
use crate::services::{InternalServiceFactory, ServiceFactory, StreamNewService};
use crate::signals::{Signal, Signals};
use crate::worker::{self, Worker, WorkerAvailability, WorkerClient};
use crate::Token;
@@ -137,7 +137,7 @@ impl ServerBuilder {
/// Add new service to the server.
pub fn bind<F, U, N: AsRef<str>>(mut self, name: N, addr: U, factory: F) -> io::Result<Self>
where
F: StreamServiceFactory,
F: ServiceFactory,
U: net::ToSocketAddrs,
{
let sockets = bind_addr(addr)?;
@@ -163,7 +163,7 @@ impl ServerBuilder {
factory: F,
) -> Self
where
F: StreamServiceFactory,
F: ServiceFactory,
{
let token = self.token.next();
self.services.push(StreamNewService::create(