Struct tsukuyomi::server::Builder[][src]

pub struct Builder { /* fields omitted */ }

A builder for constructing a Server.

Methods

impl Builder
[src]

Important traits for &'a mut R

Modifies the tranport level configurations.

Example

let server = Server::builder()
    .transport(|t| {
        t.bind_tcp(([0, 0, 0, 0], 8888));
    })
    .finish(app).unwrap();

Important traits for &'a mut R

Modifies the HTTP level configurations.

Example

let server = Server::builder()
    .http(|http| {
        http.http1_only(true)
            .keep_alive(false);
    })
    .finish(app).unwrap();

Important traits for &'a mut R

Modifies the runtime level configurations.

Example

let server = Server::builder()
    .runtime(|rt| {
        rt.threadpool_builder(ThreadPoolBuilder::new());
    })
    .finish(app).unwrap();

Create an instance of configured Server with given NewService.

Trait Implementations

impl Debug for Builder
[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl !Send for Builder

impl !Sync for Builder