Struct rserver::Server

source ·
pub struct Server {
    pub config: Config,
}
Expand description

RServer’s Server struct.

Fields§

§config: Config

Implementations§

Start server at the given host and port which will handle requests recieved from clients/apps.

Example

use rserver::Config;
use rserver::Server;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let config = Config::default();
    let server = Server::new(config);
    server.start().await
}

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.