[−][src]Struct tsukuyomi_server::Server
An HTTP server.
Methods
impl<S> Server<S>[src]
impl<S> Server<S>pub fn new(make_service: S) -> Self[src]
pub fn new(make_service: S) -> SelfCreate a new Server with the specified NewService and default configuration.
impl<S, L, A, R> Server<S, L, A, R>[src]
impl<S, L, A, R> Server<S, L, A, R>pub fn bind<L2>(self, listener: L2) -> Server<S, L2, A, R> where
L2: Listener, [src]
pub fn bind<L2>(self, listener: L2) -> Server<S, L2, A, R> where
L2: Listener, Sets the transport used by the server.
By default, a TCP transport with the listener address "127.0.0.1:4000" is set.
pub fn acceptor<A2>(self, acceptor: A2) -> Server<S, L, A2, R> where
L: Listener,
A2: Acceptor<L::Conn>, [src]
pub fn acceptor<A2>(self, acceptor: A2) -> Server<S, L, A2, R> where
L: Listener,
A2: Acceptor<L::Conn>, Sets the instance of Acceptor to the server.
By default, the raw acceptor is set, which returns the incoming I/Os directly.
pub fn protocol(self, protocol: Http) -> Self[src]
pub fn protocol(self, protocol: Http) -> SelfSets the HTTP-level configuration to this server.
Note that the executor will be overwritten by the launcher.
pub fn runtime<R2>(self, runtime: R2) -> Server<S, L, A, R2>[src]
pub fn runtime<R2>(self, runtime: R2) -> Server<S, L, A, R2>Sets the instance of runtime to the specified runtime.
pub fn current_thread(self) -> Server<S, L, A, Runtime>[src]
pub fn current_thread(self) -> Server<S, L, A, Runtime>Switches the runtime to be used to current_thread::Runtime.
impl<S, T, A, Bd> Server<S, T, A, Runtime> where
S: MakeServiceRef<A::Conn, Request<Body>, Response = Response<Bd>> + Send + Sync + 'static,
S::Error: Into<Box<dyn Error + Send + Sync + 'static>>,
S::MakeError: Into<Box<dyn Error + Send + Sync + 'static>>,
S::Future: Send + 'static,
S::Service: Send + 'static,
<S::Service as Service<Request<Body>>>::Future: Send + 'static,
Bd: Payload,
T: Listener,
T::Incoming: Send + 'static,
A: Acceptor<T::Conn> + Send + 'static,
A::Conn: Send + 'static,
A::Error: Into<Box<dyn Error + Send + Sync + 'static>>,
A::Accept: Send + 'static, [src]
impl<S, T, A, Bd> Server<S, T, A, Runtime> where
S: MakeServiceRef<A::Conn, Request<Body>, Response = Response<Bd>> + Send + Sync + 'static,
S::Error: Into<Box<dyn Error + Send + Sync + 'static>>,
S::MakeError: Into<Box<dyn Error + Send + Sync + 'static>>,
S::Future: Send + 'static,
S::Service: Send + 'static,
<S::Service as Service<Request<Body>>>::Future: Send + 'static,
Bd: Payload,
T: Listener,
T::Incoming: Send + 'static,
A: Acceptor<T::Conn> + Send + 'static,
A::Conn: Send + 'static,
A::Error: Into<Box<dyn Error + Send + Sync + 'static>>,
A::Accept: Send + 'static, impl<S, T, A, Bd> Server<S, T, A, Runtime> where
S: MakeServiceRef<A::Conn, Request<Body>, Response = Response<Bd>> + 'static,
S::Error: Into<Box<dyn Error + Send + Sync + 'static>>,
S::MakeError: Into<Box<dyn Error + Send + Sync + 'static>>,
S::Future: 'static,
S::Service: 'static,
<S::Service as Service<Request<Body>>>::Future: 'static,
Bd: Payload,
T: Listener,
T::Incoming: 'static,
A: Acceptor<T::Conn> + 'static,
A::Conn: Send + 'static,
A::Error: Into<Box<dyn Error + Send + Sync + 'static>>,
A::Accept: 'static, [src]
impl<S, T, A, Bd> Server<S, T, A, Runtime> where
S: MakeServiceRef<A::Conn, Request<Body>, Response = Response<Bd>> + 'static,
S::Error: Into<Box<dyn Error + Send + Sync + 'static>>,
S::MakeError: Into<Box<dyn Error + Send + Sync + 'static>>,
S::Future: 'static,
S::Service: 'static,
<S::Service as Service<Request<Body>>>::Future: 'static,
Bd: Payload,
T: Listener,
T::Incoming: 'static,
A: Acceptor<T::Conn> + 'static,
A::Conn: Send + 'static,
A::Error: Into<Box<dyn Error + Send + Sync + 'static>>,
A::Accept: 'static, Trait Implementations
Auto Trait Implementations
impl<S, L, A, R> Send for Server<S, L, A, R> where
A: Send,
L: Send,
R: Send,
S: Send,
impl<S, L, A, R> Send for Server<S, L, A, R> where
A: Send,
L: Send,
R: Send,
S: Send, impl<S, L, A, R> Sync for Server<S, L, A, R> where
A: Sync,
L: Sync,
R: Sync,
S: Sync,
impl<S, L, A, R> Sync for Server<S, L, A, R> where
A: Sync,
L: Sync,
R: Sync,
S: Sync, Blanket Implementations
impl<T> From for T[src]
impl<T> From for Timpl<T, U> Into for T where
U: From<T>, [src]
impl<T, U> Into for T where
U: From<T>, impl<T, U> TryFrom for T where
T: From<U>, [src]
impl<T, U> TryFrom for T where
T: From<U>, type Error = !
🔬 This is a nightly-only experimental API. (
try_from)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>impl<T> Borrow for T where
T: ?Sized, [src]
impl<T> Borrow for T where
T: ?Sized, impl<T> BorrowMut for T where
T: ?Sized, [src]
impl<T> BorrowMut for T where
T: ?Sized, fn borrow_mut(&mut self) -> &mut T[src]
fn borrow_mut(&mut self) -> &mut Timpl<T, U> TryInto for T where
U: TryFrom<T>, [src]
impl<T, U> TryInto for T where
U: TryFrom<T>, type Error = <U as TryFrom<T>>::Error
🔬 This is a nightly-only experimental API. (
try_from)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>impl<T> Any for T where
T: 'static + ?Sized, [src]
impl<T> Any for T where
T: 'static + ?Sized, fn get_type_id(&self) -> TypeId[src]
fn get_type_id(&self) -> TypeIdimpl<T> Erased for T
impl<T> Erased for T