[][src]Struct tsukuyomi_server::Server

pub struct Server<S, L = SocketAddr, A = (), R = Runtime> { /* fields omitted */ }

An HTTP server.

Methods

impl<S> Server<S>
[src]

Create a new Server with the specified NewService and default configuration.

impl<S, L, A, R> Server<S, L, A, R>
[src]

Sets the transport used by the server.

By default, a TCP transport with the listener address "127.0.0.1:4000" is set.

Sets the instance of Acceptor to the server.

By default, the raw acceptor is set, which returns the incoming I/Os directly.

Sets the HTTP-level configuration to this server.

Note that the executor will be overwritten by the launcher.

Sets the instance of runtime to the specified 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>> + '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]

Trait Implementations

impl<S: Debug, L: Debug, A: Debug, R: Debug> Debug for Server<S, L, A, R>
[src]

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> 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, U> Into for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Erased for T